src/Entity/EmailQueue.php line 10

  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\EmailQueueRepository;
  4. use Doctrine\DBAL\Types\Types;
  5. use Doctrine\ORM\Mapping as ORM;
  6. #[ORM\Entity(repositoryClass: EmailQueueRepository::class)]
  7. class EmailQueue
  8. {
  9. #[ORM\Id]
  10. #[ORM\GeneratedValue]
  11. #[ORM\Column]
  12. private ?int $id = null;
  13. #[ORM\Column(length: 255)]
  14. private ?string $emailTo = null;
  15. #[ORM\Column(length: 255)]
  16. private ?string $subject = null;
  17. #[ORM\Column(type: Types::DATETIME_MUTABLE)]
  18. private ?\DateTimeInterface $modified = null;
  19. #[ORM\Column(type: Types::DATE_MUTABLE)]
  20. private ?\DateTimeInterface $created = null;
  21. #[ORM\Column(type: Types::TEXT)]
  22. private ?string $body = null;
  23. #[ORM\Column(nullable: true)]
  24. private ?array $cc = null;
  25. #[ORM\Column(nullable: true)]
  26. private ?array $attachment = null;
  27. public function __construct()
  28. {
  29. $date = new \DateTime("now", new \DateTimeZone('Asia/Dubai'));
  30. $this->setModified($date);
  31. if ($this->getCreated() == null)
  32. {
  33. $this->setCreated($date);
  34. }
  35. }
  36. public function getId(): ?int
  37. {
  38. return $this->id;
  39. }
  40. public function getEmailTo(): ?string
  41. {
  42. return $this->emailTo;
  43. }
  44. public function setEmailTo(string $emailTo): static
  45. {
  46. $this->emailTo = $emailTo;
  47. return $this;
  48. }
  49. public function getSubject(): ?string
  50. {
  51. return $this->subject;
  52. }
  53. public function setSubject(string $subject): static
  54. {
  55. $this->subject = $subject;
  56. return $this;
  57. }
  58. public function getModified(): ?\DateTimeInterface
  59. {
  60. return $this->modified;
  61. }
  62. public function setModified(\DateTimeInterface $modified): static
  63. {
  64. $this->modified = $modified;
  65. return $this;
  66. }
  67. public function getCreated(): ?\DateTimeInterface
  68. {
  69. return $this->created;
  70. }
  71. public function setCreated(\DateTimeInterface $created): static
  72. {
  73. $this->created = $created;
  74. return $this;
  75. }
  76. public function getBody(): ?string
  77. {
  78. return $this->body;
  79. }
  80. public function setBody(string $body): static
  81. {
  82. $this->body = $body;
  83. return $this;
  84. }
  85. public function getCc(): ?array
  86. {
  87. return $this->cc;
  88. }
  89. public function setCc(?array $cc): static
  90. {
  91. $this->cc = $cc;
  92. return $this;
  93. }
  94. public function getAttachment(): ?array
  95. {
  96. return $this->attachment;
  97. }
  98. public function setAttachment(?array $attachment): static
  99. {
  100. $this->attachment = $attachment;
  101. return $this;
  102. }
  103. }