72 lines
1.3 KiB
PHP
72 lines
1.3 KiB
PHP
<?php
|
|
|
|
namespace App\Entity;
|
|
|
|
use Doctrine\ORM\Mapping as ORM;
|
|
|
|
#[ORM\Entity]
|
|
#[ORM\UniqueConstraint(
|
|
columns: ['employee', 'ride']
|
|
)]
|
|
class Representation
|
|
{
|
|
#[ORM\Id]
|
|
#[ORM\ManyToOne(targetEntity: Employee::class, inversedBy: 'representations')]
|
|
#[ORM\Column(type: 'integer')]
|
|
private ?Employee $employee = null;
|
|
|
|
#[ORM\Id]
|
|
#[ORM\ManyToOne(targetEntity: Ride::class, inversedBy: 'representations')]
|
|
#[ORM\Column(type: 'integer')]
|
|
private ?Ride $ride = null;
|
|
|
|
#[ORM\Column]
|
|
private ?int $count = null;
|
|
|
|
#[ORM\Column]
|
|
private ?\DateTime $date = null;
|
|
|
|
public function getCount(): ?int
|
|
{
|
|
return $this->count;
|
|
}
|
|
|
|
public function setCount(?int $count): void
|
|
{
|
|
$this->count = $count;
|
|
}
|
|
|
|
public function getDate(): ?\DateTime
|
|
{
|
|
return $this->date;
|
|
}
|
|
|
|
public function setDate(?\DateTime $date): void
|
|
{
|
|
$this->date = $date;
|
|
}
|
|
|
|
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;
|
|
}
|
|
|
|
|
|
|
|
}
|