app/Plugin/Coupon42/Entity/CouponOrder.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 Plugin\Coupon42\Entity;
  13. use Eccube\Entity\AbstractEntity;
  14. use Doctrine\ORM\Mapping as ORM;
  15. /**
  16.  * Coupon Order
  17.  *
  18.  * @ORM\Table(name="plg_coupon_order")
  19.  * @ORM\InheritanceType("SINGLE_TABLE")
  20.  * @ORM\DiscriminatorColumn(name="discriminator_type", type="string", length=255)
  21.  * @ORM\HasLifecycleCallbacks()
  22.  * @ORM\Entity(repositoryClass="Plugin\Coupon42\Repository\CouponOrderRepository")
  23.  */
  24. class CouponOrder extends AbstractEntity
  25. {
  26.     /**
  27.      * @var int
  28.      *
  29.      * @ORM\Column(name="coupon_order_id", type="integer", options={"unsigned":true})
  30.      * @ORM\Id
  31.      * @ORM\GeneratedValue(strategy="IDENTITY")
  32.      */
  33.     private $id;
  34.     /**
  35.      * @var int
  36.      *
  37.      * @ORM\Column(name="coupon_id", type="integer", options={"unsigned":true})
  38.      */
  39.     private $coupon_id;
  40.     /**
  41.      * @var string
  42.      *
  43.      * @ORM\Column(name="coupon_cd", type="string", nullable=true, length=20)
  44.      */
  45.     private $coupon_cd;
  46.     /**
  47.      * @var string
  48.      *
  49.      * @ORM\Column(name="coupon_name", type="string", nullable=true, length=50)
  50.      */
  51.     private $coupon_name;
  52.     /**
  53.      * @var int
  54.      *
  55.      * @ORM\Column(name="user_id", type="integer", options={"unsigned":true}, nullable=true)
  56.      */
  57.     private $user_id;
  58.     /**
  59.      * @var string
  60.      *
  61.      * @ORM\Column(name="email", type="string", length=255, nullable=true)
  62.      */
  63.     private $email;
  64.     /**
  65.      * @var int
  66.      *
  67.      * @ORM\Column(name="order_id", type="integer", options={"unsigned":true})
  68.      */
  69.     private $order_id;
  70.     /**
  71.      * @var string|null
  72.      *
  73.      * @ORM\Column(name="pre_order_id", type="string", length=255, nullable=true)
  74.      */
  75.     private $pre_order_id;
  76.     /**
  77.      * @var \DateTime|null
  78.      *
  79.      * @ORM\Column(name="order_date", type="datetimetz", nullable=true)
  80.      */
  81.     private $order_date;
  82.     /**
  83.      * @var int
  84.      *
  85.      * @ORM\Column(name="order_item_id", type="integer", options={"unsigned":true}, nullable=true)
  86.      */
  87.     private $order_item_id;
  88.     /**
  89.      * @var string
  90.      *
  91.      * @ORM\Column(name="discount", type="decimal", precision=12, scale=2, options={"unsigned":true,"default":0})
  92.      */
  93.     private $discount 0;
  94.     /**
  95.      * @var boolean
  96.      *
  97.      * @ORM\Column(name="visible", type="boolean", options={"default":true})
  98.      */
  99.     private $visible;
  100.     /**
  101.      * @var boolean
  102.      *
  103.      * @ORM\Column(name="order_change_status", type="boolean", options={"default":true})
  104.      */
  105.     private $order_change_status;
  106.     /**
  107.      * @var \DateTime
  108.      *
  109.      * @ORM\Column(name="create_date", type="datetimetz")
  110.      */
  111.     private $create_date;
  112.     /**
  113.      * @var \DateTime
  114.      *
  115.      * @ORM\Column(name="update_date", type="datetimetz")
  116.      */
  117.     private $update_date;
  118.     /**
  119.      * Get id.
  120.      *
  121.      * @return int
  122.      */
  123.     public function getId()
  124.     {
  125.         return $this->id;
  126.     }
  127.     /**
  128.      * Set coupon_id.
  129.      *
  130.      * @param int $couponId
  131.      *
  132.      * @return CouponOrder
  133.      */
  134.     public function setCouponId($couponId)
  135.     {
  136.         $this->coupon_id $couponId;
  137.         return $this;
  138.     }
  139.     /**
  140.      * Get coupon_id.
  141.      *
  142.      * @return int
  143.      */
  144.     public function getCouponId()
  145.     {
  146.         return $this->coupon_id;
  147.     }
  148.     /**
  149.      * Set coupon_cd.
  150.      *
  151.      * @param string $couponCd
  152.      *
  153.      * @return CouponOrder
  154.      */
  155.     public function setCouponCd($couponCd)
  156.     {
  157.         $this->coupon_cd $couponCd;
  158.         return $this;
  159.     }
  160.     /**
  161.      * Get coupon_cd.
  162.      *
  163.      * @return string
  164.      */
  165.     public function getCouponCd()
  166.     {
  167.         return $this->coupon_cd;
  168.     }
  169.     /**
  170.      * Set user_id.
  171.      *
  172.      * @param int $userId
  173.      *
  174.      * @return CouponOrder
  175.      */
  176.     public function setUserId($userId)
  177.     {
  178.         $this->user_id $userId;
  179.         return $this;
  180.     }
  181.     /**
  182.      * Get user_id.
  183.      *
  184.      * @return int
  185.      */
  186.     public function getUserId()
  187.     {
  188.         return $this->user_id;
  189.     }
  190.     /**
  191.      * Set email.
  192.      *
  193.      * @param string $email
  194.      *
  195.      * @return CouponOrder
  196.      */
  197.     public function setEmail($email)
  198.     {
  199.         $this->email $email;
  200.         return $this;
  201.     }
  202.     /**
  203.      * Get email.
  204.      *
  205.      * @return string
  206.      */
  207.     public function getEmail()
  208.     {
  209.         return $this->email;
  210.     }
  211.     /**
  212.      * Set order_id.
  213.      *
  214.      * @param int $orderId
  215.      *
  216.      * @return CouponOrder
  217.      */
  218.     public function setOrderId($orderId)
  219.     {
  220.         $this->order_id $orderId;
  221.         return $this;
  222.     }
  223.     /**
  224.      * Get order_id.
  225.      *
  226.      * @return int
  227.      */
  228.     public function getOrderId()
  229.     {
  230.         return $this->order_id;
  231.     }
  232.     /**
  233.      * Set pre_order_id.
  234.      *
  235.      * @param string $preOrderId
  236.      *
  237.      * @return CouponOrder
  238.      */
  239.     public function setPreOrderId($preOrderId)
  240.     {
  241.         $this->pre_order_id $preOrderId;
  242.         return $this;
  243.     }
  244.     /**
  245.      * Get pre_order_id.
  246.      *
  247.      * @return string
  248.      */
  249.     public function getPreOrderId()
  250.     {
  251.         return $this->pre_order_id;
  252.     }
  253.     /**
  254.      * Set order_date.
  255.      *
  256.      * @param \DateTime|null $orderDate
  257.      *
  258.      * @return CouponOrder
  259.      */
  260.     public function setOrderDate($orderDate)
  261.     {
  262.         $this->order_date $orderDate;
  263.         return $this;
  264.     }
  265.     /**
  266.      * Get order_date.
  267.      *
  268.      * @return \DateTime|null
  269.      */
  270.     public function getOrderDate()
  271.     {
  272.         return $this->order_date;
  273.     }
  274.     /**
  275.      * Set discount.
  276.      *
  277.      * @param string $discount
  278.      *
  279.      * @return CouponOrder
  280.      */
  281.     public function setDiscount($discount)
  282.     {
  283.         $this->discount $discount;
  284.         return $this;
  285.     }
  286.     /**
  287.      * Get discount.
  288.      *
  289.      * @return string
  290.      */
  291.     public function getDiscount()
  292.     {
  293.         return $this->discount;
  294.     }
  295.     /**
  296.      * Set del_flg.
  297.      *
  298.      * @param bool $visible
  299.      *
  300.      * @return CouponOrder
  301.      */
  302.     public function setVisible($visible)
  303.     {
  304.         $this->visible $visible;
  305.         return $this;
  306.     }
  307.     /**
  308.      * is visible.
  309.      *
  310.      * @return bool
  311.      */
  312.     public function isVisible()
  313.     {
  314.         return $this->visible;
  315.     }
  316.     /**
  317.      * Set create_date.
  318.      *
  319.      * @param \DateTime $createDate
  320.      *
  321.      * @return CouponOrder
  322.      */
  323.     public function setCreateDate($createDate)
  324.     {
  325.         $this->create_date $createDate;
  326.         return $this;
  327.     }
  328.     /**
  329.      * Get create_date.
  330.      *
  331.      * @return \DateTime
  332.      */
  333.     public function getCreateDate()
  334.     {
  335.         return $this->create_date;
  336.     }
  337.     /**
  338.      * Set update_date.
  339.      *
  340.      * @param \DateTime $updateDate
  341.      *
  342.      * @return CouponOrder
  343.      */
  344.     public function setUpdateDate($updateDate)
  345.     {
  346.         $this->update_date $updateDate;
  347.         return $this;
  348.     }
  349.     /**
  350.      * Get update_date.
  351.      *
  352.      * @return \DateTime
  353.      */
  354.     public function getUpdateDate()
  355.     {
  356.         return $this->update_date;
  357.     }
  358.     /**
  359.      * @return string
  360.      */
  361.     public function getCouponName()
  362.     {
  363.         return $this->coupon_name;
  364.     }
  365.     /**
  366.      * @param string $coupon_name
  367.      *
  368.      * @return $this
  369.      */
  370.     public function setCouponName($coupon_name)
  371.     {
  372.         $this->coupon_name $coupon_name;
  373.         return $this;
  374.     }
  375.     /**
  376.      * @return bool
  377.      */
  378.     public function getOrderChangeStatus()
  379.     {
  380.         return $this->order_change_status;
  381.     }
  382.     /**
  383.      * @param bool $orderChangeStatus
  384.      *
  385.      * @return $this
  386.      */
  387.     public function setOrderChangeStatus($orderChangeStatus)
  388.     {
  389.         $this->order_change_status $orderChangeStatus;
  390.         return $this;
  391.     }
  392.     /**
  393.      * @return int
  394.      */
  395.     public function getOrderItemId()
  396.     {
  397.         return $this->order_item_id;
  398.     }
  399.     /**
  400.      * @param int $order_item_id
  401.      *
  402.      * @return $this
  403.      */
  404.     public function setOrderItemId(int $order_item_id)
  405.     {
  406.         $this->order_item_id $order_item_id;
  407.         return $this;
  408.     }
  409. }