src/Admin/Entity/StdOptionsPermissions.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Admin\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5.  * StdOptionsPermissions
  6.  */
  7. #[ORM\Table(name'std_options_permissions')]
  8. #[ORM\Index(name'fk_std_options_permissions_std_users'columns: ['created_by'])]
  9. #[ORM\Index(name'fk_std_options_permissions_std_options'columns: ['option_id'])]
  10. #[ORM\Index(name'fk_std_options_permissions_std_users_0'columns: ['updated_by'])]
  11. #[ORM\Entity]
  12. class StdOptionsPermissions
  13. {
  14.     /**
  15.      * @var int
  16.      */
  17.     #[ORM\Column(name'id'type'integer'nullablefalseoptions: ['unsigned' => true'comment' => 'Unique identifier'])]
  18.     #[ORM\Id]
  19.     #[ORM\GeneratedValue(strategy'IDENTITY')]
  20.     private $id;
  21.     /**
  22.      * @var string|null
  23.      */
  24.     #[ORM\Column(name'machine_name'type'string'length50nullabletrueoptions: ['comment' => 'Code used in the programming to identify the option permission'])]
  25.     private $machineName;
  26.     /**
  27.      * @var string|null
  28.      */
  29.     #[ORM\Column(name'name'type'string'length50nullabletrueoptions: ['comment' => 'Name of the Feature'])]
  30.     private $name;
  31.     #[ORM\Column(type'string'length255)]
  32.     private $description;
  33.     /**
  34.      * @var int|null
  35.      */
  36.     #[ORM\Column(name'bits'type'integer'nullabletrueoptions: ['unsigned' => true'comment' => 'Value of the Feature - it has to be a power of 2 and unique for the option'])]
  37.     private $bits;
  38.     /**
  39.      * @var int|null
  40.      */
  41.     #[ORM\Column(name'order_value'type'integer'nullabletrueoptions: ['comment' => 'Order of the Feature'])]
  42.     private $orderValue '0';
  43.     /**
  44.      * @var \DateTime
  45.      */
  46.     #[ORM\Column(name'created_date'type'datetime'nullablefalseoptions: ['default' => 'CURRENT_TIMESTAMP''comment' => 'Date and time of the record creation'])]
  47.     private $createdDate 'CURRENT_TIMESTAMP';
  48.     /**
  49.      * @var \DateTime
  50.      */
  51.     #[ORM\Column(name'updated_date'type'datetime'nullablefalseoptions: ['default' => 'CURRENT_TIMESTAMP''comment' => 'Date and time the record was last updated'])]
  52.     private $updatedDate 'CURRENT_TIMESTAMP';
  53.     /**
  54.      * @var \StdOptions
  55.      */
  56.     #[ORM\ManyToOne(targetEntityStdOptions::class, inversedBy'permissions')]
  57.     #[ORM\JoinColumn(name'option_id'referencedColumnName'id'nullablefalse)]
  58.     private $option null;
  59.     /**
  60.      * @var \StdUsers
  61.      */
  62.     #[ORM\JoinColumn(name'created_by'referencedColumnName'id')]
  63.     #[ORM\ManyToOne(targetEntity'StdUsers')]
  64.     private $createdBy;
  65.     /**
  66.      * @var \StdUsers
  67.      */
  68.     #[ORM\JoinColumn(name'updated_by'referencedColumnName'id')]
  69.     #[ORM\ManyToOne(targetEntity'StdUsers')]
  70.     private $updatedBy;
  71.     public function getId(): ?int
  72.     {
  73.         return $this->id;
  74.     }
  75.     public function getMachineName(): ?string
  76.     {
  77.         return $this->machineName;
  78.     }
  79.     public function setMachineName(?string $machineName): self
  80.     {
  81.         $this->machineName $machineName;
  82.         return $this;
  83.     }
  84.     public function getName(): ?string
  85.     {
  86.         return $this->name;
  87.     }
  88.     public function setName(?string $name): self
  89.     {
  90.         $this->name $name;
  91.         return $this;
  92.     }
  93.     public function getBits(): ?int
  94.     {
  95.         return $this->bits;
  96.     }
  97.     public function setBits(?int $value): self
  98.     {
  99.         $this->bits $value;
  100.         return $this;
  101.     }
  102.     public function getOrderValue(): ?int
  103.     {
  104.         return $this->orderValue;
  105.     }
  106.     public function setOrderValue(?int $orderValue): self
  107.     {
  108.         $this->orderValue $orderValue;
  109.         return $this;
  110.     }
  111.     public function getCreatedDate(): ?\DateTimeInterface
  112.     {
  113.         return $this->createdDate;
  114.     }
  115.     public function setCreatedDate(\DateTimeInterface $createdDate): self
  116.     {
  117.         $this->createdDate $createdDate;
  118.         return $this;
  119.     }
  120.     public function getUpdatedDate(): ?\DateTimeInterface
  121.     {
  122.         return $this->updatedDate;
  123.     }
  124.     public function setUpdatedDate(\DateTimeInterface $updatedDate): self
  125.     {
  126.         $this->updatedDate $updatedDate;
  127.         return $this;
  128.     }
  129.     public function getOption(): ?StdOptions
  130.     {
  131.         return $this->option;
  132.     }
  133.     public function setOption(?StdOptions $option): self
  134.     {
  135.         $this->option $option;
  136.         return $this;
  137.     }
  138.     public function getCreatedBy(): ?StdUsers
  139.     {
  140.         return $this->createdBy;
  141.     }
  142.     public function setCreatedBy(?StdUsers $createdBy): self
  143.     {
  144.         $this->createdBy $createdBy;
  145.         return $this;
  146.     }
  147.     public function getUpdatedBy(): ?StdUsers
  148.     {
  149.         return $this->updatedBy;
  150.     }
  151.     public function setUpdatedBy(?StdUsers $updatedBy): self
  152.     {
  153.         $this->updatedBy $updatedBy;
  154.         return $this;
  155.     }
  156.     /**
  157.      * @return mixed
  158.      */
  159.     public function getDescription()
  160.     {
  161.         return $this->description;
  162.     }
  163.     /**
  164.      * @param mixed $description
  165.      */
  166.     public function setDescription($description): void
  167.     {
  168.         $this->description $description;
  169.     }
  170. }