src/Entity/Gauge/DatasetUpdateTask.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Gauge;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Gedmo\Mapping\Annotation as Gedmo;
  5. /**
  6. * @ORM\Entity()
  7. * @ORM\Table(name="gauge_dataset_task")
  8. */
  9. class DatasetUpdateTask
  10. {
  11. /**
  12. * @var null|int
  13. *
  14. * @ORM\Id()
  15. * @ORM\GeneratedValue()
  16. * @ORM\Column(type="integer")
  17. */
  18. private ?int $id = null;
  19. /**
  20. * @var Gauge $gauge
  21. * @ORM\ManyToOne(targetEntity="App\Entity\Gauge\Gauge")
  22. * @ORM\JoinColumn(name="gauge_id", referencedColumnName="id", nullable=false, onDelete="CASCADE")
  23. */
  24. private Gauge $gauge;
  25. /**
  26. * @var int
  27. * @ORM\Column(type="integer")
  28. */
  29. private int $dataset;
  30. /**
  31. * @var string|null
  32. * @ORM\Column(type="string", nullable=true)
  33. */
  34. private ?string $itemClass;
  35. /**
  36. * @var int|null
  37. * @ORM\Column(type="integer", nullable=true)
  38. */
  39. private ?int $itemId;
  40. /**
  41. * @var \DateTimeInterface|null
  42. *
  43. * @ORM\Column(type="datetime", nullable=true)
  44. */
  45. protected ?\DateTimeInterface $dateFrom;
  46. /**
  47. * @var \DateTime|null
  48. *
  49. * @ORM\Column(name="created_at", type="datetime", nullable=true)
  50. * @Gedmo\Timestampable(on="create")
  51. */
  52. protected ?\DateTime $createdAt;
  53. /**
  54. * @var float
  55. * @ORM\Column(type="float")
  56. */
  57. private float $weight = 1;
  58. public function getId(): ?int
  59. {
  60. return $this->id;
  61. }
  62. public function setId(?int $id): DatasetUpdateTask
  63. {
  64. $this->id = $id;
  65. return $this;
  66. }
  67. public function getGauge(): Gauge
  68. {
  69. return $this->gauge;
  70. }
  71. public function setGauge(Gauge $gauge): DatasetUpdateTask
  72. {
  73. $this->gauge = $gauge;
  74. return $this;
  75. }
  76. public function getDataset(): int
  77. {
  78. return $this->dataset;
  79. }
  80. public function setDataset(int $dataset): DatasetUpdateTask
  81. {
  82. $this->dataset = $dataset;
  83. return $this;
  84. }
  85. public function getCreatedAt(): ?\DateTime
  86. {
  87. return $this->createdAt;
  88. }
  89. public function setCreatedAt(?\DateTime $createdAt): DatasetUpdateTask
  90. {
  91. $this->createdAt = $createdAt;
  92. return $this;
  93. }
  94. public function getItemClass(): ?string
  95. {
  96. return $this->itemClass;
  97. }
  98. public function setItemClass(?string $itemClass): DatasetUpdateTask
  99. {
  100. $this->itemClass = $itemClass;
  101. return $this;
  102. }
  103. public function getItemId(): ?string
  104. {
  105. return $this->itemId;
  106. }
  107. public function setItemId(?string $itemId): DatasetUpdateTask
  108. {
  109. $this->itemId = $itemId;
  110. return $this;
  111. }
  112. public function getWeight(): float
  113. {
  114. return $this->weight;
  115. }
  116. public function setWeight(float $weight): DatasetUpdateTask
  117. {
  118. $this->weight = $weight;
  119. return $this;
  120. }
  121. public function getDateFrom(): ?\DateTimeInterface
  122. {
  123. return $this->dateFrom;
  124. }
  125. public function setDateFrom(?\DateTimeInterface $dateFrom): DatasetUpdateTask
  126. {
  127. $this->dateFrom = $dateFrom;
  128. return $this;
  129. }
  130. }