app/Plugin/OrderBySale42/Entity/Config.php line 24

Open in your IDE?
  1. <?php
  2. /*
  3.  * This file is part of OrderBySale42
  4.  *
  5.  * Copyright(c) U-Mebius Inc. All Rights Reserved.
  6.  *
  7.  * https://umebius.com/
  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\OrderBySale42\Entity;
  13. use Doctrine\ORM\Mapping as ORM;
  14. /**
  15.  * Config
  16.  *
  17.  * @ORM\Table(name="plg_order_by_sale4_config")
  18.  * @ORM\Entity(repositoryClass="Plugin\OrderBySale42\Repository\ConfigRepository")
  19.  */
  20. class Config
  21. {
  22.     const ORDER_BY_AMOUNT = 1;
  23.     const ORDER_BY_QUANTITY = 2;
  24.     /**
  25.      * @var int
  26.      *
  27.      * @ORM\Column(name="id", type="integer", options={"unsigned":true})
  28.      * @ORM\Id
  29.      * @ORM\GeneratedValue(strategy="IDENTITY")
  30.      */
  31.     private $id;
  32.     /**
  33.      * @var int
  34.      *
  35.      * @ORM\Column(type="smallint", options={"unsigned":true})
  36.      */
  37.     private $product_list_order_by_id;
  38.     /**
  39.      * @var int
  40.      *
  41.      * @ORM\Column(type="smallint", options={"unsigned":true})
  42.      */
  43.     private $type;
  44.     /**
  45.      * @var string
  46.      *
  47.      * @ORM\Column(name="name", type="string", length=255)
  48.      */
  49.     private $name;
  50.     /**
  51.      * @var integer
  52.      *
  53.      * @ORM\Column(type="smallint", nullable=false, options={"default" : 6})
  54.      */
  55.     private $block_display_number = 6;
  56.     /**
  57.      * @var integer
  58.      *
  59.      * @ORM\Column(type="integer", nullable=true)
  60.      */
  61.     private $target_days;
  62.     /**
  63.      * @return int
  64.      */
  65.     public function getId()
  66.     {
  67.         return $this->id;
  68.     }
  69.     /**
  70.      * @return string
  71.      */
  72.     public function getName()
  73.     {
  74.         return $this->name;
  75.     }
  76.     /**
  77.      * @param string $name
  78.      *
  79.      * @return $this;
  80.      */
  81.     public function setName($name)
  82.     {
  83.         $this->name = $name;
  84.         return $this;
  85.     }
  86.     /**
  87.      * @return int
  88.      */
  89.     public function getProductListOrderById()
  90.     {
  91.         return $this->product_list_order_by_id;
  92.     }
  93.     /**
  94.      * @param int $product_list_order_by_id
  95.      *
  96.      * @return Config
  97.      */
  98.     public function setProductListOrderById($product_list_order_by_id)
  99.     {
  100.         $this->product_list_order_by_id = $product_list_order_by_id;
  101.         return $this;
  102.     }
  103.     /**
  104.      * @return int
  105.      */
  106.     public function getType()
  107.     {
  108.         return $this->type;
  109.     }
  110.     /**
  111.      * @param int $type
  112.      *
  113.      * @return Config
  114.      */
  115.     public function setType($type)
  116.     {
  117.         $this->type = $type;
  118.         return $this;
  119.     }
  120.     /**
  121.      * @return int
  122.      */
  123.     public function getBlockDisplayNumber()
  124.     {
  125.         return $this->block_display_number;
  126.     }
  127.     /**
  128.      * @param int $block_display_number
  129.      *
  130.      * @return Config
  131.      */
  132.     public function setBlockDisplayNumber($block_display_number)
  133.     {
  134.         $this->block_display_number = $block_display_number;
  135.         return $this;
  136.     }
  137.     /**
  138.      * @return int
  139.      */
  140.     public function getTargetDays()
  141.     {
  142.         return $this->target_days;
  143.     }
  144.     /**
  145.      * @param int $target_days
  146.      */
  147.     public function setTargetDays($target_days): Config
  148.     {
  149.         $this->target_days = $target_days;
  150.         return $this;
  151.     }
  152. }