src/Admin/Entity/StdConfig.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Admin\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5.  * StdConfig
  6.  */
  7. #[ORM\Table(name'std_config')]
  8. #[ORM\Index(name'fk_std_config_std_users'columns: ['created_by'])]
  9. #[ORM\Index(name'fk_std_config_std_users_0'columns: ['updated_by'])]
  10. #[ORM\Entity (repositoryClass'App\Admin\Repository\StdConfigRepository')]
  11. class StdConfig
  12. {
  13.     /**
  14.      * @var string     
  15.      */
  16.     #[ORM\Column(name'machine_name'type'string'length50nullablefalseoptions: ['comment' => 'Unique code used in the programming to identify the config variable'])]
  17.     #[ORM\Id]
  18.     private $machineName;
  19.     /**
  20.      * @var string|null
  21.      */
  22.     #[ORM\Column(name'label'type'string'length100nullabletrueoptions: ['comment' => 'Label of the config variable'])]
  23.     private $label;
  24.     /**
  25.      * @var string|null
  26.      */
  27.     #[ORM\Column(name'value'type'text'nullabletrueoptions: ['comment' => 'Value of the config variable'])]
  28.     private $value;
  29.     /**
  30.      * @var string|null
  31.      */
  32.     #[ORM\Column(name'description_machine_name'type'string'length50nullabletrueoptions: ['comment' => 'Machine name of the translation of the description of the variable'])]
  33.     private $descriptionMachineName;
  34.     /**
  35.      * @var string|null
  36.      */
  37.     #[ORM\Column(name'details_machine_name'type'string'length50nullabletrueoptions: ['comment' => 'Machine name of the translation of the details text of the variable'])]
  38.     private $detailsMachineName;
  39.     /**
  40.      * @var string|null
  41.      */
  42.     #[ORM\Column(name'parent_name'type'string'length50nullabletrueoptions: ['comment' => 'Machine name of the translation of the parent group of variables'])]
  43.     private $parentName;
  44.     /**
  45.      * @var string|null
  46.      */
  47.     #[ORM\Column(name'variable_type'type'string'length20nullabletrueoptions: ['comment' => 'Type of the variable. It affects the kind of input generated Possible values:'])]
  48.     private $variableType;
  49.     /**
  50.      * @var int|null
  51.      */
  52.     #[ORM\Column(name'order_value'type'integer'nullabletrueoptions: ['comment' => 'Order of the permission'])]
  53.     private $orderValue '0';
  54.     /**
  55.      * @var bool
  56.      */
  57.     #[ORM\Column(name'is_hidden'type'boolean'nullablefalseoptions: ['comment' => 'Flag that indicates that this variable is hidden from the user'])]
  58.     private $isHidden '0';
  59.     /**
  60.      * @var bool
  61.      */
  62.     #[ORM\Column(name'is_active'type'boolean'nullablefalseoptions: ['default' => 1'comment' => 'Flag that indicates if this config variable is active.'])]
  63.     private $isActive '1';
  64.     /**
  65.      * @var \DateTime
  66.      */
  67.     #[ORM\Column(name'created_date'type'datetime'nullablefalseoptions: ['default' => 'CURRENT_TIMESTAMP''comment' => 'Date and time of the record creation'])]
  68.     private $createdDate 'CURRENT_TIMESTAMP';
  69.     /**
  70.      * @var \DateTime
  71.      */
  72.     #[ORM\Column(name'updated_date'type'datetime'nullablefalseoptions: ['default' => 'CURRENT_TIMESTAMP''comment' => 'Date and time the record was last updated'])]
  73.     private $updatedDate 'CURRENT_TIMESTAMP';
  74.     /**
  75.      * @var \StdUsers
  76.      */
  77.     #[ORM\JoinColumn(name'created_by'referencedColumnName'id')]
  78.     #[ORM\ManyToOne(targetEntity'StdUsers')]
  79.     private $createdBy;
  80.     /**
  81.      * @var \StdUsers
  82.      */
  83.     #[ORM\JoinColumn(name'updated_by'referencedColumnName'id')]
  84.     #[ORM\ManyToOne(targetEntity'StdUsers')]
  85.     private $updatedBy;
  86.     /**
  87.      * @var json
  88.      */
  89.     #[ORM\Column(name'content'type'json'nullabletrueoptions: ['default' => null'comment' => 'Content of the page'])]
  90.     private $content = [];
  91.     /**
  92.      * @var string
  93.      */
  94.     #[ORM\Column(name'language_code'type'string'length3nullablefalseoptions: ['comment' => 'ISO 639 Language code'])]
  95.     #[ORM\Id]
  96.     private $languageCode '';
  97.     /**
  98.      * @var array
  99.      */
  100.     #[ORM\Column(type'json')]
  101.     private $roles = [];
  102.     public function getMachineName(): ?string
  103.     {
  104.         return $this->machineName;
  105.     }
  106.     public function setMachineName(?string $machineName): self
  107.     {
  108.         $this->machineName $machineName;
  109.         return $this;
  110.     }
  111.     public function getLabel(): ?string
  112.     {
  113.         return $this->label;
  114.     }
  115.     public function setLabel(?string $label): self
  116.     {
  117.         $this->label $label;
  118.         return $this;
  119.     }
  120.     public function getValue(): ?string
  121.     {
  122.         return $this->value;
  123.     }
  124.     public function setValue(?string $value): self
  125.     {
  126.         $this->value $value;
  127.         return $this;
  128.     }
  129.     public function getDescriptionMachineName(): ?string
  130.     {
  131.         return $this->descriptionMachineName;
  132.     }
  133.     public function setDescriptionMachineName(?string $descriptionMachineName): self
  134.     {
  135.         $this->descriptionMachineName $descriptionMachineName;
  136.         return $this;
  137.     }
  138.     public function getDetailsMachineName(): ?string
  139.     {
  140.         return $this->detailsMachineName;
  141.     }
  142.     public function setDetailsMachineName(?string $detailsMachineName): self
  143.     {
  144.         $this->detailsMachineName $detailsMachineName;
  145.         return $this;
  146.     }
  147.     public function getParentName(): ?string
  148.     {
  149.         return $this->parentName;
  150.     }
  151.     public function setParentName(?string $parentName): self
  152.     {
  153.         $this->parentName $parentName;
  154.         return $this;
  155.     }
  156.     public function getVariableType(): ?string
  157.     {
  158.         return $this->variableType;
  159.     }
  160.     public function setVariableType(?string $variableType): self
  161.     {
  162.         $this->variableType $variableType;
  163.         return $this;
  164.     }
  165.     public function getOrderValue(): ?int
  166.     {
  167.         return $this->orderValue;
  168.     }
  169.     public function setOrderValue(?int $orderValue): self
  170.     {
  171.         $this->orderValue $orderValue;
  172.         return $this;
  173.     }
  174.     public function getIsHidden(): ?bool
  175.     {
  176.         return $this->isHidden;
  177.     }
  178.     public function setIsHidden(bool $isHidden): self
  179.     {
  180.         $this->isHidden $isHidden;
  181.         return $this;
  182.     }
  183.     public function getIsActive(): ?bool
  184.     {
  185.         return $this->isActive;
  186.     }
  187.     public function setIsActive(bool $isActive): self
  188.     {
  189.         $this->isActive $isActive;
  190.         return $this;
  191.     }
  192.     public function getContent(): ?array
  193.     {
  194.         return $this->content;
  195.     }
  196.     public function setContent(array $content): self
  197.     {
  198.         $this->content $content;
  199.         return $this;
  200.     }
  201.     public function getLanguageCode(): ?string
  202.     {
  203.         return $this->languageCode;
  204.     }
  205.     public function setLanguageCode(?string $languageCode): self
  206.     {
  207.         $this->languageCode $languageCode;
  208.         return $this;
  209.     }
  210.     public function getCreatedDate(): ?\DateTimeInterface
  211.     {
  212.         return $this->createdDate;
  213.     }
  214.     public function setCreatedDate(\DateTimeInterface $createdDate): self
  215.     {
  216.         $this->createdDate $createdDate;
  217.         return $this;
  218.     }
  219.     public function getUpdatedDate(): ?\DateTimeInterface
  220.     {
  221.         return $this->updatedDate;
  222.     }
  223.     public function setUpdatedDate(\DateTimeInterface $updatedDate): self
  224.     {
  225.         $this->updatedDate $updatedDate;
  226.         return $this;
  227.     }
  228.     public function getCreatedBy(): ?StdUsers
  229.     {
  230.         return $this->createdBy;
  231.     }
  232.     public function setCreatedBy(?StdUsers $createdBy): self
  233.     {
  234.         $this->createdBy $createdBy;
  235.         return $this;
  236.     }
  237.     public function getUpdatedBy(): ?StdUsers
  238.     {
  239.         return $this->updatedBy;
  240.     }
  241.     public function setUpdatedBy(?StdUsers $updatedBy): self
  242.     {
  243.         $this->updatedBy $updatedBy;
  244.         return $this;
  245.     }
  246.     public function getRoles(): ?array
  247.     {
  248.         return $this->roles;
  249.     }
  250.     public function setRoles(array $roles): self
  251.     {
  252.         foreach ($roles as  $value) {
  253.             $data[] = $value->getName();
  254.         }
  255.         $this->roles $data;
  256.         return $this;
  257.     }
  258. }