src/Entity/BatchFeedbackEmail.php line 23

Open in your IDE?
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: grego
  5. * Date: 04/02/2025
  6. * Time: 14:29
  7. */
  8. namespace App\Entity;
  9. use App\Repository\BatchFeedbackEmailRepository;
  10. use Doctrine\Common\Collections\ArrayCollection;
  11. use Doctrine\Common\Collections\Collection;
  12. use Doctrine\DBAL\Types\Types;
  13. use Doctrine\ORM\Mapping as ORM;
  14. /**
  15. * @ORM\Table(name="batch_feedback_email")
  16. * @ORM\Entity(repositoryClass=BatchFeedbackEmailRepository::class)
  17. * @ORM\HasLifecycleCallbacks()
  18. */
  19. class BatchFeedbackEmail
  20. {
  21. /**
  22. * @ORM\Id
  23. * @ORM\GeneratedValue
  24. * @ORM\Column(type="integer")
  25. */
  26. private $id;
  27. /**
  28. *
  29. * @var Feedback $feedback
  30. *
  31. * @ORM\ManyToOne(targetEntity=Feedback::class, inversedBy="batchFeedbackEmails")
  32. * @ORM\JoinColumn(name="feedback_id", referencedColumnName="id", onDelete="CASCADE")
  33. */
  34. private $feedback;
  35. /**
  36. * @var \DateTime
  37. * @ORM\Column(name="created_at", type="datetime")
  38. */
  39. private $createdAt;
  40. /**
  41. * @var \DateTime
  42. *
  43. * @ORM\Column(name="updated_at", type="datetime", nullable=true)
  44. */
  45. private $updatedAt;
  46. /**
  47. * @var int
  48. *
  49. * @ORM\Column(name="status", type="smallint", options={"default": 0})
  50. */
  51. private $status = 0;
  52. public function __construct()
  53. {
  54. }
  55. public function getId(): ?int
  56. {
  57. return $this->id;
  58. }
  59. /**
  60. * @ORM\PrePersist
  61. */
  62. public function setCreatedAtValue()
  63. {
  64. $this->createdAt = new \DateTime();
  65. }
  66. /**
  67. * @ORM\PreUpdate
  68. */
  69. public function setUpdatedAtValue()
  70. {
  71. $this->updatedAt = new \DateTime();
  72. }
  73. public function getCreatedAt(): ?\DateTimeInterface
  74. {
  75. return $this->createdAt;
  76. }
  77. public function setCreatedAt(\DateTimeInterface $createdAt): self
  78. {
  79. $this->createdAt = $createdAt;
  80. return $this;
  81. }
  82. public function getUpdatedAt(): ?\DateTimeInterface
  83. {
  84. return $this->updatedAt;
  85. }
  86. public function setUpdatedAt(?\DateTimeInterface $updatedAt): self
  87. {
  88. $this->updatedAt = $updatedAt;
  89. return $this;
  90. }
  91. public function getStatus(): ?int
  92. {
  93. return $this->status;
  94. }
  95. public function setStatus(int $status): self
  96. {
  97. $this->status = $status;
  98. return $this;
  99. }
  100. public function getFeedback(): ?Feedback
  101. {
  102. return $this->feedback;
  103. }
  104. public function setFeedback(?Feedback $feedback): self
  105. {
  106. $this->feedback = $feedback;
  107. return $this;
  108. }
  109. function __toString()
  110. {
  111. return "".$this->getId();
  112. }
  113. }