src/Entity/EmailManagerLog.php line 12

  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\EmailManagerLogRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\DBAL\Types\Types;
  7. use Doctrine\ORM\Mapping as ORM;
  8. #[ORM\Entity(repositoryClass: EmailManagerLogRepository::class)]
  9. class EmailManagerLog
  10. {
  11. #[ORM\Id]
  12. #[ORM\GeneratedValue]
  13. #[ORM\Column]
  14. private ?int $id = null;
  15. #[ORM\Column(length: 255)]
  16. private ?string $emailFrom = null;
  17. #[ORM\Column(length: 255)]
  18. private ?string $emailTo = null;
  19. #[ORM\Column(nullable: true)]
  20. private array $cc = [];
  21. #[ORM\Column(length: 255)]
  22. private ?string $subject = null;
  23. #[ORM\Column(type: Types::TEXT)]
  24. private ?string $body = null;
  25. #[ORM\Column(type: Types::TEXT)]
  26. private ?string $response = null;
  27. #[ORM\Column(type: Types::DATETIME_MUTABLE)]
  28. private ?\DateTimeInterface $modified = null;
  29. #[ORM\Column(type: Types::DATE_MUTABLE)]
  30. private ?\DateTimeInterface $created = null;
  31. #[ORM\Column(nullable: true)]
  32. private ?array $attachments = null;
  33. #[ORM\Column(length: 255)]
  34. private ?string $hashedEmailTo = null;
  35. public function __construct()
  36. {
  37. $date = new \DateTime("now", new \DateTimeZone('Asia/Dubai'));
  38. $this->setModified($date);
  39. if ($this->getCreated() == null)
  40. {
  41. $this->setCreated($date);
  42. }
  43. }
  44. public function getId(): ?int
  45. {
  46. return $this->id;
  47. }
  48. public function getEmailFrom(): ?string
  49. {
  50. return $this->emailFrom;
  51. }
  52. public function setEmailFrom(string $emailFrom): static
  53. {
  54. $this->emailFrom = $emailFrom;
  55. return $this;
  56. }
  57. public function getEmailTo(): ?string
  58. {
  59. return $this->emailTo;
  60. }
  61. public function setEmailTo(string $emailTo): static
  62. {
  63. $this->emailTo = $emailTo;
  64. return $this;
  65. }
  66. public function getCc(): array
  67. {
  68. return $this->cc;
  69. }
  70. public function setCc(?array $cc): static
  71. {
  72. $this->cc = $cc;
  73. return $this;
  74. }
  75. public function getSubject(): ?string
  76. {
  77. return $this->subject;
  78. }
  79. public function setSubject(string $subject): static
  80. {
  81. $this->subject = $subject;
  82. return $this;
  83. }
  84. public function getBody(): ?string
  85. {
  86. return $this->body;
  87. }
  88. public function setBody(string $body): static
  89. {
  90. $this->body = $body;
  91. return $this;
  92. }
  93. public function getResponse(): ?string
  94. {
  95. return $this->response;
  96. }
  97. public function setResponse(string $response): static
  98. {
  99. $this->response = $response;
  100. return $this;
  101. }
  102. public function getModified(): ?\DateTimeInterface
  103. {
  104. return $this->modified;
  105. }
  106. public function setModified(\DateTimeInterface $modified): static
  107. {
  108. $this->modified = $modified;
  109. return $this;
  110. }
  111. public function getCreated(): ?\DateTimeInterface
  112. {
  113. return $this->created;
  114. }
  115. public function setCreated(\DateTimeInterface $created): static
  116. {
  117. $this->created = $created;
  118. return $this;
  119. }
  120. public function getAttachments(): ?array
  121. {
  122. return $this->attachments;
  123. }
  124. public function setAttachments(?array $attachments): static
  125. {
  126. $this->attachments = $attachments;
  127. return $this;
  128. }
  129. public function getHashedEmailTo(): ?string
  130. {
  131. return $this->hashedEmailTo;
  132. }
  133. public function setHashedEmailTo(string $hashedEmailTo): static
  134. {
  135. $this->hashedEmailTo = $hashedEmailTo;
  136. return $this;
  137. }
  138. }