HegreLand/src/Entity/Assignment.php

71 lines
1.3 KiB
PHP
Raw Normal View History

<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
2024-10-17 14:33:38 +02:00
#[ORM\Entity]
#[ORM\UniqueConstraint(
columns: ['employee', 'ride']
)]
class Assignment
{
#[ORM\Id]
2024-10-17 14:33:38 +02:00
#[ORM\ManyToOne(targetEntity: Employee::class, inversedBy: 'assignments')]
#[ORM\Column(type: 'integer')]
private ?Employee $employee = null;
#[ORM\Id]
2024-10-17 14:33:38 +02:00
#[ORM\ManyToOne(targetEntity: Ride::class, inversedBy: 'assignments')]
#[ORM\Column(type: 'integer')]
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;
}
}