src/Eccube/Entity/MailHistory.php line 28

Open in your IDE?
  1. <?php
  2. /*
  3.  * This file is part of EC-CUBE
  4.  *
  5.  * Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
  6.  *
  7.  * http://www.ec-cube.co.jp/
  8.  *
  9.  * For the full copyright and license information, please view the LICENSE
  10.  * file that was distributed with this source code.
  11.  */
  12. namespace Eccube\Entity;
  13. use Doctrine\ORM\Mapping as ORM;
  14. if (!class_exists('\Eccube\Entity\MailHistory')) {
  15.     /**
  16.      * MailHistory
  17.      *
  18.      * @ORM\Table(name="dtb_mail_history")
  19.      * @ORM\InheritanceType("SINGLE_TABLE")
  20.      * @ORM\DiscriminatorColumn(name="discriminator_type", type="string", length=255)
  21.      * @ORM\HasLifecycleCallbacks()
  22.      * @ORM\Entity(repositoryClass="Eccube\Repository\MailHistoryRepository")
  23.      */
  24.     class MailHistory extends AbstractEntity
  25.     {
  26.         /**
  27.          * @return string
  28.          */
  29.         public function __toString()
  30.         {
  31.             return (string) $this->getMailSubject();
  32.         }
  33.         /**
  34.          * @var int
  35.          *
  36.          * @ORM\Column(name="id", type="integer", options={"unsigned":true})
  37.          * @ORM\Id
  38.          * @ORM\GeneratedValue(strategy="IDENTITY")
  39.          */
  40.         private $id;
  41.         /**
  42.          * @var \DateTime|null
  43.          *
  44.          * @ORM\Column(name="send_date", type="datetimetz", nullable=true)
  45.          */
  46.         private $send_date;
  47.         /**
  48.          * @var string|null
  49.          *
  50.          * @ORM\Column(name="mail_subject", type="string", length=255, nullable=true)
  51.          */
  52.         private $mail_subject;
  53.         /**
  54.          * @var string|null
  55.          *
  56.          * @ORM\Column(name="mail_body", type="text", nullable=true)
  57.          */
  58.         private $mail_body;
  59.         /**
  60.          * @var string|null
  61.          *
  62.          * @ORM\Column(name="mail_html_body", type="text", nullable=true)
  63.          */
  64.         private $mail_html_body;
  65.         /**
  66.          * @var \Eccube\Entity\Order
  67.          *
  68.          * @ORM\ManyToOne(targetEntity="Eccube\Entity\Order", inversedBy="MailHistories")
  69.          * @ORM\JoinColumns({
  70.          *   @ORM\JoinColumn(name="order_id", referencedColumnName="id")
  71.          * })
  72.          */
  73.         private $Order;
  74.         /**
  75.          * @var \Eccube\Entity\Member
  76.          *
  77.          * @ORM\ManyToOne(targetEntity="Eccube\Entity\Member")
  78.          * @ORM\JoinColumns({
  79.          *   @ORM\JoinColumn(name="creator_id", referencedColumnName="id", nullable=true)
  80.          * })
  81.          */
  82.         private $Creator;
  83.         /**
  84.          * Get id.
  85.          *
  86.          * @return int
  87.          */
  88.         public function getId()
  89.         {
  90.             return $this->id;
  91.         }
  92.         /**
  93.          * Set sendDate.
  94.          *
  95.          * @param \DateTime|null $sendDate
  96.          *
  97.          * @return MailHistory
  98.          */
  99.         public function setSendDate($sendDate null)
  100.         {
  101.             $this->send_date $sendDate;
  102.             return $this;
  103.         }
  104.         /**
  105.          * Get sendDate.
  106.          *
  107.          * @return \DateTime|null
  108.          */
  109.         public function getSendDate()
  110.         {
  111.             return $this->send_date;
  112.         }
  113.         /**
  114.          * Set mailSubject.
  115.          *
  116.          * @param string|null $mailSubject
  117.          *
  118.          * @return MailHistory
  119.          */
  120.         public function setMailSubject($mailSubject null)
  121.         {
  122.             $this->mail_subject $mailSubject;
  123.             return $this;
  124.         }
  125.         /**
  126.          * Get mailSubject.
  127.          *
  128.          * @return string|null
  129.          */
  130.         public function getMailSubject()
  131.         {
  132.             return $this->mail_subject;
  133.         }
  134.         /**
  135.          * Set mailBody.
  136.          *
  137.          * @param string|null $mailBody
  138.          *
  139.          * @return MailHistory
  140.          */
  141.         public function setMailBody($mailBody null)
  142.         {
  143.             $this->mail_body $mailBody;
  144.             return $this;
  145.         }
  146.         /**
  147.          * Get mailBody.
  148.          *
  149.          * @return string|null
  150.          */
  151.         public function getMailBody()
  152.         {
  153.             return $this->mail_body;
  154.         }
  155.         /**
  156.          * Set mailHtmlBody.
  157.          *
  158.          * @param string|null $mailHtmlBody
  159.          *
  160.          * @return MailHistory
  161.          */
  162.         public function setMailHtmlBody($mailHtmlBody null)
  163.         {
  164.             $this->mail_html_body $mailHtmlBody;
  165.             return $this;
  166.         }
  167.         /**
  168.          * Get mailHtmlBody.
  169.          *
  170.          * @return string|null
  171.          */
  172.         public function getMailHtmlBody()
  173.         {
  174.             return $this->mail_html_body;
  175.         }
  176.         /**
  177.          * Set order.
  178.          *
  179.          * @param \Eccube\Entity\Order|null $order
  180.          *
  181.          * @return MailHistory
  182.          */
  183.         public function setOrder(Order $order null)
  184.         {
  185.             $this->Order $order;
  186.             return $this;
  187.         }
  188.         /**
  189.          * Get order.
  190.          *
  191.          * @return \Eccube\Entity\Order|null
  192.          */
  193.         public function getOrder()
  194.         {
  195.             return $this->Order;
  196.         }
  197.         /**
  198.          * Set creator.
  199.          *
  200.          * @param \Eccube\Entity\Member|null $creator
  201.          *
  202.          * @return MailHistory
  203.          */
  204.         public function setCreator(Member $creator null)
  205.         {
  206.             $this->Creator $creator;
  207.             return $this;
  208.         }
  209.         /**
  210.          * Get creator.
  211.          *
  212.          * @return \Eccube\Entity\Member|null
  213.          */
  214.         public function getCreator()
  215.         {
  216.             return $this->Creator;
  217.         }
  218.     }
  219. }