src/Entity/CRM/WorkTime.php line 12
<?phpnamespace App\Entity\CRM;use App\Repository\WorkTimeRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\DBAL\Types\Types;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: WorkTimeRepository::class)]class WorkTime{#[ORM\Id]#[ORM\GeneratedValue]#[ORM\Column]private ?int $id = null;#[ORM\Column(type: Types::TIME_MUTABLE, nullable: true)]private ?\DateTimeInterface $startTime = null;#[ORM\Column(type: Types::TIME_MUTABLE, nullable: true)]private ?\DateTimeInterface $endTime = null;#[ORM\ManyToOne(inversedBy: 'workTimes')]#[ORM\JoinColumn(nullable: true)]private ?Consultant $consultant = null;#[ORM\ManyToOne]private ?AbsenceReason $absenceReason = null;#[ORM\ManyToOne]private ?HourChangeReason $hourStartChangeReason = null;#[ORM\Column(type: Types::DATE_MUTABLE)]private ?\DateTimeInterface $workDate = null;#[ORM\Column]private ?bool $accepted = null;#[ORM\ManyToOne]private ?HourChangeReason $hourEndChangeReason = null;#[ORM\Column(type: Types::TEXT, nullable: true)]private ?string $hourStartChangeReasonConsultantNote = null;#[ORM\Column(type: Types::TEXT, nullable: true)]private ?string $hourEndChangeReasonConsultantNote = null;#[ORM\ManyToOne(inversedBy: 'workTimes')]private ?Admin $admin = null;#[ORM\ManyToOne(inversedBy: 'acceptedWorkTimes')]private ?Admin $acceptedBy = null;#[ORM\Column(length: 255, nullable: true)]private ?string $ipEntry = null;#[ORM\Column(length: 255, nullable: true)]private ?string $ipExit = null;#[ORM\OneToMany(mappedBy: 'workTime', targetEntity: LeaveRequestAllocation::class, cascade: ['persist', 'remove'])]private Collection $leaveRequestAllocations;public function __construct(){$this->accepted = null;$this->leaveRequestAllocations = new ArrayCollection();}public function getId(): ?int{return $this->id;}public function getStartTime(): ?\DateTimeInterface{return $this->startTime;}public function setStartTime(?\DateTimeInterface $startTime): static{$this->startTime = $startTime;return $this;}public function getEndTime(): ?\DateTimeInterface{return $this->endTime;}public function setEndTime(?\DateTimeInterface $endTime): static{$this->endTime = $endTime;return $this;}public function getConsultant(): ?Consultant{return $this->consultant;}public function setConsultant(?Consultant $consultant): static{$this->consultant = $consultant;return $this;}public function getAbsenceReason(): ?AbsenceReason{return $this->absenceReason;}public function setAbsenceReason(?AbsenceReason $absenceReason): static{$this->absenceReason = $absenceReason;return $this;}public function getHourStartChangeReason(): ?HourChangeReason{return $this->hourStartChangeReason;}public function setHourStartChangeReason(?HourChangeReason $hourStartChangeReason): static{$this->hourStartChangeReason = $hourStartChangeReason;return $this;}public function getWorkDate(): ?\DateTimeInterface{return $this->workDate;}public function setWorkDate(\DateTimeInterface $workDate): static{$this->workDate = $workDate;return $this;}public function isAccepted(): ?bool{return $this->accepted;}public function setAccepted(bool $accepted): static{$this->accepted = $accepted;return $this;}public function getHourEndChangeReason(): ?HourChangeReason{return $this->hourEndChangeReason;}public function setHourEndChangeReason(?HourChangeReason $hourEndChangeReason): static{$this->hourEndChangeReason = $hourEndChangeReason;return $this;}public function getHourStartChangeReasonConsultantNote(): ?string{return $this->hourStartChangeReasonConsultantNote;}public function setHourStartChangeReasonConsultantNote(?string $hourStartChangeReasonConsultantNote): static{$this->hourStartChangeReasonConsultantNote = $hourStartChangeReasonConsultantNote;return $this;}public function getHourEndChangeReasonConsultantNote(): ?string{return $this->hourEndChangeReasonConsultantNote;}public function setHourEndChangeReasonConsultantNote(?string $hourEndChangeReasonConsultantNote): static{$this->hourEndChangeReasonConsultantNote = $hourEndChangeReasonConsultantNote;return $this;}public function getAdmin(): ?Admin{return $this->admin;}public function setAdmin(?Admin $admin): static{$this->admin = $admin;return $this;}public function getAcceptedBy(): ?Admin{return $this->acceptedBy;}public function setAcceptedBy(?Admin $acceptedBy): static{$this->acceptedBy = $acceptedBy;return $this;}public function getIpEntry(): ?string{return $this->ipEntry;}public function setIpEntry(?string $ipEntry): static{$this->ipEntry = $ipEntry;return $this;}public function getIpExit(): ?string{return $this->ipExit;}public function setIpExit(?string $ipExit): static{$this->ipExit = $ipExit;return $this;}/*** @return Collection<int, LeaveRequestAllocation>*/public function getLeaveRequestAllocations(): Collection{return $this->leaveRequestAllocations;}public function addLeaveRequestAllocation(LeaveRequestAllocation $leaveRequestAllocation): static{if (!$this->leaveRequestAllocations->contains($leaveRequestAllocation)) {$this->leaveRequestAllocations->add($leaveRequestAllocation);$leaveRequestAllocation->setWorkTime($this);}return $this;}public function removeLeaveRequestAllocation(LeaveRequestAllocation $leaveRequestAllocation): static{if ($this->leaveRequestAllocations->removeElement($leaveRequestAllocation)) {// set the owning side to null (unless already changed)if ($leaveRequestAllocation->getWorkTime() === $this) {$leaveRequestAllocation->setWorkTime(null);}}return $this;}}