vendor/roothirsch/delivery-time-estimator-bundle/Entity/Downtime.php line 15

Open in your IDE?
  1. <?php
  2. namespace Roothirsch\DeliveryTimeEstimatorBundle\Entity;
  3. use ApiPlatform\Core\Annotation\ApiResource;
  4. use Roothirsch\DeliveryTimeEstimatorBundle\Repository\DowntimeRepository;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Gedmo\Mapping\Annotation as Gedmo;
  7. /**
  8. * @ApiResource(shortName="DeliveryTimeEstimator/Downtime")
  9. * @ORM\Entity
  10. * @ORM\Table(name="delivery_time_estimator_downtime")
  11. */
  12. class Downtime
  13. {
  14. /**
  15. * @ORM\Id
  16. * @ORM\GeneratedValue
  17. * @ORM\Column(type="integer")
  18. */
  19. private $id;
  20. /**
  21. * @ORM\Column(type="string", length=255, nullable=true)
  22. * @Gedmo\Translatable
  23. */
  24. private $reason;
  25. /**
  26. * @ORM\Column(type="datetime_immutable")
  27. */
  28. private $startAt;
  29. /**
  30. * @ORM\Column(type="datetime_immutable", nullable=true)
  31. */
  32. private $endAt;
  33. public function getId(): ?int
  34. {
  35. return $this->id;
  36. }
  37. public function getReason(): ?string
  38. {
  39. return $this->reason;
  40. }
  41. public function setReason(string $reason): self
  42. {
  43. $this->reason = $reason;
  44. return $this;
  45. }
  46. public function getStartAt(): ?\DateTimeImmutable
  47. {
  48. return $this->startAt;
  49. }
  50. public function setStartAt(\DateTimeImmutable $startAt): self
  51. {
  52. $this->startAt = $startAt;
  53. return $this;
  54. }
  55. public function getEndAt(): ?\DateTimeImmutable
  56. {
  57. return $this->endAt;
  58. }
  59. public function setEndAt(?\DateTimeImmutable $endAt): self
  60. {
  61. $this->endAt = $endAt;
  62. return $this;
  63. }
  64. }