src/Entity/Gos/CouponPackProduct.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Gos;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5.  * CouponPackProduct
  6.  *
  7.  * @ORM\Entity()
  8.  * @ORM\Table(name="coupon_pack_product")
  9.  * @ORM\HasLifecycleCallbacks()
  10.  */
  11. class CouponPackProduct
  12. {
  13.     /**
  14.      * @var int
  15.      *
  16.      * @ORM\Column(name="id", type="integer")
  17.      * @ORM\Id()
  18.      * @ORM\GeneratedValue(strategy="AUTO")
  19.      */
  20.     private $id;
  21.     /**
  22.      * @var bool
  23.      *
  24.      * @ORM\Column(type="boolean")
  25.      */
  26.     private $isGross;
  27.     /**
  28.      * @var int
  29.      *
  30.      * @ORM\Column(type="integer")
  31.      */
  32.     private $discountType;
  33.     /**
  34.      * @var int
  35.      *
  36.      * @ORM\Column(type="integer")
  37.      */
  38.     private $discount;
  39.     /**
  40.      * @ORM\ManyToOne(targetEntity="App\Entity\Gos\Coupon", inversedBy="couponPackProducts")
  41.      * @ORM\JoinColumn()
  42.      */
  43.     private $coupon;
  44.     /**
  45.      * @ORM\ManyToOne(targetEntity="App\Entity\Gos\ProductVariant", inversedBy="couponPack")
  46.      * @ORM\JoinColumn()
  47.      */
  48.     private $productVariant;
  49.     /**
  50.      * @ORM\Column(type="datetime")
  51.      */
  52.     private $createdAt;
  53.     /**
  54.      * @ORM\Column(type="datetime", nullable=true)
  55.      */
  56.     private $updatedAt;
  57.     /**
  58.      * @ORM\PrePersist()
  59.      */
  60.     public function prePersist()
  61.     {
  62.         $this->createdAt = new \DateTime();
  63.     }
  64.     /**
  65.      * @ORM\PreUpdate()
  66.      */
  67.     public function preUpdate()
  68.     {
  69.         $this->updatedAt = new \DateTime();
  70.     }
  71.     public function __toString()
  72.     {
  73.         return (string)$this->id;
  74.     }
  75.     /**
  76.      * Constructor
  77.      */
  78.     public function __construct()
  79.     {
  80.     }
  81.     /**
  82.      * Get id
  83.      *
  84.      * @return integer
  85.      */
  86.     public function getId()
  87.     {
  88.         return $this->id;
  89.     }
  90.     /**
  91.      * Set isGross
  92.      *
  93.      * @param bool $isGross
  94.      * @return CouponPackProduct
  95.      */
  96.     public function setIsGross($isGross)
  97.     {
  98.         $this->isGross $isGross;
  99.         return $this;
  100.     }
  101.     /**
  102.      * Get isGross
  103.      *
  104.      * @return bool
  105.      */
  106.     public function getIsGross()
  107.     {
  108.         return $this->isGross;
  109.     }
  110.     /**
  111.      * Set discountType
  112.      *
  113.      * @param int $discountType
  114.      * @return CouponPackProduct
  115.      */
  116.     public function setDiscountType($discountType)
  117.     {
  118.         $this->discountType $discountType;
  119.         return $this;
  120.     }
  121.     /**
  122.      * Get discountType
  123.      *
  124.      * @return int
  125.      */
  126.     public function getDiscountType()
  127.     {
  128.         return $this->discountType;
  129.     }
  130.     /**
  131.      * Set discount
  132.      *
  133.      * @param int $discount
  134.      * @return CouponPackProduct
  135.      */
  136.     public function setDiscount($discount)
  137.     {
  138.         $this->discount $discount;
  139.         return $this;
  140.     }
  141.     /**
  142.      * Get discount
  143.      *
  144.      * @return int
  145.      */
  146.     public function getDiscount()
  147.     {
  148.         return $this->discount;
  149.     }
  150.     /**
  151.      * Set coupon
  152.      *
  153.      * @param Coupon $coupon
  154.      * @return CouponPackProduct
  155.      */
  156.     public function setCoupon(\App\Entity\Gos\Coupon $coupon)
  157.     {
  158.         $this->coupon $coupon;
  159.         return $this;
  160.     }
  161.     /**
  162.      * Get coupon
  163.      *
  164.      * @return Coupon
  165.      */
  166.     public function getCoupon()
  167.     {
  168.         return $this->coupon;
  169.     }
  170.     /**
  171.      * Set productVariant
  172.      *
  173.      * @param ProductVariant $productVariant
  174.      * @return CouponPackProduct
  175.      */
  176.     public function setProductVariant(\App\Entity\Gos\ProductVariant $productVariant)
  177.     {
  178.         $this->productVariant $productVariant;
  179.         return $this;
  180.     }
  181.     /**
  182.      * Get productVariant
  183.      *
  184.      * @return ProductVariant
  185.      */
  186.     public function getProductVariant()
  187.     {
  188.         return $this->productVariant;
  189.     }
  190.     /**
  191.      * Set createdAt
  192.      *
  193.      * @param \DateTime $createdAt
  194.      * @return CouponPackProduct
  195.      */
  196.     public function setCreatedAt($createdAt)
  197.     {
  198.         $this->createdAt $createdAt;
  199.         return $this;
  200.     }
  201.     /**
  202.      * Get createdAt
  203.      *
  204.      * @return \DateTime
  205.      */
  206.     public function getCreatedAt()
  207.     {
  208.         return $this->createdAt;
  209.     }
  210.     /**
  211.      * Set updatedAt
  212.      *
  213.      * @param \DateTime $updatedAt
  214.      * @return CouponPackProduct
  215.      */
  216.     public function setUpdatedAt($updatedAt)
  217.     {
  218.         $this->updatedAt $updatedAt;
  219.         return $this;
  220.     }
  221.     /**
  222.      * Get updatedAt
  223.      *
  224.      * @return \DateTime
  225.      */
  226.     public function getUpdatedAt()
  227.     {
  228.         return $this->updatedAt;
  229.     }
  230. }