app/Plugin/ContactManagement42/Entity/MailHistory.php line 8

Open in your IDE?
  1. <?php
  2. namespace Plugin\ContactManagement42\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Eccube\Entity\AbstractEntity;
  5. if (!class_exists('\Plugin\ContactManagement42\Entity\MailHistory')) {
  6.     /**
  7.      * MailHistory
  8.      *
  9.      * @ORM\Table(name="plg_contact_management4_mail_history", options={"comment": "お問い合わせ回答メール履歴"})
  10.      * @ORM\InheritanceType("SINGLE_TABLE")
  11.      * @ORM\DiscriminatorColumn(name="discriminator_type", type="string", length=255)
  12.      * @ORM\HasLifecycleCallbacks()
  13.      * @ORM\Entity(repositoryClass="Eccube\Repository\MailHistoryRepository")
  14.      */
  15.     class MailHistory extends AbstractEntity
  16.     {
  17.         /**
  18.          * @return string
  19.          */
  20.         public function __toString()
  21.         {
  22.             return (string) $this->getMailSubject();
  23.         }
  24.         /**
  25.          * @var int
  26.          *
  27.          * @ORM\Column(name="id", type="integer", options={"unsigned":true, "comment":"メール履歴ID"})
  28.          * @ORM\Id
  29.          * @ORM\GeneratedValue(strategy="IDENTITY")
  30.          */
  31.         private $id;
  32.         /**
  33.          * @var string
  34.          *
  35.          * @ORM\Column(type="text", nullable=true, options={"comment":"メールアドレス"})
  36.          */
  37.         private $to_email;
  38.         /**
  39.          * @var \DateTime|null
  40.          *
  41.          * @ORM\Column(name="send_date", type="datetimetz", nullable=true, options={"comment":"送信日時"})
  42.          */
  43.         private $send_date;
  44.         /**
  45.          * @var string|null
  46.          *
  47.          * @ORM\Column(name="mail_subject", type="string", length=255, nullable=true, options={"comment":"題名"})
  48.          */
  49.         private $mail_subject;
  50.         /**
  51.          * @var string|null
  52.          *
  53.          * @ORM\Column(name="mail_body", type="text", nullable=true, options={"comment":"本文"})
  54.          */
  55.         private $mail_body;
  56.         /**
  57.          * @var string|null
  58.          *
  59.          * @ORM\Column(name="mail_html_body", type="text", nullable=true, options={"comment":"HTML本文"})
  60.          */
  61.         private $mail_html_body;
  62.         /**
  63.          * @var \Plugin\ContactManagement42\Entity\ContactReply
  64.          *
  65.          * @ORM\ManyToOne(targetEntity="Plugin\ContactManagement42\Entity\ContactReply")
  66.          * @ORM\JoinColumns({
  67.          *   @ORM\JoinColumn(name="contact_reply_id", referencedColumnName="id")
  68.          * })
  69.          */
  70.         private $ContactReply;
  71.         /**
  72.          * @var \Plugin\ContactManagement42\Entity\Contact
  73.          *
  74.          * @ORM\ManyToOne(targetEntity="Plugin\ContactManagement42\Entity\Contact")
  75.          * @ORM\JoinColumns({
  76.          *   @ORM\JoinColumn(name="contact_id", referencedColumnName="id")
  77.          * })
  78.          */
  79.         private $Contact;
  80.         /**
  81.          * @var \Eccube\Entity\Member
  82.          *
  83.          * @ORM\ManyToOne(targetEntity="Eccube\Entity\Member")
  84.          * @ORM\JoinColumns({
  85.          *   @ORM\JoinColumn(name="creator_id", referencedColumnName="id", nullable=true)
  86.          * })
  87.          */
  88.         private $Creator;
  89.         /**
  90.          * Get id.
  91.          *
  92.          * @return int
  93.          */
  94.         public function getId()
  95.         {
  96.             return $this->id;
  97.         }
  98.         /**
  99.          * @return string
  100.          */
  101.         public function getToEmail()
  102.         {
  103.             return $this->to_email;
  104.         }
  105.         /**
  106.          * @param string $to_email
  107.          * @return MailHistory
  108.          */
  109.         public function setToEmail($to_email)
  110.         {
  111.             $this->to_email $to_email;
  112.             return $this;
  113.         }
  114.         /**
  115.          * Set sendDate.
  116.          *
  117.          * @param \DateTime|null $sendDate
  118.          *
  119.          * @return MailHistory
  120.          */
  121.         public function setSendDate($sendDate null)
  122.         {
  123.             $this->send_date $sendDate;
  124.             return $this;
  125.         }
  126.         /**
  127.          * Get sendDate.
  128.          *
  129.          * @return \DateTime|null
  130.          */
  131.         public function getSendDate()
  132.         {
  133.             return $this->send_date;
  134.         }
  135.         /**
  136.          * Set mailSubject.
  137.          *
  138.          * @param string|null $mailSubject
  139.          *
  140.          * @return MailHistory
  141.          */
  142.         public function setMailSubject($mailSubject null)
  143.         {
  144.             $this->mail_subject $mailSubject;
  145.             return $this;
  146.         }
  147.         /**
  148.          * Get mailSubject.
  149.          *
  150.          * @return string|null
  151.          */
  152.         public function getMailSubject()
  153.         {
  154.             return $this->mail_subject;
  155.         }
  156.         /**
  157.          * Set mailBody.
  158.          *
  159.          * @param string|null $mailBody
  160.          *
  161.          * @return MailHistory
  162.          */
  163.         public function setMailBody($mailBody null)
  164.         {
  165.             $this->mail_body $mailBody;
  166.             return $this;
  167.         }
  168.         /**
  169.          * Get mailBody.
  170.          *
  171.          * @return string|null
  172.          */
  173.         public function getMailBody()
  174.         {
  175.             return $this->mail_body;
  176.         }
  177.         /**
  178.          * Set mailHtmlBody.
  179.          *
  180.          * @param string|null $mailHtmlBody
  181.          *
  182.          * @return MailHistory
  183.          */
  184.         public function setMailHtmlBody($mailHtmlBody null)
  185.         {
  186.             $this->mail_html_body $mailHtmlBody;
  187.             return $this;
  188.         }
  189.         /**
  190.          * Get mailHtmlBody.
  191.          *
  192.          * @return string|null
  193.          */
  194.         public function getMailHtmlBody()
  195.         {
  196.             return $this->mail_html_body;
  197.         }
  198.         /**
  199.          * @return ContactReply
  200.          */
  201.         public function getContactReply()
  202.         {
  203.             return $this->ContactReply;
  204.         }
  205.         /**
  206.          * @param ContactReply $ContactReply
  207.          * @return MailHistory
  208.          */
  209.         public function setContactReply($ContactReply)
  210.         {
  211.             $this->ContactReply $ContactReply;
  212.             return $this;
  213.         }
  214.         /**
  215.          * @return Contact
  216.          */
  217.         public function getContact()
  218.         {
  219.             return $this->Contact;
  220.         }
  221.         /**
  222.          * @param Contact $Contact
  223.          * @return MailHistory
  224.          */
  225.         public function setContact($Contact)
  226.         {
  227.             $this->Contact $Contact;
  228.             return $this;
  229.         }
  230.         /**
  231.          * Set creator.
  232.          *
  233.          * @param \Eccube\Entity\Member|null $creator
  234.          *
  235.          * @return MailHistory
  236.          */
  237.         public function setCreator(\Eccube\Entity\Member $creator null)
  238.         {
  239.             $this->Creator $creator;
  240.             return $this;
  241.         }
  242.         /**
  243.          * Get creator.
  244.          *
  245.          * @return \Eccube\Entity\Member|null
  246.          */
  247.         public function getCreator()
  248.         {
  249.             return $this->Creator;
  250.         }
  251.     }
  252. }