src/Entity/UserPreInscription.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\UserPreInscriptionRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassUserPreInscriptionRepository::class)]
  8. class UserPreInscription
  9. {
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column]
  13.     private ?int $id null;
  14.     #[ORM\Column(length255)]
  15.     private ?string $firstName null;
  16.     #[ORM\Column(length255)]
  17.     private ?string $lastName null;
  18.     #[ORM\Column(length255)]
  19.     private ?string $sexe null;
  20.     #[ORM\Column(length255)]
  21.     private ?string $phone null;
  22.     #[ORM\OneToMany(mappedBy'parent'targetEntityStudentPreInscription::class)]
  23.     private Collection $studentPreInscriptions;
  24.     #[ORM\Column(length255nullabletrue)]
  25.     private ?string $email null;
  26.     #[ORM\Column(length255nullabletrue)]
  27.     private ?string $password null;
  28.     #[ORM\Column(nullabletrue)]
  29.     private ?int $status null;
  30.     public function __construct()
  31.     {
  32.         $this->studentPreInscriptions = new ArrayCollection();
  33.     }
  34.     public function getId(): ?int
  35.     {
  36.         return $this->id;
  37.     }
  38.     public function getFullName():string
  39.     {
  40.         return  $this->lastName.' '.$this->firstName;
  41.     }
  42.     public function __toString(): string
  43.     {
  44.         return $this->getFullName();
  45.     }
  46.     public function getFirstName(): ?string
  47.     {
  48.         return $this->firstName;
  49.     }
  50.     public function setFirstName(string $firstName): static
  51.     {
  52.         $this->firstName $firstName;
  53.         return $this;
  54.     }
  55.     public function getLastName(): ?string
  56.     {
  57.         return $this->lastName;
  58.     }
  59.     public function setLastName(string $lastName): static
  60.     {
  61.         $this->lastName $lastName;
  62.         return $this;
  63.     }
  64.     public function getSexe(): ?string
  65.     {
  66.         return $this->sexe;
  67.     }
  68.     public function setSexe(string $sexe): static
  69.     {
  70.         $this->sexe $sexe;
  71.         return $this;
  72.     }
  73.     public function getPhone(): ?string
  74.     {
  75.         return $this->phone;
  76.     }
  77.     public function setPhone(string $phone): static
  78.     {
  79.         $this->phone $phone;
  80.         return $this;
  81.     }
  82.     /**
  83.      * @return Collection<int, StudentPreInscription>
  84.      */
  85.     public function getStudentPreInscriptions(): Collection
  86.     {
  87.         return $this->studentPreInscriptions;
  88.     }
  89.     public function addStudentPreInscription(StudentPreInscription $studentPreInscription): static
  90.     {
  91.         if (!$this->studentPreInscriptions->contains($studentPreInscription)) {
  92.             $this->studentPreInscriptions->add($studentPreInscription);
  93.             $studentPreInscription->setParent($this);
  94.         }
  95.         return $this;
  96.     }
  97.     public function removeStudentPreInscription(StudentPreInscription $studentPreInscription): static
  98.     {
  99.         if ($this->studentPreInscriptions->removeElement($studentPreInscription)) {
  100.             // set the owning side to null (unless already changed)
  101.             if ($studentPreInscription->getParent() === $this) {
  102.                 $studentPreInscription->setParent(null);
  103.             }
  104.         }
  105.         return $this;
  106.     }
  107.     public function getEmail(): ?string
  108.     {
  109.         return $this->email;
  110.     }
  111.     public function setEmail(?string $email): static
  112.     {
  113.         $this->email $email;
  114.         return $this;
  115.     }
  116.     public function getPassword(): ?string
  117.     {
  118.         return $this->password;
  119.     }
  120.     public function setPassword(?string $password): static
  121.     {
  122.         $this->password $password;
  123.         return $this;
  124.     }
  125.     public function getStatus(): ?int
  126.     {
  127.         return $this->status;
  128.     }
  129.     public function setStatus(?int $status): static
  130.     {
  131.         $this->status $status;
  132.         return $this;
  133.     }
  134. }