classes/XLite/Model/Order/Surcharge.php line 18

Open in your IDE?
  1. <?php
  2. /**
  3.  * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
  4.  * See https://www.x-cart.com/license-agreement.html for license details.
  5.  */
  6. namespace XLite\Model\Order;
  7. use Doctrine\ORM\Mapping as ORM;
  8. /**
  9.  * Surcharge
  10.  *
  11.  * @ORM\Entity
  12.  * @ORM\Table  (name="order_surcharges")
  13.  */
  14. class Surcharge extends \XLite\Model\Base\Surcharge
  15. {
  16.     /**
  17.      * Surcharge owner (order)
  18.      *
  19.      * @var \XLite\Model\Order
  20.      *
  21.      * @ORM\ManyToOne  (targetEntity="XLite\Model\Order", inversedBy="surcharges")
  22.      * @ORM\JoinColumn (name="order_id", referencedColumnName="order_id", onDelete="CASCADE")
  23.      */
  24.     protected $owner;
  25.     public function getOrder()
  26.     {
  27.         return $this->getOwner();
  28.     }
  29.     /**
  30.      * Get id
  31.      *
  32.      * @return integer
  33.      */
  34.     public function getId()
  35.     {
  36.         return $this->id;
  37.     }
  38.     /**
  39.      * Set type
  40.      *
  41.      * @param string $type
  42.      * @return Surcharge
  43.      */
  44.     public function setType($type)
  45.     {
  46.         $this->type $type;
  47.         return $this;
  48.     }
  49.     /**
  50.      * Get type
  51.      *
  52.      * @return string
  53.      */
  54.     public function getType()
  55.     {
  56.         return $this->type;
  57.     }
  58.     /**
  59.      * Set code
  60.      *
  61.      * @param string $code
  62.      * @return Surcharge
  63.      */
  64.     public function setCode($code)
  65.     {
  66.         $this->code $code;
  67.         return $this;
  68.     }
  69.     /**
  70.      * Get code
  71.      *
  72.      * @return string
  73.      */
  74.     public function getCode()
  75.     {
  76.         return $this->code;
  77.     }
  78.     /**
  79.      * Set class
  80.      *
  81.      * @param string $class
  82.      * @return Surcharge
  83.      */
  84.     public function setClass($class)
  85.     {
  86.         $this->class $class;
  87.         return $this;
  88.     }
  89.     /**
  90.      * Get class
  91.      *
  92.      * @return string
  93.      */
  94.     public function getClass()
  95.     {
  96.         return $this->class;
  97.     }
  98.     /**
  99.      * Set include
  100.      *
  101.      * @param boolean $include
  102.      * @return Surcharge
  103.      */
  104.     public function setInclude($include)
  105.     {
  106.         $this->include $include;
  107.         return $this;
  108.     }
  109.     /**
  110.      * Get include
  111.      *
  112.      * @return boolean
  113.      */
  114.     public function getInclude()
  115.     {
  116.         return $this->include;
  117.     }
  118.     /**
  119.      * Set available
  120.      *
  121.      * @param boolean $available
  122.      * @return Surcharge
  123.      */
  124.     public function setAvailable($available)
  125.     {
  126.         $this->available $available;
  127.         return $this;
  128.     }
  129.     /**
  130.      * Get available
  131.      *
  132.      * @return boolean
  133.      */
  134.     public function getAvailable()
  135.     {
  136.         return $this->available;
  137.     }
  138.     /**
  139.      * Get value
  140.      *
  141.      * @return float
  142.      */
  143.     public function getValue()
  144.     {
  145.         return $this->value;
  146.     }
  147.     /**
  148.      * Set name
  149.      *
  150.      * @param string $name
  151.      * @return Surcharge
  152.      */
  153.     public function setName($name)
  154.     {
  155.         $this->name $name;
  156.         return $this;
  157.     }
  158.     /**
  159.      * Set weight
  160.      *
  161.      * @param integer $weight
  162.      * @return Surcharge
  163.      */
  164.     public function setWeight($weight)
  165.     {
  166.         $this->weight $weight;
  167.         return $this;
  168.     }
  169.     /**
  170.      * Get weight
  171.      *
  172.      * @return integer
  173.      */
  174.     public function getWeight()
  175.     {
  176.         return $this->weight;
  177.     }
  178.     /**
  179.      * Get owner
  180.      *
  181.      * @return \XLite\Model\Order
  182.      */
  183.     public function getOwner()
  184.     {
  185.         return $this->owner;
  186.     }
  187. }