vendor/croisiland/common-bundle/src/Entity/Itinerary/ItineraryConsistencyReport.php line 14

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace Croisiland\CommonBundle\Entity\Itinerary;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Crea\ToolsBundle\Entity\LifecycleUserIdentifierTrait;
  6. use Croisiland\CommonBundle\Repository\Itinerary\ItineraryConsistencyReportRepository;
  7. /**
  8. * @ORM\Entity(repositoryClass="ItineraryConsistencyReportRepository")
  9. */
  10. class ItineraryConsistencyReport
  11. {
  12. use LifecycleUserIdentifierTrait;
  13. /**
  14. * @ORM\Id
  15. * @ORM\GeneratedValue
  16. * @ORM\Column(type="integer")
  17. */
  18. private ?int $id = null;
  19. /**
  20. * @ORM\ManyToOne(targetEntity="Itinerary", inversedBy="consistencyReports")
  21. * @ORM\JoinColumn(nullable=false)
  22. */
  23. private Itinerary $itinerary;
  24. /**
  25. * @ORM\Column(type="integer")
  26. */
  27. private int $score;
  28. /**
  29. * @ORM\Column(type="json")
  30. */
  31. private array $segments = [];
  32. /**
  33. * @ORM\Column(type="json")
  34. */
  35. private array $penalties = [];
  36. /**
  37. * @ORM\Column(type="datetime")
  38. */
  39. private \DateTimeInterface $generatedAt;
  40. /**
  41. * @ORM\Column(type="text", nullable=true)
  42. */
  43. private ?string $summary = null;
  44. public function __construct()
  45. {
  46. $this->generatedAt = new \DateTime();
  47. }
  48. public function getId(): ?int
  49. {
  50. return $this->id;
  51. }
  52. public function getItinerary(): Itinerary
  53. {
  54. return $this->itinerary;
  55. }
  56. public function setItinerary(Itinerary $itinerary): self
  57. {
  58. $this->itinerary = $itinerary;
  59. return $this;
  60. }
  61. public function getScore(): int
  62. {
  63. return $this->score;
  64. }
  65. public function setScore(int $score): self
  66. {
  67. $this->score = $score;
  68. return $this;
  69. }
  70. public function getSegments(): array
  71. {
  72. return $this->segments;
  73. }
  74. public function setSegments(array $segments): self
  75. {
  76. $this->segments = $segments;
  77. return $this;
  78. }
  79. public function getPenalties(): array
  80. {
  81. return $this->penalties;
  82. }
  83. public function setPenalties(array $penalties): self
  84. {
  85. $this->penalties = $penalties;
  86. return $this;
  87. }
  88. public function getGeneratedAt(): \DateTimeInterface
  89. {
  90. return $this->generatedAt;
  91. }
  92. public function setGeneratedAt(\DateTimeInterface $generatedAt): self
  93. {
  94. $this->generatedAt = $generatedAt;
  95. return $this;
  96. }
  97. public function getSummary(): ?string
  98. {
  99. return $this->summary;
  100. }
  101. public function setSummary(?string $summary): self
  102. {
  103. $this->summary = $summary;
  104. return $this;
  105. }
  106. }