src/Entity/EmployeeToCustomer.php line 12

  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\EmployeeToCustomerRepository;
  4. use Doctrine\DBAL\Types\Types;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Gedmo\Timestampable\Traits\TimestampableEntity;
  7. #[ORM\Entity(repositoryClassEmployeeToCustomerRepository::class)]
  8. #[ORM\Index(columns: ["customer_id""rep_code""effective_start_date""effective_end_date"], name"idx_employee_to_customer")]
  9. class EmployeeToCustomer
  10. {
  11.     use TimestampableEntity;
  12.     #[ORM\Id]
  13.     #[ORM\GeneratedValue]
  14.     #[ORM\Column]
  15.     private ?int $id null;
  16.     #[ORM\Column(length255)]
  17.     private ?string $customer_id null;
  18.     #[ORM\Column(length255)]
  19.     private string $repCode;
  20.     #[ORM\Column(typeTypes::DATE_MUTABLEnullabletrue)]
  21.     private ?\DateTimeInterface $effectiveStartDate null;
  22.     #[ORM\Column(typeTypes::DATE_MUTABLEnullabletrue)]
  23.     private ?\DateTimeInterface $effectiveEndDate null;
  24.     public function getId(): ?int
  25.     {
  26.         return $this->id;
  27.     }
  28.     public function getCustomerId(): ?string
  29.     {
  30.         return $this->customer_id;
  31.     }
  32.     public function setCustomerId(string $customer_id): self
  33.     {
  34.         $this->customer_id $customer_id;
  35.         return $this;
  36.     }
  37.     public function getRepCode(): string
  38.     {
  39.         return $this->repCode;
  40.     }
  41.     public function setRepCode(string $repCode): self
  42.     {
  43.         $this->repCode $repCode;
  44.         return $this;
  45.     }
  46.     public function getEffectiveStartDate(): ?\DateTimeInterface
  47.     {
  48.         return $this->effectiveStartDate;
  49.     }
  50.     public function setEffectiveStartDate(?\DateTimeInterface $effectiveStartDate): static
  51.     {
  52.         $this->effectiveStartDate $effectiveStartDate;
  53.         return $this;
  54.     }
  55.     public function getEffectiveEndDate(): ?\DateTimeInterface
  56.     {
  57.         return $this->effectiveEndDate;
  58.     }
  59.     public function setEffectiveEndDate(?\DateTimeInterface $effectiveEndDate): static
  60.     {
  61.         $this->effectiveEndDate $effectiveEndDate;
  62.         return $this;
  63.     }
  64. }