2024-09-26 17:57:11 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Entity;
|
|
|
|
|
|
|
|
use Doctrine\ORM\Mapping as ORM;
|
|
|
|
|
|
|
|
#[ORM\Table(name: 'Assignment')]
|
|
|
|
class Assignment
|
|
|
|
{
|
|
|
|
#[ORM\Id]
|
|
|
|
#[ORM\OneToMany(targetEntity: Employee::class, mappedBy: 'assignments')]
|
|
|
|
#[ORM\JoinColumn(nullable: false)]
|
|
|
|
private ?Employee $employee = null;
|
|
|
|
|
|
|
|
#[ORM\Id]
|
|
|
|
#[ORM\OneToMany(targetEntity: Ride::class, mappedBy: 'assignments')]
|
|
|
|
#[ORM\JoinColumn(nullable: false)]
|
|
|
|
private ?Ride $ride = null;
|
|
|
|
|
|
|
|
#[ORM\Column]
|
|
|
|
private ?\DateTime $startHour = null;
|
|
|
|
|
|
|
|
#[ORM\Column]
|
|
|
|
private ?\DateTime $endHour = null;
|
2024-10-03 17:27:42 +02:00
|
|
|
|
|
|
|
public function getStartHour(): ?\DateTime
|
|
|
|
{
|
|
|
|
return $this->startHour;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getEmployee(): ?Employee
|
|
|
|
{
|
|
|
|
return $this->employee;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function setEmployee(?Employee $employee): void
|
|
|
|
{
|
|
|
|
$this->employee = $employee;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getRide(): ?Ride
|
|
|
|
{
|
|
|
|
return $this->ride;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function setRide(?Ride $ride): void
|
|
|
|
{
|
|
|
|
$this->ride = $ride;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function setStartHour(?\DateTime $startHour): void
|
|
|
|
{
|
|
|
|
$this->startHour = $startHour;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getEndHour(): ?\DateTime
|
|
|
|
{
|
|
|
|
return $this->endHour;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function setEndHour(?\DateTime $endHour): void
|
|
|
|
{
|
|
|
|
$this->endHour = $endHour;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2024-09-26 17:57:11 +02:00
|
|
|
}
|