src/Domain/Setting/Entity/Setting.php line 11

  1. <?php
  2. namespace App\Domain\Setting\Entity;
  3. use App\Domain\Auth\Entity\Group;
  4. use App\Domain\Setting\Repository\SettingRepository;
  5. use Doctrine\ORM\Mapping as ORM;
  6. #[ORM\Table(name'settings')]
  7. #[ORM\Entity(repositoryClassSettingRepository::class)]
  8. class Setting
  9. {
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column(type'integer')]
  13.     protected ?int $id null;
  14.     #[ORM\Column(type'string')]
  15.     protected ?string $name '';
  16.     #[ORM\Column(type'string')]
  17.     protected ?string $slug '';
  18.     #[ORM\Column(type'text',nullabletrue)]
  19.     protected ?string $value '';
  20.     #[ORM\Column(type"string"nullabletrue)]
  21.     protected string $type;
  22.     #[ORM\Column(type"string"nullabletrue)]
  23.     protected string $category;
  24.     #[ORM\Column(type"integer")]
  25.     protected int $sort;
  26.     #[ORM\Column(type'json'nullabletrue)]
  27.     protected ?array $choices null;
  28.     #[ORM\Column(name"conditions"type"string"nullabletrue)]
  29.     protected ?string $conditions '';
  30.     /**
  31.      * @return int
  32.      */
  33.     public function getId(): int
  34.     {
  35.         return $this->id;
  36.     }
  37.     /**
  38.      * @param int $id
  39.      * @return Setting
  40.      */
  41.     public function setId(int $id): Setting
  42.     {
  43.         $this->id $id;
  44.         return $this;
  45.     }
  46.     /**
  47.      * @return string|null
  48.      */
  49.     public function getName(): ?string
  50.     {
  51.         return $this->name;
  52.     }
  53.     /**
  54.      * @param string|null $name
  55.      * @return Setting
  56.      */
  57.     public function setName(?string $name): Setting
  58.     {
  59.         $this->name $name;
  60.         return $this;
  61.     }
  62.     /**
  63.      * @return string|null
  64.      */
  65.     public function getValue(): ?string
  66.     {
  67.         return $this->value;
  68.     }
  69.     /**
  70.      * @param string|null $value
  71.      * @return Setting
  72.      */
  73.     public function setValue(?string $value): Setting
  74.     {
  75.         $this->value $value;
  76.         return $this;
  77.     }
  78.     /**
  79.      * @return string
  80.      */
  81.     public function getType(): string
  82.     {
  83.         return $this->type;
  84.     }
  85.     /**
  86.      * @param string $type
  87.      * @return Setting
  88.      */
  89.     public function setType(string $type): Setting
  90.     {
  91.         $this->type $type;
  92.         return $this;
  93.     }
  94.     /**
  95.      * @return string
  96.      */
  97.     public function getCategory(): string
  98.     {
  99.         return $this->category;
  100.     }
  101.     /**
  102.      * @param string $category
  103.      * @return Setting
  104.      */
  105.     public function setCategory(string $category): Setting
  106.     {
  107.         $this->category $category;
  108.         return $this;
  109.     }
  110.     /**
  111.      * @return string|null
  112.      */
  113.     public function getSlug(): ?string
  114.     {
  115.         return $this->slug;
  116.     }
  117.     /**
  118.      * @param string|null $slug
  119.      * @return Setting
  120.      */
  121.     public function setSlug(?string $slug): Setting
  122.     {
  123.         $this->slug $slug;
  124.         return $this;
  125.     }
  126.     /**
  127.      * @return int
  128.      */
  129.     public function getSort(): int
  130.     {
  131.         return $this->sort;
  132.     }
  133.     /**
  134.      * @param int $sort
  135.      * @return Setting
  136.      */
  137.     public function setSort(int $sort): Setting
  138.     {
  139.         $this->sort $sort;
  140.         return $this;
  141.     }
  142.     /**
  143.      * @return string|null
  144.      */
  145.     public function getConditions(): ?string
  146.     {
  147.         return $this->conditions;
  148.     }
  149.     /**
  150.      * @param string|null $conditions
  151.      * @return Setting
  152.      */
  153.     public function setConditions(?string $conditions): Setting
  154.     {
  155.         $this->conditions $conditions;
  156.         return $this;
  157.     }
  158.     /**
  159.      * @return array|null
  160.      */
  161.     public function getChoices(): ?array
  162.     {
  163.         return $this->choices;
  164.     }
  165.     /**
  166.      * @param array|null $choices
  167.      * @return Setting
  168.      */
  169.     public function setChoices(?array $choices): Setting
  170.     {
  171.         $this->choices $choices;
  172.         return $this;
  173.     }
  174. }