src/Entity/EmployeeRepCode.php line 13

  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\EmployeeRepCodeRepository;
  4. use Doctrine\DBAL\Types\Types;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Gedmo\Timestampable\Traits\TimestampableEntity;
  7. #[ORM\Entity(repositoryClassEmployeeRepCodeRepository::class)]
  8. #[ORM\Index(columns: ["rep_code""employee_id""effective_start_date""effective_end_date"], name"idx_employee_rep_code")]
  9. #[ORM\Index(columns: ['rep_code'], name'idx_employee_rep_code_only')]
  10. class EmployeeRepCode
  11. {
  12.     use TimestampableEntity;
  13.     #[ORM\Id]
  14.     #[ORM\GeneratedValue]
  15.     #[ORM\Column]
  16.     private ?int $id null;
  17.     #[ORM\Column(length255)]
  18.     private ?string $repCode null;
  19.     #[ORM\Column(length255)]
  20.     private ?string $employeeID null;
  21.     #[ORM\Column(typeTypes::DATE_MUTABLEnullabletrue)]
  22.     private ?\DateTimeInterface $effectiveStartDate null;
  23.     #[ORM\Column(typeTypes::DATE_MUTABLEnullabletrue)]
  24.     private ?\DateTimeInterface $effectiveEndDate null;
  25.     #[ORM\ManyToOne(inversedBy'employeeRepCodes'fetch'EAGER')]
  26.     private ?User $user null;
  27.     public function getId(): ?int
  28.     {
  29.         return $this->id;
  30.     }
  31.     public function getRepCode(): ?string
  32.     {
  33.         return $this->repCode;
  34.     }
  35.     public function setRepCode(string $repCode): self
  36.     {
  37.         $this->repCode $repCode;
  38.         return $this;
  39.     }
  40.     public function getEmployeeID(): ?string
  41.     {
  42.         return $this->employeeID;
  43.     }
  44.     public function setEmployeeID(string $employeeID): self
  45.     {
  46.         $this->employeeID $employeeID;
  47.         return $this;
  48.     }
  49.     public function getEffectiveStartDate(): ?\DateTimeInterface
  50.     {
  51.         return $this->effectiveStartDate;
  52.     }
  53.     public function setEffectiveStartDate(?\DateTimeInterface $effectiveStartDate): static
  54.     {
  55.         $this->effectiveStartDate $effectiveStartDate;
  56.         return $this;
  57.     }
  58.     public function getEffectiveEndDate(): ?\DateTimeInterface
  59.     {
  60.         return $this->effectiveEndDate;
  61.     }
  62.     public function setEffectiveEndDate(?\DateTimeInterface $effectiveEndDate): static
  63.     {
  64.         $this->effectiveEndDate $effectiveEndDate;
  65.         return $this;
  66.     }
  67.     public function getUser(): ?User
  68.     {
  69.         return $this->user;
  70.     }
  71.     public function setUser(?User $user): static
  72.     {
  73.         $this->user $user;
  74.         return $this;
  75.     }
  76. }