app/Plugin/DeliveryFreeProduct42/Entity/DeliveryFreeConfig.php line 25

Open in your IDE?
  1. <?php
  2. /*
  3. * Plugin Name : DeliveryFreeProduct
  4. *
  5. * Copyright (C) 2016 BraTech Co., Ltd. All Rights Reserved.
  6. * http://www.bratech.co.jp/
  7. *
  8. * For the full copyright and license information, please view the LICENSE
  9. * file that was distributed with this source code.
  10. */
  11. namespace Plugin\DeliveryFreeProduct42\Entity;
  12. use Doctrine\ORM\Mapping as ORM;
  13. /**
  14.  * Config
  15.  *
  16.  * @ORM\Table(name="plg_deliveryfreeproduct_dtb_config")
  17.  * @ORM\InheritanceType("SINGLE_TABLE")
  18.  * @ORM\DiscriminatorColumn(name="discriminator_type", type="string", length=255)
  19.  * @ORM\HasLifecycleCallbacks()
  20.  * @ORM\Entity(repositoryClass="Plugin\DeliveryFreeProduct42\Repository\ConfigRepository")
  21.  */
  22. class DeliveryFreeConfig extends \Eccube\Entity\AbstractEntity
  23. {
  24.     const DEFAULT_NAME = 'condition';
  25.     const RANGE_NAME = 'range';
  26.     const AT_LEAST_ONE = 1;
  27.     const MUST_ALL = 2;
  28.     const BY_ALL = 1;
  29.     const BY_SHIPPING = 2;
  30.     /**
  31.      * @var string
  32.      *
  33.      * @ORM\Column(name="name", type="string", nullable=false, length=255)
  34.      * @ORM\Id
  35.      */
  36.     private $name = self::DEFAULT_NAME;
  37.     /**
  38.      * @var string
  39.      *
  40.      * @ORM\Column(name="value", type="string", nullable=true, length=255)
  41.      */
  42.     private $value;
  43.     public function setName($name)
  44.     {
  45.         $this->name = $name;
  46.         return $this;
  47.     }
  48.     public function getName()
  49.     {
  50.         return $this->name;
  51.     }
  52.     public function setValue($value)
  53.     {
  54.         $this->value = $value;
  55.         return $this;
  56.     }
  57.     public function getValue()
  58.     {
  59.         return $this->value;
  60.     }
  61. }