<?php
namespace App\Entity;
use App\Repository\RegistrationsRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=RegistrationsRepository::class)
*/
class Registrations
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $fname;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $lname;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $sex;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $phone;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $email;
/**
* @ORM\ManyToOne(targetEntity=RegistrationsProfessions::class)
*/
private $profession;
/**
* @ORM\ManyToOne(targetEntity=RegistrationsCompaniesTypes::class)
*/
private $company;
/**
* @ORM\ManyToOne(targetEntity=Formations::class, inversedBy="registrations")
*/
private $formation;
/**
* @ORM\ManyToMany(targetEntity=FormationsThematics::class, inversedBy="registrations")
*/
private $thematics;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $date;
/**
* @ORM\ManyToOne(targetEntity=FormationsSessions::class, inversedBy="registrations")
*/
private $session;
/**
* @ORM\ManyToOne(targetEntity=RegistrationsStatus::class, inversedBy="registrations")
*/
private $status;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $closingDate;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $code;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $ip;
public function __construct()
{
$this->thematics = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getFname(): ?string
{
return $this->fname;
}
public function setFname(?string $fname): self
{
$this->fname = $fname;
return $this;
}
public function getLname(): ?string
{
return $this->lname;
}
public function setLname(?string $lname): self
{
$this->lname = $lname;
return $this;
}
public function getSex(): ?bool
{
return $this->sex;
}
public function setSex(?bool $sex): self
{
$this->sex = $sex;
return $this;
}
public function getPhone(): ?string
{
return $this->phone;
}
public function setPhone(?string $phone): self
{
$this->phone = $phone;
return $this;
}
public function getEmail(): ?string
{
return $this->email;
}
public function setEmail(?string $email): self
{
$this->email = $email;
return $this;
}
public function getProfession(): ?RegistrationsProfessions
{
return $this->profession;
}
public function setProfession(?RegistrationsProfessions $profession): self
{
$this->profession = $profession;
return $this;
}
public function getCompany(): ?RegistrationsCompaniesTypes
{
return $this->company;
}
public function setCompany(?RegistrationsCompaniesTypes $company): self
{
$this->company = $company;
return $this;
}
public function getFormation(): ?Formations
{
return $this->formation;
}
public function setFormation(?Formations $formation): self
{
$this->formation = $formation;
return $this;
}
/**
* @return Collection<int, FormationsThematics>
*/
public function getThematics(): Collection
{
return $this->thematics;
}
public function addThematic(FormationsThematics $thematic): self
{
if (!$this->thematics->contains($thematic)) {
$this->thematics[] = $thematic;
}
return $this;
}
public function removeThematic(FormationsThematics $thematic): self
{
$this->thematics->removeElement($thematic);
return $this;
}
public function getDate(): ?\DateTimeInterface
{
return $this->date;
}
public function setDate(?\DateTimeInterface $date): self
{
$this->date = $date;
return $this;
}
public function getSession(): ?FormationsSessions
{
return $this->session;
}
public function setSession(?FormationsSessions $session): self
{
$this->session = $session;
return $this;
}
public function getStatus(): ?RegistrationsStatus
{
return $this->status;
}
public function setStatus(?RegistrationsStatus $status): self
{
$this->status = $status;
return $this;
}
public function getClosingDate(): ?\DateTimeInterface
{
return $this->closingDate;
}
public function setClosingDate(\DateTimeInterface $closingDate): self
{
$this->closingDate = $closingDate;
return $this;
}
public function getCode(): ?string
{
return $this->code;
}
public function setCode(?string $code): self
{
$this->code = $code;
return $this;
}
public function getIp(): ?string
{
return $this->ip;
}
public function setIp(?string $ip): self
{
$this->ip = $ip;
return $this;
}
public function getName(): string
{
return $this->getLname()." ".$this->getFname();
}
}