<?php
namespace App\Entity;
use App\Repository\RegistrationTransportCheckpointRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=RegistrationTransportCheckpointRepository::class)
*/
class RegistrationTransportCheckpoint
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity=TransportZone::class, inversedBy="registrationTransportCheckpoints")
* @ORM\JoinColumn(nullable=false)
*/
private $transportZone;
/**
* @ORM\ManyToOne(targetEntity=TransportVehicle::class, inversedBy="registrationTransportCheckpoints")
* @ORM\JoinColumn(nullable=false)
*/
private $transportVehicle;
/**
* @ORM\ManyToOne(targetEntity=TransportZoneCheckPoint::class, inversedBy="registrationTransportCheckpoints")
* @ORM\JoinColumn(nullable=false)
*/
private $transportZoneCheckPoint;
/**
* @ORM\ManyToOne(targetEntity=Establishment::class, inversedBy="registrationTransportCheckpoints")
* @ORM\JoinColumn(nullable=false)
*/
private $establishment;
/**
* @ORM\Column(type="string", length=30, nullable=true)
*/
private $morning_schedule;
/**
* @ORM\Column(type="string", length=30, nullable=true)
*/
private $evening_schedule;
/**
* @ORM\Column(type="datetime_immutable")
*/
private $created_at;
/**
* @ORM\Column(type="datetime_immutable")
*/
private $updated_at;
/**
* @ORM\Column(type="integer")
*/
private $created_by;
/**
* @ORM\Column(type="integer")
*/
private $updated_by;
/**
* @ORM\ManyToOne(targetEntity=RegistrationStudentRegistration::class, inversedBy="registrationTransportCheckpoints")
* @ORM\JoinColumn(nullable=false)
*/
private $registrationStudentRegistration;
/**
* @ORM\OneToMany(targetEntity=TransportCallSheetLine::class, mappedBy="registrationTransportCheckpoint")
*/
private $transportCallSheetLines;
//un boulean qui permet de savoir si l'enfafant est recuperer à la maison
/**
* @ORM\Column(type="boolean")
*/
private $is_home_pickup;
public function __construct()
{
$this->is_home_pickup = false;
$this->transportCallSheetLines = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getTransportZone(): ?TransportZone
{
return $this->transportZone;
}
public function setTransportZone(?TransportZone $transportZone): self
{
$this->transportZone = $transportZone;
return $this;
}
public function getTransportVehicle(): ?TransportVehicle
{
return $this->transportVehicle;
}
public function setTransportVehicle(?TransportVehicle $transportVehicle): self
{
$this->transportVehicle = $transportVehicle;
return $this;
}
public function getTransportZoneCheckPoint(): ?TransportZoneCheckPoint
{
return $this->transportZoneCheckPoint;
}
public function setTransportZoneCheckPoint(?TransportZoneCheckPoint $transportZoneCheckPoint): self
{
$this->transportZoneCheckPoint = $transportZoneCheckPoint;
return $this;
}
public function getEstablishment(): ?Establishment
{
return $this->establishment;
}
public function setEstablishment(?Establishment $establishment): self
{
$this->establishment = $establishment;
return $this;
}
public function getMorningSchedule(): ?string
{
return $this->morning_schedule;
}
public function setMorningSchedule(?string $morning_schedule): self
{
$this->morning_schedule = $morning_schedule;
return $this;
}
public function getEveningSchedule(): ?string
{
return $this->evening_schedule;
}
public function setEveningSchedule(?string $evening_schedule): self
{
$this->evening_schedule = $evening_schedule;
return $this;
}
public function getCreatedAt(): ?\DateTimeImmutable
{
return $this->created_at;
}
public function setCreatedAt(\DateTimeImmutable $created_at): self
{
$this->created_at = $created_at;
return $this;
}
public function getUpdatedAt(): ?\DateTimeImmutable
{
return $this->updated_at;
}
public function setUpdatedAt(\DateTimeImmutable $updated_at): self
{
$this->updated_at = $updated_at;
return $this;
}
public function getCreatedBy(): ?int
{
return $this->created_by;
}
public function setCreatedBy(int $created_by): self
{
$this->created_by = $created_by;
return $this;
}
public function getUpdatedBy(): ?int
{
return $this->updated_by;
}
public function setUpdatedBy(int $updated_by): self
{
$this->updated_by = $updated_by;
return $this;
}
public function getRegistrationStudentRegistration(): ?RegistrationStudentRegistration
{
return $this->registrationStudentRegistration;
}
public function setRegistrationStudentRegistration(?RegistrationStudentRegistration $registrationStudentRegistration): self
{
$this->registrationStudentRegistration = $registrationStudentRegistration;
return $this;
}
/**
* @return Collection|TransportCallSheetLine[]
*/
public function getTransportCallSheetLines(): Collection
{
return $this->transportCallSheetLines;
}
public function addTransportCallSheetLine(TransportCallSheetLine $transportCallSheetLine): self
{
if (!$this->transportCallSheetLines->contains($transportCallSheetLine)) {
$this->transportCallSheetLines[] = $transportCallSheetLine;
$transportCallSheetLine->setRegistrationTransportCheckpoint($this);
}
return $this;
}
public function removeTransportCallSheetLine(TransportCallSheetLine $transportCallSheetLine): self
{
if ($this->transportCallSheetLines->removeElement($transportCallSheetLine)) {
// set the owning side to null (unless already changed)
if ($transportCallSheetLine->getRegistrationTransportCheckpoint() === $this) {
$transportCallSheetLine->setRegistrationTransportCheckpoint(null);
}
}
return $this;
}
public function getIsHomePickup(): ?bool
{
return $this->is_home_pickup;
}
public function setIsHomePickup(bool $is_home_pickup): self
{
$this->is_home_pickup = $is_home_pickup;
return $this;
}
}