src/Admin/Entity/StdOptions.php line 16

Open in your IDE?
  1. <?php
  2. namespace App\Admin\Entity;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\Common\Collections\Collection;
  5. use Doctrine\ORM\Mapping as ORM;
  6. /**
  7.  * StdOptions
  8.  */
  9. #[ORM\Table(name'std_options')]
  10. #[ORM\Index(name'fk_std_options_std_users'columns: ['created_by'])]
  11. #[ORM\Index(name'fk_std_options_std_users_0'columns: ['updated_by'])]
  12. #[ORM\Entity]
  13. class StdOptions
  14. {
  15.     /**
  16.      * @var int
  17.      */
  18.     #[ORM\Column(name'id'type'integer'nullablefalseoptions: ['unsigned' => true'comment' => 'Unique identifier'])]
  19.     #[ORM\Id]
  20.     #[ORM\GeneratedValue(strategy'IDENTITY')]
  21.     private $id;
  22.     /**
  23.      * @var string
  24.      */
  25.     #[ORM\Column(name'machine_name'type'string'length50nullablefalseoptions: ['comment' => 'Unique code used in the programming to identify the option'])]
  26.     private $machineName;
  27.     /**
  28.      * @var string|null
  29.      */
  30.     #[ORM\Column(name'name'type'string'length255nullabletrueoptions: ['comment' => 'Name of the Option'])]
  31.     private $name;
  32.     /**
  33.      * @var string|null
  34.      */
  35.     #[ORM\Column(name'menu_section'type'string'length255nullabletrueoptions: ['comment' => 'Section of the option in the sidebar'])]
  36.     private $menuSection;
  37.     /**
  38.      * @var string|null
  39.      */
  40.     #[ORM\Column(name'icon'type'string'length255nullabletrueoptions: ['comment' => 'Icon of the option in the sidebar'])]
  41.     private $icon;
  42.     /**
  43.      * @var string|null
  44.      */
  45.     #[ORM\Column(name'dropdown_section'type'string'length255nullabletrueoptions: ['comment' => 'Section of the option in the sidebar'])]
  46.     private $dropdownSection;
  47.     /**
  48.      * @var int|null
  49.      */
  50.     #[ORM\Column(name'order_value'type'integer'nullabletrueoptions: ['comment' => 'Order of the option on the menu'])]
  51.     private $orderValue '0';
  52.     /**
  53.      * @var string|null
  54.      */
  55.     #[ORM\Column(name'external_link'type'string'length255nullabletrueoptions: ['comment' => 'Url of the option'])]
  56.     private $externalLink;
  57.     #[ORM\Column(name'path'type'string'length255nullabletrueoptions: ['comment' => 'Url of the option'])]
  58.     private $path;
  59.     /**
  60.      * @var bool|null
  61.      */
  62.     #[ORM\Column(name'is_active'type'boolean'nullabletrueoptions: ['default' => 1'comment' => 'Flag indicating if the option 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 null;
  80.     /**
  81.      * @var \StdUsers
  82.      */
  83.     #[ORM\JoinColumn(name'updated_by'referencedColumnName'id')]
  84.     #[ORM\ManyToOne(targetEntity'StdUsers')]
  85.     private $updatedBy;
  86.     #[ORM\OneToMany(mappedBy'option'targetEntityStdOptionsPermissions::class, cascade: ['persist''remove'], orphanRemovaltrue)]
  87.     private Collection $permissions;
  88.     public function __construct()
  89.     {
  90.         $this->permissions = new ArrayCollection();
  91.     }
  92.     public function getId(): ?int
  93.     {
  94.         return $this->id;
  95.     }
  96.     public function getMachineName(): ?string
  97.     {
  98.         return $this->machineName;
  99.     }
  100.     public function setMachineName(string $machineName): self
  101.     {
  102.         $this->machineName $machineName;
  103.         return $this;
  104.     }
  105.     public function getOrderValue(): ?int
  106.     {
  107.         return $this->orderValue;
  108.     }
  109.     public function setOrderValue(?int $orderValue): self
  110.     {
  111.         $this->orderValue $orderValue;
  112.         return $this;
  113.     }
  114.     public function getIsActive(): ?bool
  115.     {
  116.         return $this->isActive;
  117.     }
  118.     public function setIsActive(?bool $isActive): self
  119.     {
  120.         $this->isActive $isActive;
  121.         return $this;
  122.     }
  123.     public function getCreatedDate(): ?\DateTimeInterface
  124.     {
  125.         return $this->createdDate;
  126.     }
  127.     public function setCreatedDate(\DateTimeInterface $createdDate): self
  128.     {
  129.         $this->createdDate $createdDate;
  130.         return $this;
  131.     }
  132.     public function getUpdatedDate(): ?\DateTimeInterface
  133.     {
  134.         return $this->updatedDate;
  135.     }
  136.     public function setUpdatedDate(\DateTimeInterface $updatedDate): self
  137.     {
  138.         $this->updatedDate $updatedDate;
  139.         return $this;
  140.     }
  141.     public function getCreatedBy(): ?StdUsers
  142.     {
  143.         return $this->createdBy;
  144.     }
  145.     public function setCreatedBy(?StdUsers $createdBy): self
  146.     {
  147.         $this->createdBy $createdBy;
  148.         return $this;
  149.     }
  150.     public function getUpdatedBy(): ?StdUsers
  151.     {
  152.         return $this->updatedBy;
  153.     }
  154.     public function setUpdatedBy(?StdUsers $updatedBy): self
  155.     {
  156.         $this->updatedBy $updatedBy;
  157.         return $this;
  158.     }
  159.     public function getExternalLink(): ?string
  160.     {
  161.         return $this->externalLink;
  162.     }
  163.     public function setExternalLink(?string $externalLink): self
  164.     {
  165.         $this->externalLink $externalLink;
  166.         return $this;
  167.     }
  168.     public function getPath(): ?string
  169.     {
  170.         return $this->path;
  171.     }
  172.     public function setPath(?string $path): self
  173.     {
  174.         $this->path $path;
  175.         return $this;
  176.     }
  177.     public function getPermissions(): Collection
  178.     {
  179.         return $this->permissions;
  180.     }
  181.     public function setPermissions(Collection $permissions): void
  182.     {
  183.         $this->permissions $permissions;
  184.     }
  185.     public function getName(): ?string
  186.     {
  187.         return $this->name;
  188.     }
  189.     public function setName(?string $name): void
  190.     {
  191.         $this->name $name;
  192.     }
  193.     public function getMenuSection(): ?string
  194.     {
  195.         return $this->menuSection;
  196.     }
  197.     public function setMenuSection(?string $menuSection): void
  198.     {
  199.         $this->menuSection $menuSection;
  200.     }
  201.     public function getDropdownSection(): ?string
  202.     {
  203.         return $this->dropdownSection;
  204.     }
  205.     public function setDropdownSection(?string $dropdownSection): void
  206.     {
  207.         $this->dropdownSection $dropdownSection;
  208.     }
  209.     public function getIcon(): ?string
  210.     {
  211.         return $this->icon;
  212.     }
  213.     public function setIcon(?string $icon): void
  214.     {
  215.         $this->icon $icon;
  216.     }
  217. }