app/Plugin/EccubePaymentLite42/Entity/RegularDiscount.php line 16

Open in your IDE?
  1. <?php
  2. namespace Plugin\EccubePaymentLite42\Entity;
  3. use DateTime;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Eccube\Entity\AbstractEntity;
  6. /**
  7.  * @ORM\Table(name="plg_eccube_payment_lite42_regular_count_discount")
  8.  * @ORM\InheritanceType("SINGLE_TABLE")
  9.  * @ORM\DiscriminatorColumn(name="discriminator_type", type="string", length=255)
  10.  * @ORM\HasLifecycleCallbacks()
  11.  * @ORM\Entity(repositoryClass="Plugin\EccubePaymentLite42\Repository\RegularDiscountRepository")
  12.  */
  13. class RegularDiscount extends AbstractEntity
  14. {
  15.     /**
  16.      * @var int
  17.      *
  18.      * @ORM\Column(name="id", type="integer", options={"unsigned":true})
  19.      * @ORM\Id
  20.      * @ORM\GeneratedValue(strategy="IDENTITY")
  21.      */
  22.     private $id;
  23.     /**
  24.      * @var int
  25.      *
  26.      * @ORM\Column(name="discount_id", type="integer", options={"unsigned":true})
  27.      */
  28.     private $discount_id;
  29.     /**
  30.      * @var int
  31.      *
  32.      * @ORM\Column(name="item_id", type="integer", options={"unsigned":true})
  33.      */
  34.     private $item_id;
  35.     /**
  36.      * @var int
  37.      *
  38.      * @ORM\Column(name="regular_count", type="integer", nullable=true)
  39.      */
  40.     private $regular_count;
  41.     /**
  42.      * @var int
  43.      *
  44.      * @ORM\Column(name="discount_rate", type="integer", nullable=true)
  45.      */
  46.     private $discount_rate;
  47.     /**
  48.      * @var DateTime
  49.      *
  50.      * @ORM\Column(name="create_date", type="datetimetz")
  51.      */
  52.     private $create_date;
  53.     /**
  54.      * @var DateTime
  55.      *
  56.      * @ORM\Column(name="update_date", type="datetimetz")
  57.      */
  58.     private $update_date;
  59.     /**
  60.      * @return int
  61.      */
  62.     public function getId()
  63.     {
  64.         return $this->id;
  65.     }
  66.     public function getDiscountId()
  67.     {
  68.         return $this->discount_id;
  69.     }
  70.     /**
  71.      * Set DiscountId
  72.      *
  73.      * @param int $discount_id
  74.      *
  75.      * @return self
  76.      */
  77.     public function setDiscountId($discount_id null)
  78.     {
  79.         $this->discount_id $discount_id;
  80.         return $this;
  81.     }
  82.     /**
  83.      * Get ItemId
  84.      *
  85.      * @return int
  86.      */
  87.     public function getItemId()
  88.     {
  89.         return $this->item_id;
  90.     }
  91.     /**
  92.      * Set ItemId
  93.      *
  94.      * @param int $item_id
  95.      *
  96.      * @return self
  97.      */
  98.     public function setItemId($item_id null)
  99.     {
  100.         $this->item_id $item_id;
  101.         return $this;
  102.     }
  103.     /**
  104.      * Get Regular Count
  105.      *
  106.      * @return int
  107.      */
  108.     public function getRegularCount()
  109.     {
  110.         return $this->regular_count;
  111.     }
  112.     /**
  113.      * Set Regular Count
  114.      *
  115.      * @param int $regular_count
  116.      *
  117.      * @return self
  118.      */
  119.     public function setRegularCount($regular_count null)
  120.     {
  121.         $this->regular_count $regular_count;
  122.         return $this;
  123.     }
  124.     /**
  125.      * Get Discount Rate
  126.      *
  127.      * @return int
  128.      */
  129.     public function getDiscountRate()
  130.     {
  131.         return $this->discount_rate;
  132.     }
  133.     /**
  134.      * Set Discount Rate
  135.      *
  136.      * @param int $discount_rate
  137.      *
  138.      * @return self
  139.      */
  140.     public function setDiscountRate($discount_rate null)
  141.     {
  142.         $this->discount_rate $discount_rate;
  143.         return $this;
  144.     }
  145.     /**
  146.      * @return \DateTime
  147.      */
  148.     public function getCreateDate()
  149.     {
  150.         return $this->create_date;
  151.     }
  152.     /**
  153.      * @param $create_date
  154.      *
  155.      * @return self
  156.      */
  157.     public function setCreateDate($create_date)
  158.     {
  159.         $this->create_date $create_date;
  160.         return $this;
  161.     }
  162.     /**
  163.      * @return \DateTime
  164.      */
  165.     public function getUpdateDate()
  166.     {
  167.         return $this->update_date;
  168.     }
  169.     /**
  170.      * @param $update_date
  171.      *
  172.      * @return self
  173.      */
  174.     public function setUpdateDate($update_date)
  175.     {
  176.         $this->update_date $update_date;
  177.         return $this;
  178.     }
  179.     public function __toString(): string
  180.     {
  181.         return $this->discount_id;
  182.     }
  183. }