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. public function __construct()
  34. {
  35. $date = new \DateTime("now", new \DateTimeZone('Asia/Dubai'));
  36. $this->setModified($date);
  37. if ($this->getCreated() == null)
  38. {
  39. $this->setCreated($date);
  40. }
  41. }
  42. public function getId(): ?int
  43. {
  44. return $this->id;
  45. }
  46. public function getEmailFrom(): ?string
  47. {
  48. return $this->emailFrom;
  49. }
  50. public function setEmailFrom(string $emailFrom): static
  51. {
  52. $this->emailFrom = $emailFrom;
  53. return $this;
  54. }
  55. public function getEmailTo(): ?string
  56. {
  57. return $this->emailTo;
  58. }
  59. public function setEmailTo(string $emailTo): static
  60. {
  61. $this->emailTo = $emailTo;
  62. return $this;
  63. }
  64. public function getCc(): array
  65. {
  66. return $this->cc;
  67. }
  68. public function setCc(?array $cc): static
  69. {
  70. $this->cc = $cc;
  71. return $this;
  72. }
  73. public function getSubject(): ?string
  74. {
  75. return $this->subject;
  76. }
  77. public function setSubject(string $subject): static
  78. {
  79. $this->subject = $subject;
  80. return $this;
  81. }
  82. public function getBody(): ?string
  83. {
  84. return $this->body;
  85. }
  86. public function setBody(string $body): static
  87. {
  88. $this->body = $body;
  89. return $this;
  90. }
  91. public function getResponse(): ?string
  92. {
  93. return $this->response;
  94. }
  95. public function setResponse(string $response): static
  96. {
  97. $this->response = $response;
  98. return $this;
  99. }
  100. public function getModified(): ?\DateTimeInterface
  101. {
  102. return $this->modified;
  103. }
  104. public function setModified(\DateTimeInterface $modified): static
  105. {
  106. $this->modified = $modified;
  107. return $this;
  108. }
  109. public function getCreated(): ?\DateTimeInterface
  110. {
  111. return $this->created;
  112. }
  113. public function setCreated(\DateTimeInterface $created): static
  114. {
  115. $this->created = $created;
  116. return $this;
  117. }
  118. public function getAttachments(): ?array
  119. {
  120. return $this->attachments;
  121. }
  122. public function setAttachments(?array $attachments): static
  123. {
  124. $this->attachments = $attachments;
  125. return $this;
  126. }
  127. }