src/App/Entity/AdditionalWisagRadarInfos.php line 17

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Entity\ConversationMessage\ConversationMessage;
  4. use App\Utility\GuidUtility;
  5. use DateTime;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8. * @ORM\Entity
  9. *
  10. * @ORM\Table(
  11. * name="additional_wisag_radar_infos"
  12. * )
  13. */
  14. class AdditionalWisagRadarInfos
  15. {
  16. public function __construct($conversationMessage, $at)
  17. {
  18. $this->conversationMessage = $conversationMessage;
  19. $this->informedAt = $at;
  20. }
  21. /**
  22. * @var string
  23. *
  24. * @ORM\GeneratedValue(strategy="CUSTOM")
  25. *
  26. * @ORM\CustomIdGenerator(class="App\Utility\DatabaseIdGenerator")
  27. *
  28. * @ORM\Column(name="id", type="guid")
  29. *
  30. * @ORM\Id
  31. */
  32. protected $id;
  33. public function setId(string $id): void
  34. {
  35. GuidUtility::validOrThrow($id);
  36. $this->id = $id;
  37. }
  38. public function getId()
  39. {
  40. return $this->id;
  41. }
  42. /**
  43. * @var DateTime
  44. *
  45. * @ORM\Column(name="informed_at", type="datetime", nullable=false)
  46. */
  47. protected $informedAt;
  48. public function setInformedAt(DateTime $informedAt): void
  49. {
  50. $this->informedAt = $informedAt;
  51. }
  52. public function getInformedAt(): DateTime
  53. {
  54. return $this->informedAt;
  55. }
  56. /**
  57. * @var ConversationMessage
  58. *
  59. * @ORM\OneToOne(targetEntity="App\Entity\ConversationMessage\ConversationMessage", inversedBy="outgoingDirectEmailCommunicationMessage", cascade={"persist"})
  60. *
  61. * @ORM\JoinColumn(name="conversation_messages_id", referencedColumnName="id", nullable=false, onDelete="CASCADE")
  62. */
  63. private $conversationMessage;
  64. public function getConversationMessage(): ConversationMessage
  65. {
  66. return $this->conversationMessage;
  67. }
  68. public function setConversationMessage(ConversationMessage $conversationMessage): void
  69. {
  70. $this->conversationMessage = $conversationMessage;
  71. }
  72. }