<?php
namespace Roothirsch\DeliveryTimeEstimatorBundle\Entity;
use ApiPlatform\Core\Annotation\ApiResource;
use Roothirsch\DeliveryTimeEstimatorBundle\Repository\DowntimeRepository;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
/**
* @ApiResource(shortName="DeliveryTimeEstimator/Downtime")
* @ORM\Entity
* @ORM\Table(name="delivery_time_estimator_downtime")
*/
class Downtime
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Gedmo\Translatable
*/
private $reason;
/**
* @ORM\Column(type="datetime_immutable")
*/
private $startAt;
/**
* @ORM\Column(type="datetime_immutable", nullable=true)
*/
private $endAt;
public function getId(): ?int
{
return $this->id;
}
public function getReason(): ?string
{
return $this->reason;
}
public function setReason(string $reason): self
{
$this->reason = $reason;
return $this;
}
public function getStartAt(): ?\DateTimeImmutable
{
return $this->startAt;
}
public function setStartAt(\DateTimeImmutable $startAt): self
{
$this->startAt = $startAt;
return $this;
}
public function getEndAt(): ?\DateTimeImmutable
{
return $this->endAt;
}
public function setEndAt(?\DateTimeImmutable $endAt): self
{
$this->endAt = $endAt;
return $this;
}
}