src/Aviatur/GeneralBundle/Entity/CouponDiscount.php line 13

Open in your IDE?
  1. <?php
  2. namespace Aviatur\GeneralBundle\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5.  * CouponDiscount.
  6.  *
  7.  * @ORM\Table(name="coupon_discount")
  8.  * @ORM\Entity
  9.  */
  10. class CouponDiscount
  11. {
  12.     /**
  13.      * @var int
  14.      *
  15.      * @ORM\Column(name="id", type="integer", nullable=false)
  16.      * @ORM\Id
  17.      * @ORM\GeneratedValue(strategy="IDENTITY")
  18.      */
  19.     private $id;
  20.     /**
  21.      * @var string
  22.      *
  23.      * @ORM\Column(name="description", type="text")
  24.      */
  25.     private $description;
  26.     /**
  27.      * @var string
  28.      *
  29.      * @ORM\Column(name="key", type="string", length=100, nullable=false)
  30.      */
  31.     private $key;
  32.     /**
  33.      * @var \DateTime
  34.      *
  35.      * @ORM\Column(name="creationDate", type="datetime")
  36.      */
  37.     private $creationdate;
  38.     /**
  39.      * @var \DateTime
  40.      *
  41.      * @ORM\Column(name="startDate", type="datetime")
  42.      */
  43.     private $startdate;
  44.     /**
  45.      * @var \DateTime
  46.      *
  47.      * @ORM\Column(name="finishDate", type="datetime")
  48.      */
  49.     private $finishdate;
  50.     /**
  51.      * @var string
  52.      *
  53.      * @ORM\Column(name="amount", type="decimal", precision=12, scale=2, nullable=false)
  54.      */
  55.     private $amount;
  56.     /**
  57.      * @var int
  58.      *
  59.      * @ORM\Column(name="maxPromotionalCode", type="integer", nullable=false)
  60.      */
  61.     private $maxpromotionalcode;
  62.     /**
  63.      * @ORM\Column(name="isActive", type="boolean", nullable=true)
  64.      */
  65.     private bool $isactive false;
  66.     /**
  67.      * @var string
  68.      *
  69.      * @ORM\Column(name="params", type="text")
  70.      */
  71.     private $params;
  72.     /**
  73.      * @var \Currency
  74.      *
  75.      * @ORM\ManyToOne(targetEntity="Aviatur\TrmBundle\Entity\Currency")
  76.      * @ORM\JoinColumns({
  77.      *   @ORM\JoinColumn(name="currency_id", referencedColumnName="id")
  78.      * })
  79.      */
  80.     private $currency;
  81.     /**
  82.      * @ORM\OneToMany(targetEntity="Aviatur\GeneralBundle\Entity\CouponDiscountAgency", mappedBy="couponDiscount")
  83.      */
  84.     private $couponDiscountAgency;
  85.     public function __construct()
  86.     {
  87.         $this->couponDiscountAgency = new \Doctrine\Common\Collections\ArrayCollection();
  88.     }
  89.     /**
  90.      * Get id.
  91.      *
  92.      * @return int
  93.      */
  94.     public function getId()
  95.     {
  96.         return $this->id;
  97.     }
  98.     /**
  99.      * Set description.
  100.      *
  101.      * @param string $description
  102.      *
  103.      * @return CouponDiscount
  104.      */
  105.     public function setDescription($description)
  106.     {
  107.         $this->description $description;
  108.         return $this;
  109.     }
  110.     /**
  111.      * Get description.
  112.      *
  113.      * @return string
  114.      */
  115.     public function getDescription()
  116.     {
  117.         return $this->description;
  118.     }
  119.     /**
  120.      * Set key.
  121.      *
  122.      * @param string $key
  123.      *
  124.      * @return CouponDiscount
  125.      */
  126.     public function setKey($key)
  127.     {
  128.         $this->key $key;
  129.         return $this;
  130.     }
  131.     /**
  132.      * Get key.
  133.      *
  134.      * @return string
  135.      */
  136.     public function getKey()
  137.     {
  138.         return $this->key;
  139.     }
  140.     /**
  141.      * Set creationdate.
  142.      *
  143.      * @param \DateTime $creationdate
  144.      *
  145.      * @return CouponDiscount
  146.      */
  147.     public function setCreationdate($creationdate)
  148.     {
  149.         $this->creationdate $creationdate;
  150.         return $this;
  151.     }
  152.     /**
  153.      * Get creationdate.
  154.      *
  155.      * @return \DateTime
  156.      */
  157.     public function getCreationdate()
  158.     {
  159.         return $this->creationdate;
  160.     }
  161.     /**
  162.      * Set startdate.
  163.      *
  164.      * @param \DateTime $startdate
  165.      *
  166.      * @return CouponDiscount
  167.      */
  168.     public function setStartdate($startdate)
  169.     {
  170.         $this->startdate $startdate;
  171.         return $this;
  172.     }
  173.     /**
  174.      * Get startdate.
  175.      *
  176.      * @return \DateTime
  177.      */
  178.     public function getStartdate()
  179.     {
  180.         return $this->startdate;
  181.     }
  182.     /**
  183.      * Set finishdate.
  184.      *
  185.      * @param \DateTime $finishdate
  186.      *
  187.      * @return CouponDiscount
  188.      */
  189.     public function setFinishdate($finishdate)
  190.     {
  191.         $this->finishdate $finishdate;
  192.         return $this;
  193.     }
  194.     /**
  195.      * Get finishdate.
  196.      *
  197.      * @return \DateTime
  198.      */
  199.     public function getFinishdate()
  200.     {
  201.         return $this->finishdate;
  202.     }
  203.     /**
  204.      * Set amount.
  205.      *
  206.      * @param string $amount
  207.      *
  208.      * @return CouponDiscount
  209.      */
  210.     public function setAmount($amount)
  211.     {
  212.         $this->amount $amount;
  213.         return $this;
  214.     }
  215.     /**
  216.      * Get amount.
  217.      *
  218.      * @return string
  219.      */
  220.     public function getAmount()
  221.     {
  222.         return $this->amount;
  223.     }
  224.     /**
  225.      * Set maxpromotionalcode.
  226.      *
  227.      * @param int $maxpromotionalcode
  228.      *
  229.      * @return CouponDiscount
  230.      */
  231.     public function setMaxpromotionalcode($maxpromotionalcode)
  232.     {
  233.         $this->maxpromotionalcode $maxpromotionalcode;
  234.         return $this;
  235.     }
  236.     /**
  237.      * Get maxpromotionalcode.
  238.      *
  239.      * @return int
  240.      */
  241.     public function getMaxpromotionalcode()
  242.     {
  243.         return $this->maxpromotionalcode;
  244.     }
  245.     /**
  246.      * Set isactive.
  247.      *
  248.      * @param bool $isactive
  249.      *
  250.      * @return CouponDiscount
  251.      */
  252.     public function setIsactive($isactive)
  253.     {
  254.         $this->isactive $isactive;
  255.         return $this;
  256.     }
  257.     /**
  258.      * Get isactive.
  259.      *
  260.      * @return bool
  261.      */
  262.     public function getIsactive()
  263.     {
  264.         return $this->isactive;
  265.     }
  266.     /**
  267.      * Set params.
  268.      *
  269.      * @param string $params
  270.      *
  271.      * @return CouponDiscount
  272.      */
  273.     public function setParams($params)
  274.     {
  275.         $this->params $params;
  276.         return $this;
  277.     }
  278.     /**
  279.      * Get params.
  280.      *
  281.      * @return string
  282.      */
  283.     public function getParams()
  284.     {
  285.         return $this->params;
  286.     }
  287.     /**
  288.      * Add couponDiscountAgency.
  289.      *
  290.      * @return CouponDiscount
  291.      */
  292.     public function addCouponDiscountAgency(\Aviatur\GeneralBundle\Entity\CouponDiscountAgency $couponDiscountAgency)
  293.     {
  294.         $this->couponDiscountAgency[] = $couponDiscountAgency;
  295.         return $this;
  296.     }
  297.     /**
  298.      * Remove couponDiscountAgency.
  299.      */
  300.     public function removeCouponDiscountAgency(\Aviatur\GeneralBundle\Entity\CouponDiscountAgency $couponDiscountAgency)
  301.     {
  302.         $this->couponDiscountAgency->removeElement($couponDiscountAgency);
  303.     }
  304.     /**
  305.      * Get couponDiscountAgency.
  306.      *
  307.      * @return \Doctrine\Common\Collections\Collection
  308.      */
  309.     public function getCouponDiscountAgency()
  310.     {
  311.         return $this->couponDiscountAgency;
  312.     }
  313.     /**
  314.      * Get currency.
  315.      *
  316.      * @return \Aviatur\TrmBundle\Entity\Currency
  317.      */
  318.     public function getCurrency()
  319.     {
  320.         return $this->currency;
  321.     }
  322. }