src/Entity/Registrations.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\RegistrationsRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=RegistrationsRepository::class)
  9.  */
  10. class Registrations
  11. {
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\Column(type="string", length=255, nullable=true)
  20.      */
  21.     private $fname;
  22.     /**
  23.      * @ORM\Column(type="string", length=255, nullable=true)
  24.      */
  25.     private $lname;
  26.     /**
  27.      * @ORM\Column(type="boolean", nullable=true)
  28.      */
  29.     private $sex;
  30.     /**
  31.      * @ORM\Column(type="string", length=255, nullable=true)
  32.      */
  33.     private $phone;
  34.     /**
  35.      * @ORM\Column(type="string", length=255, nullable=true)
  36.      */
  37.     private $email;
  38.     /**
  39.      * @ORM\ManyToOne(targetEntity=RegistrationsProfessions::class)
  40.      */
  41.     private $profession;
  42.     /**
  43.      * @ORM\ManyToOne(targetEntity=RegistrationsCompaniesTypes::class)
  44.      */
  45.     private $company;
  46.     /**
  47.      * @ORM\ManyToOne(targetEntity=Formations::class, inversedBy="registrations")
  48.      */
  49.     private $formation;
  50.     /**
  51.      * @ORM\ManyToMany(targetEntity=FormationsThematics::class, inversedBy="registrations")
  52.      */
  53.     private $thematics;
  54.     /**
  55.      * @ORM\Column(type="datetime", nullable=true)
  56.      */
  57.     private $date;
  58.     /**
  59.      * @ORM\ManyToOne(targetEntity=FormationsSessions::class, inversedBy="registrations")
  60.      */
  61.     private $session;
  62.     /**
  63.      * @ORM\ManyToOne(targetEntity=RegistrationsStatus::class, inversedBy="registrations")
  64.      */
  65.     private $status;
  66.     /**
  67.      * @ORM\Column(type="datetime", nullable=true)
  68.      */
  69.     private $closingDate;
  70.     /**
  71.      * @ORM\Column(type="string", length=255, nullable=true)
  72.      */
  73.     private $code;
  74.     /**
  75.      * @ORM\Column(type="string", length=255, nullable=true)
  76.      */
  77.     private $ip;
  78.     public function __construct()
  79.     {
  80.         $this->thematics = new ArrayCollection();
  81.     }
  82.     public function getId(): ?int
  83.     {
  84.         return $this->id;
  85.     }
  86.     public function getFname(): ?string
  87.     {
  88.         return $this->fname;
  89.     }
  90.     public function setFname(?string $fname): self
  91.     {
  92.         $this->fname $fname;
  93.         return $this;
  94.     }
  95.     public function getLname(): ?string
  96.     {
  97.         return $this->lname;
  98.     }
  99.     public function setLname(?string $lname): self
  100.     {
  101.         $this->lname $lname;
  102.         return $this;
  103.     }
  104.     public function getSex(): ?bool
  105.     {
  106.         return $this->sex;
  107.     }
  108.     public function setSex(?bool $sex): self
  109.     {
  110.         $this->sex $sex;
  111.         return $this;
  112.     }
  113.     public function getPhone(): ?string
  114.     {
  115.         return $this->phone;
  116.     }
  117.     public function setPhone(?string $phone): self
  118.     {
  119.         $this->phone $phone;
  120.         return $this;
  121.     }
  122.     public function getEmail(): ?string
  123.     {
  124.         return $this->email;
  125.     }
  126.     public function setEmail(?string $email): self
  127.     {
  128.         $this->email $email;
  129.         return $this;
  130.     }
  131.     public function getProfession(): ?RegistrationsProfessions
  132.     {
  133.         return $this->profession;
  134.     }
  135.     public function setProfession(?RegistrationsProfessions $profession): self
  136.     {
  137.         $this->profession $profession;
  138.         return $this;
  139.     }
  140.     public function getCompany(): ?RegistrationsCompaniesTypes
  141.     {
  142.         return $this->company;
  143.     }
  144.     public function setCompany(?RegistrationsCompaniesTypes $company): self
  145.     {
  146.         $this->company $company;
  147.         return $this;
  148.     }
  149.     public function getFormation(): ?Formations
  150.     {
  151.         return $this->formation;
  152.     }
  153.     public function setFormation(?Formations $formation): self
  154.     {
  155.         $this->formation $formation;
  156.         return $this;
  157.     }
  158.     /**
  159.      * @return Collection<int, FormationsThematics>
  160.      */
  161.     public function getThematics(): Collection
  162.     {
  163.         return $this->thematics;
  164.     }
  165.     public function addThematic(FormationsThematics $thematic): self
  166.     {
  167.         if (!$this->thematics->contains($thematic)) {
  168.             $this->thematics[] = $thematic;
  169.         }
  170.         return $this;
  171.     }
  172.     public function removeThematic(FormationsThematics $thematic): self
  173.     {
  174.         $this->thematics->removeElement($thematic);
  175.         return $this;
  176.     }
  177.     public function getDate(): ?\DateTimeInterface
  178.     {
  179.         return $this->date;
  180.     }
  181.     public function setDate(?\DateTimeInterface $date): self
  182.     {
  183.         $this->date $date;
  184.         return $this;
  185.     }
  186.     public function getSession(): ?FormationsSessions
  187.     {
  188.         return $this->session;
  189.     }
  190.     public function setSession(?FormationsSessions $session): self
  191.     {
  192.         $this->session $session;
  193.         return $this;
  194.     }
  195.     public function getStatus(): ?RegistrationsStatus
  196.     {
  197.         return $this->status;
  198.     }
  199.     public function setStatus(?RegistrationsStatus $status): self
  200.     {
  201.         $this->status $status;
  202.         return $this;
  203.     }
  204.     public function getClosingDate(): ?\DateTimeInterface
  205.     {
  206.         return $this->closingDate;
  207.     }
  208.     public function setClosingDate(\DateTimeInterface $closingDate): self
  209.     {
  210.         $this->closingDate $closingDate;
  211.         return $this;
  212.     }
  213.     public function getCode(): ?string
  214.     {
  215.         return $this->code;
  216.     }
  217.     public function setCode(?string $code): self
  218.     {
  219.         $this->code $code;
  220.         return $this;
  221.     }
  222.     public function getIp(): ?string
  223.     {
  224.         return $this->ip;
  225.     }
  226.     public function setIp(?string $ip): self
  227.     {
  228.         $this->ip $ip;
  229.         return $this;
  230.     }
  231.     public function getName(): string
  232.     {
  233.         return $this->getLname()." ".$this->getFname();
  234.     }
  235. }