<?phpnamespace App\Entity;use App\Repository\EmployeeContractRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;/** * @ORM\Entity(repositoryClass=EmployeeContractRepository::class) */class EmployeeContract{ /** * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") */ private $id; /** * @ORM\Column(type="datetime") */ private $createdDate; /** * @ORM\Column(type="date", nullable=true) */ private $startDate; /** * @ORM\Column(type="date", nullable=true) */ private $endDate; /** * @ORM\Column(type="string", length=255, nullable=true) */ private $startingCity; /** * @ORM\Column(type="string", length=255, nullable=true) */ private $returnCity; /** * @ORM\ManyToOne(targetEntity=Contact::class, inversedBy="employeeContracts") * @ORM\JoinColumn(nullable=true) */ private $contact; /** * @ORM\OneToMany(targetEntity=SejourSessionEquipier::class, mappedBy="employeeContract") */ private $sejourSessionEquipier; public function __construct() { $this->sejourSessionEquipier = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getCreatedDate(): ?\DateTimeInterface { return $this->createdDate; } public function setCreatedDate(\DateTimeInterface $createdDate): self { $this->createdDate = $createdDate; return $this; } public function getStartDate(): ?\DateTimeInterface { return $this->startDate; } public function setStartDate(?\DateTimeInterface $startDate): self { $this->startDate = $startDate; return $this; } public function getEndDate(): ?\DateTimeInterface { return $this->endDate; } public function setEndDate(?\DateTimeInterface $endDate): self { $this->endDate = $endDate; return $this; } public function getStartingCity(): ?string { return $this->startingCity; } public function setStartingCity(?string $startingCity): self { $this->startingCity = $startingCity; return $this; } public function getReturnCity(): ?string { return $this->returnCity; } public function setReturnCity(?string $ReturnCity): self { $this->returnCity = $ReturnCity; return $this; } public function getContact(): ?Contact { return $this->contact; } public function setContact(?Contact $contact): self { $this->contact = $contact; return $this; } /** * @return Collection|SejourSessionEquipier[] */ public function getSejourSessionEquipier(): Collection { return $this->sejourSessionEquipier; } public function addSejourSessionEquipier(SejourSessionEquipier $sejourSessionEquipier): self { if (!$this->sejourSessionEquipier->contains($sejourSessionEquipier)) { $this->sejourSessionEquipier[] = $sejourSessionEquipier; $sejourSessionEquipier->setEmployeeContract($this); } return $this; } public function removeSejourSessionEquipier(SejourSessionEquipier $sejourSessionEquipier): self { if ($this->sejourSessionEquipier->removeElement($sejourSessionEquipier)) { // set the owning side to null (unless already changed) if ($sejourSessionEquipier->getEmployeeContract() === $this) { $sejourSessionEquipier->setEmployeeContract(null); } } return $this; }}