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(repositoryClass: TraineeRepository::class)]
  8. class Trainee
  9. {
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column]
  13.     private ?int $id = null;
  14.     #[ORM\Column(length: 180, nullable: false)]
  15.     private ?string $email = null;
  16.     #[ORM\Column(length: 255, nullable: true)]
  17.     private ?string $firstName = null;
  18.     #[ORM\Column(length: 255, nullable: true)]
  19.     private ?string $lastName = null;
  20.     #[ORM\Column(length: 70, nullable: true)]
  21.     private ?string $civility = null;
  22.     #[ORM\Column(length: 100, nullable: true)]
  23.     private ?string $position = null;
  24.     #[ORM\Column(length: 60, nullable: true)]
  25.     private ?string $tel = null;
  26.     #[ORM\ManyToOne(targetEntity: Customer::class, cascade: ["remove","persist"], inversedBy: "trainee")]
  27.     private ?Customer $customer = null;
  28.     #[ORM\Column(type: Types::DATETIME_MUTABLE, nullable: true)]
  29.     private ?\DateTimeInterface $dateAdd = null;
  30.     #[ORM\Column(length: 150, nullable: true)]
  31.     private ?string $fonction = null;
  32.     #[ORM\Column(length: 150, nullable: true)]
  33.     private ?string $entreprise = null;
  34.     #[ORM\Column(type: Types::TEXT, nullable: true)]
  35.     private ?string $comments = null;
  36.     public function getId(): ?int
  37.     {
  38.         return $this->id;
  39.     }
  40.     public function getEmail(): ?string
  41.     {
  42.         return $this->email;
  43.     }
  44.     public function setEmail(string $email): self
  45.     {
  46.         $this->email = $email;
  47.         return $this;
  48.     }
  49.     public function getUserIdentifier(): string
  50.     {
  51.         return (string) $this->id;
  52.     }
  53.     public function getFirstName(): ?string
  54.     {
  55.         return $this->firstName;
  56.     }
  57.     public function setFirstName(?string $firstName): self
  58.     {
  59.         $this->firstName = $firstName;
  60.         return $this;
  61.     }
  62.     public function getLastName(): ?string
  63.     {
  64.         return $this->lastName;
  65.     }
  66.     public function setLastName(?string $lastName): self
  67.     {
  68.         $this->lastName = $lastName;
  69.         return $this;
  70.     }
  71.     public function getCivility(): ?string
  72.     {
  73.         return $this->civility;
  74.     }
  75.     public function setCivility(?string $civility): self
  76.     {
  77.         $this->civility = $civility;
  78.         return $this;
  79.     }
  80.     public function getPosition(): ?string
  81.     {
  82.         return $this->position;
  83.     }
  84.     public function setPosition(?string $position): self
  85.     {
  86.         $this->position = $position;
  87.         return $this;
  88.     }
  89.     public function getTel(): ?string
  90.     {
  91.         return $this->tel;
  92.     }
  93.     public function setTel(?string $tel): self
  94.     {
  95.         $this->tel = $tel;
  96.         return $this;
  97.     }
  98.     public function getFonction(): ?string
  99.     {
  100.         return $this->fonction;
  101.     }
  102.     public function setFonction(?string $fonction): self
  103.     {
  104.         $this->fonction = $fonction;
  105.         return $this;
  106.     }
  107.     public function getEntreprise(): ?string
  108.     {
  109.         return $this->entreprise;
  110.     }
  111.     public function setEntreprise(?string $entreprise): self
  112.     {
  113.         $this->entreprise = $entreprise;
  114.         return $this;
  115.     }
  116.     public function getComments(): ?string
  117.     {
  118.         return $this->comments;
  119.     }
  120.     public function setComments(?string $comments): self
  121.     {
  122.         $this->comments = $comments;
  123.         return $this;
  124.     }
  125.     // getter and setter methods
  126.     public function getCustomer(): ?Customer
  127.     {
  128.         return $this->customer;
  129.     }
  130.     public function setCustomer(Customer $customer): self
  131.     {
  132.         $this->customer = $customer;
  133.         return $this;
  134.     }
  135.     public function removeCustomer(Customer $customer): self
  136.     {
  137.         $this->customer = null;
  138.         return $this;
  139.     }
  140. }