src/Eccube/Entity/TradeLaw.php line 28

Open in your IDE?
  1. <?php
  2. /*
  3.  * This file is part of EC-CUBE
  4.  *
  5.  * Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
  6.  *
  7.  * http://www.ec-cube.co.jp/
  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 Eccube\Entity;
  13. use Doctrine\ORM\Mapping as ORM;
  14. if (!class_exists('\Eccube\Entity\TradeLaw')) {
  15.     /**
  16.      * TradeLaw
  17.      *
  18.      * @ORM\Table(name="dtb_tradelaw")
  19.      * @ORM\InheritanceType("SINGLE_TABLE")
  20.      * @ORM\DiscriminatorColumn(name="discriminator_type", type="string", length=255)
  21.      * @ORM\HasLifecycleCallbacks()
  22.      * @ORM\Entity(repositoryClass="Eccube\Repository\TradeLawRepository")
  23.      */
  24.     class TradeLaw extends AbstractEntity
  25.     {
  26.         /**
  27.          * @var int
  28.          *
  29.          * @ORM\Column(name="id", type="integer", options={"unsigned":true})
  30.          * @ORM\Id
  31.          * @ORM\GeneratedValue(strategy="IDENTITY")
  32.          */
  33.         private int $id;
  34.         /**
  35.          * @var ?string
  36.          *
  37.          * @ORM\Column(name="name", type="string", length=255, nullable=true)
  38.          */
  39.         private ?string $name;
  40.         /**
  41.          * @var ?string
  42.          *
  43.          * @ORM\Column(name="description", type="string", length=4000, nullable=true)
  44.          */
  45.         private ?string $description;
  46.         /**
  47.          * @var int
  48.          *
  49.          * @ORM\Column(name="sort_no", type="smallint", nullable=false)
  50.          */
  51.         private int $sortNo;
  52.         /**
  53.          * @var boolean
  54.          *
  55.          * @ORM\Column(name="display_order_screen", type="boolean")
  56.          */
  57.         private bool $displayOrderScreen false;
  58.         /**
  59.          * @return string
  60.          */
  61.         public function __toString()
  62.         {
  63.             return $this->getName();
  64.         }
  65.         /**
  66.          * @param int $id
  67.          *
  68.          * @return TradeLaw
  69.          */
  70.         public function setId(int $id): TradeLaw
  71.         {
  72.             $this->id $id;
  73.             return $this;
  74.         }
  75.         /**
  76.          * @return int
  77.          */
  78.         public function getId(): int
  79.         {
  80.             return $this->id;
  81.         }
  82.         /**
  83.          * @param string $name
  84.          *
  85.          * @return TradeLaw
  86.          */
  87.         public function setName(?string $name): TradeLaw
  88.         {
  89.             $this->name $name ?: '';
  90.             return $this;
  91.         }
  92.         /**
  93.          * @return string
  94.          */
  95.         public function getName(): ?string
  96.         {
  97.             return $this->name;
  98.         }
  99.         /**
  100.          * @param string $description
  101.          *
  102.          * @return TradeLaw
  103.          */
  104.         public function setDescription(?string $description): TradeLaw
  105.         {
  106.             $this->description $description ?: '';
  107.             return $this;
  108.         }
  109.         /**
  110.          * @return string
  111.          */
  112.         public function getDescription(): ?string
  113.         {
  114.             return $this->description;
  115.         }
  116.         /**
  117.          * @param int $sortNo
  118.          *
  119.          * @return TradeLaw
  120.          */
  121.         public function setSortNo(int $sortNo): TradeLaw
  122.         {
  123.             $this->sortNo $sortNo;
  124.             return $this;
  125.         }
  126.         /**
  127.          * @return int
  128.          */
  129.         public function getSortNo(): int
  130.         {
  131.             return $this->sortNo;
  132.         }
  133.         /**
  134.          * @param bool $displayOrderScreen
  135.          *
  136.          * @return TradeLaw
  137.          */
  138.         public function setDisplayOrderScreen(bool $displayOrderScreen): TradeLaw
  139.         {
  140.             $this->displayOrderScreen $displayOrderScreen;
  141.             return $this;
  142.         }
  143.         /**
  144.          * @return bool
  145.          */
  146.         public function isDisplayOrderScreen(): bool
  147.         {
  148.             return $this->displayOrderScreen;
  149.         }
  150.     }
  151. }