src/Entity/IdeaBoxRecipient.php line 17

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\IdeaBoxRecipientRepository;
  4. use DateTimeInterface;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use JMS\Serializer\Annotation as Serializer;
  7. use JMS\Serializer\Annotation\Expose;
  8. use JMS\Serializer\Annotation\Groups;
  9. /**
  10. * @ORM\Entity(repositoryClass=IdeaBoxRecipientRepository::class)
  11. *
  12. * @Serializer\ExclusionPolicy("ALL")
  13. */
  14. class IdeaBoxRecipient
  15. {
  16. /**
  17. * @ORM\Id
  18. * @ORM\GeneratedValue
  19. * @ORM\Column(type="integer")
  20. *
  21. * @Expose
  22. * @Groups({
  23. * "idea_box_recipient:id",
  24. * "idea_box_list", "idea_box_stats", "export_idea_box_datatable"
  25. * })
  26. */
  27. private $id;
  28. /**
  29. * @ORM\ManyToOne(targetEntity=IdeaBox::class, inversedBy="ideaBoxRecipients")
  30. *
  31. * @Expose
  32. * @Groups({
  33. * "idea_box_recipient:idea_box",
  34. * "idea_box_list", "idea_box_stats", "export_idea_box_datatable"
  35. * })
  36. */
  37. private ?IdeaBox $ideaBox;
  38. /**
  39. * @ORM\ManyToOne(targetEntity=User::class, inversedBy="ideaBoxRecipients")
  40. *
  41. * @Expose
  42. * @Groups({
  43. * "idea_box_recipient:user",
  44. * "idea_box_list", "idea_box_stats", "export_idea_box_datatable"
  45. * })
  46. */
  47. private ?User $user;
  48. /**
  49. * @ORM\ManyToOne(targetEntity=IdeaBoxRating::class, inversedBy="ideaBoxRecipients")
  50. *
  51. * @Expose
  52. * @Groups({
  53. * "idea_box_recipient:idea_box_rating",
  54. * "idea_box_list", "idea_box_stats", "export_idea_box_datatable"
  55. * })
  56. */
  57. private ?IdeaBoxRating $ideaBoxRating;
  58. /**
  59. * @ORM\ManyToOne(targetEntity=IdeaBoxQuestion::class, inversedBy="ideaBoxRecipients")
  60. *
  61. * @Expose
  62. * @Groups({
  63. * "idea_box_recipient:idea_box_question",
  64. * "idea_box_list", "idea_box_stats", "export_idea_box_datatable"
  65. * })
  66. */
  67. private ?IdeaBoxQuestion $ideaBoxQuestion;
  68. /**
  69. * @ORM\ManyToOne(targetEntity=IdeaBoxAnswer::class, inversedBy="ideaBoxRecipients")
  70. *
  71. * @Expose
  72. * @Groups({
  73. * "idea_box_recipient:idea_box_answer",
  74. * "idea_box_list", "idea_box_stats", "export_idea_box_datatable"
  75. * })
  76. */
  77. private ?IdeaBoxAnswer $ideaBoxAnswer;
  78. /**
  79. * @ORM\Column(type="datetime")
  80. *
  81. * @Expose
  82. * @Groups({
  83. * "idea_box_recipient:send_at",
  84. * "idea_box_list", "idea_box_stats", "export_idea_box_datatable"
  85. * })
  86. */
  87. private ?DateTimeInterface $sendAt;
  88. public function getId(): ?int
  89. {
  90. return $this->id;
  91. }
  92. public function getIdeaBox(): ?IdeaBox
  93. {
  94. return $this->ideaBox;
  95. }
  96. public function setIdeaBox( ?IdeaBox $ideaBox ): IdeaBoxRecipient
  97. {
  98. $this->ideaBox = $ideaBox;
  99. return $this;
  100. }
  101. public function getUser(): ?User
  102. {
  103. return $this->user;
  104. }
  105. public function setUser( ?User $user ): IdeaBoxRecipient
  106. {
  107. $this->user = $user;
  108. return $this;
  109. }
  110. public function getIdeaBoxRating(): ?IdeaBoxRating
  111. {
  112. return $this->ideaBoxRating;
  113. }
  114. public function setIdeaBoxRating( ?IdeaBoxRating $IdeaBoxRating ): IdeaBoxRecipient
  115. {
  116. $this->ideaBoxRating = $IdeaBoxRating;
  117. return $this;
  118. }
  119. public function getIdeaBoxQuestion(): ?IdeaBoxQuestion
  120. {
  121. return $this->ideaBoxQuestion;
  122. }
  123. public function setIdeaBoxQuestion( ?IdeaBoxQuestion $IdeaBoxQuestion ): IdeaBoxRecipient
  124. {
  125. $this->ideaBoxQuestion = $IdeaBoxQuestion;
  126. return $this;
  127. }
  128. public function getIdeaBoxAnswer(): ?IdeaBoxAnswer
  129. {
  130. return $this->ideaBoxAnswer;
  131. }
  132. public function setIdeaBoxAnswer( ?IdeaBoxAnswer $ideaBoxAnswer ): IdeaBoxRecipient
  133. {
  134. $this->ideaBoxAnswer = $ideaBoxAnswer;
  135. return $this;
  136. }
  137. public function getSendAt(): ?DateTimeInterface
  138. {
  139. return $this->sendAt;
  140. }
  141. public function setSendAt( DateTimeInterface $sendAt ): IdeaBoxRecipient
  142. {
  143. $this->sendAt = $sendAt;
  144. return $this;
  145. }
  146. }