src/Modules/User/Entity/UserSettings.php line 13

  1. <?php
  2. namespace App\Modules\User\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5.  * Settings
  6.  *
  7.  * @ORM\Table(name="user_settings")
  8.  * @ORM\Entity
  9.  */
  10. class UserSettings
  11. {
  12.     /**
  13.      * @var \App\Modules\User\Entity\User
  14.      *
  15.      * @ORM\Id
  16.      * @ORM\GeneratedValue(strategy="NONE") 
  17.      * @ORM\ManyToOne(targetEntity="App\Modules\User\Entity\User")
  18.      * @ORM\JoinColumns({
  19.      *   @ORM\JoinColumn(name="id_user", referencedColumnName="id", nullable=false, onDelete="CASCADE")
  20.      * })
  21.      */
  22.     private $user;
  23.     /**
  24.      * @var string
  25.      *
  26.      * @ORM\Id
  27.      * @ORM\GeneratedValue(strategy="NONE")
  28.      * @ORM\Column(name="name", type="string", length=255, nullable=false)
  29.      */
  30.     private $name;
  31.     /**
  32.      * @var string|null
  33.      *
  34.      * @ORM\Column(name="value", type="text", length=65535, nullable=true)
  35.      */
  36.     private $value;
  37.     public function getName(): ?string
  38.     {
  39.         return $this->name;
  40.     }
  41.     public function setName(?string $name): self
  42.     {
  43.         $this->name $name;
  44.         
  45.         return $this;
  46.     }
  47.     public function getValue(): ?string
  48.     {
  49.         return $this->value;
  50.     }
  51.     public function setValue(?string $value): self
  52.     {
  53.         $this->value $value;
  54.         return $this;
  55.     }
  56.     public function getUser(): ?User
  57.     {
  58.         return $this->user;
  59.     }
  60.     public function setUser(?User $user): self
  61.     {
  62.         $this->user $user;
  63.         return $this;
  64.     }
  65. }