src/Entity/Trainee.php line 11

  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\TraineeRepository;
  4. use Doctrine\DBAL\Types\Types;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use http\Client;
  7. #[ORM\Entity(repositoryClassTraineeRepository::class)]
  8. class Trainee
  9. {
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column]
  13.     private ?int $id null;
  14.     #[ORM\Column(length180nullablefalse)]
  15.     private ?string $email null;
  16.     #[ORM\Column(length255nullabletrue)]
  17.     private ?string $firstName null;
  18.     #[ORM\Column(length255nullabletrue)]
  19.     private ?string $lastName null;
  20.     #[ORM\Column(length70nullabletrue)]
  21.     private ?string $civility null;
  22.     #[ORM\Column(length100nullabletrue)]
  23.     private ?string $position null;
  24.     #[ORM\Column(length60nullabletrue)]
  25.     private ?string $tel null;
  26.     #[ORM\ManyToOne(targetEntityCustomer::class, cascade: ["remove","persist"], inversedBy"trainee")]
  27.     private ?Customer $customer null;
  28.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  29.     private ?\DateTimeInterface $dateAdd null;
  30.     public function getId(): ?int
  31.     {
  32.         return $this->id;
  33.     }
  34.     public function getEmail(): ?string
  35.     {
  36.         return $this->email;
  37.     }
  38.     public function setEmail(string $email): self
  39.     {
  40.         $this->email $email;
  41.         return $this;
  42.     }
  43.     public function getUserIdentifier(): string
  44.     {
  45.         return (string) $this->id;
  46.     }
  47.     public function getFirstName(): ?string
  48.     {
  49.         return $this->firstName;
  50.     }
  51.     public function setFirstName(?string $firstName): self
  52.     {
  53.         $this->firstName $firstName;
  54.         return $this;
  55.     }
  56.     public function getLastName(): ?string
  57.     {
  58.         return $this->lastName;
  59.     }
  60.     public function setLastName(?string $lastName): self
  61.     {
  62.         $this->lastName $lastName;
  63.         return $this;
  64.     }
  65.     public function getCivility(): ?string
  66.     {
  67.         return $this->civility;
  68.     }
  69.     public function setCivility(?string $civility): self
  70.     {
  71.         $this->civility $civility;
  72.         return $this;
  73.     }
  74.     public function getPosition(): ?string
  75.     {
  76.         return $this->position;
  77.     }
  78.     public function setPosition(?string $position): self
  79.     {
  80.         $this->position $position;
  81.         return $this;
  82.     }
  83.     public function getTel(): ?string
  84.     {
  85.         return $this->tel;
  86.     }
  87.     public function setTel(?string $tel): self
  88.     {
  89.         $this->tel $tel;
  90.         return $this;
  91.     }
  92.     // getter and setter methods
  93.     public function getCustomer(): ?Customer
  94.     {
  95.         return $this->customer;
  96.     }
  97.     public function setCustomer(Customer $customer): self
  98.     {
  99.         $this->customer $customer;
  100.         return $this;
  101.     }
  102.     public function removeCustomer(Customer $customer): self
  103.     {
  104.         $this->customer null;
  105.         return $this;
  106.     }
  107. }