Email.php 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. <?php
  2. namespace AppBundle\Entity\Message;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Dunglas\ApiBundle\Annotation\Iri;
  6. use Symfony\Component\Serializer\Annotation\Groups;
  7. use Symfony\Component\Validator\Constraints as Assert;
  8. /**
  9. * Email
  10. *
  11. * @Iri("http://schema.org/Email")
  12. */
  13. #[ORM\Entity]
  14. #[ORM\Table(name: 'Booking')]
  15. class Email extends Message implements EmailInterface
  16. {
  17. /**
  18. * @var array
  19. */
  20. #[ORM\Column(type: 'text', nullable: true)]
  21. #[Groups(['email', 'reportmessage', 'email_detail'])]
  22. private $recipientCcRule;
  23. /**
  24. * @var array
  25. */
  26. #[ORM\Column(type: 'text', nullable: true)]
  27. #[Groups(['email', 'reportmessage', 'email_detail'])]
  28. private $recipientCciRule;
  29. /**
  30. * @var array
  31. */
  32. #[ORM\Column(type: 'json_array')]
  33. #[Assert\Type(type: 'array')]
  34. #[Groups(['email', 'reportmessage', 'email_detail'])]
  35. private $recipientMulti;
  36. /**
  37. * @var Mail
  38. */
  39. #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Message\Mail', cascade: ['persist'])]
  40. #[ORM\JoinColumn(nullable: true)]
  41. #[Groups(['email', 'email_detail', 'email_detail'])]
  42. private $mailAttached;
  43. /**
  44. * The constructor
  45. */
  46. public function __construct()
  47. {
  48. parent::__construct();
  49. }
  50. /**
  51. * Set recipientCcRule
  52. *
  53. * @param String $recipientCcRule
  54. *
  55. * @return EmailMessage
  56. */
  57. public function setRecipientCcRule($recipientCcRule)
  58. {
  59. $this->recipientCcRule = $recipientCcRule;
  60. return $this;
  61. }
  62. /**
  63. * {@inheritdoc}
  64. */
  65. public function getRecipientCcRule()
  66. {
  67. return $this->recipientCcRule;
  68. }
  69. /**
  70. * Set recipientCciRule
  71. *
  72. * @param String $recipientCciRule
  73. *
  74. * @return EmailMessage
  75. */
  76. public function setRecipientCciRule($recipientCciRule)
  77. {
  78. $this->recipientCciRule = $recipientCciRule;
  79. return $this;
  80. }
  81. /**
  82. * {@inheritdoc}
  83. */
  84. public function getRecipientCciRule()
  85. {
  86. return $this->recipientCciRule;
  87. }
  88. /**
  89. * Get recipientMulti
  90. *
  91. * @return array
  92. */
  93. public function getRecipientMulti() {
  94. return $this->recipientMulti;
  95. }
  96. /**
  97. * Set recipientMulti
  98. *
  99. * @return Person
  100. */
  101. public function setRecipientMulti($recipientMulti) {
  102. $this->recipientMulti = $recipientMulti;
  103. return $this;
  104. }
  105. /**
  106. * Sets $mailAttached.
  107. *
  108. * @param Mail $mailAttached
  109. *
  110. * @return $this
  111. */
  112. public function setMailAttached(Mail $mailAttached = null)
  113. {
  114. $this->mailAttached = $mailAttached;
  115. return $this;
  116. }
  117. /**
  118. * Gets $mailAttached.
  119. *
  120. * @return Mail
  121. */
  122. public function getMailAttached()
  123. {
  124. return $this->mailAttached;
  125. }
  126. public function getDiscr()
  127. {
  128. return 'email';
  129. }
  130. }