src/Eccube/Entity/ClassCategory.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\ClassCategory')) {
  15.     /**
  16.      * ClassCategory
  17.      *
  18.      * @ORM\Table(name="dtb_class_category")
  19.      * @ORM\InheritanceType("SINGLE_TABLE")
  20.      * @ORM\DiscriminatorColumn(name="discriminator_type", type="string", length=255)
  21.      * @ORM\HasLifecycleCallbacks()
  22.      * @ORM\Entity(repositoryClass="Eccube\Repository\ClassCategoryRepository")
  23.      */
  24.     class ClassCategory extends \Eccube\Entity\AbstractEntity
  25.     {
  26.         /**
  27.          * @return string
  28.          */
  29.         public function __toString()
  30.         {
  31.             return (string) $this->getName();
  32.         }
  33.         /**
  34.          * @var int
  35.          *
  36.          * @ORM\Column(name="id", type="integer", options={"unsigned":true})
  37.          * @ORM\Id
  38.          * @ORM\GeneratedValue(strategy="IDENTITY")
  39.          */
  40.         private $id;
  41.         /**
  42.          * @var string
  43.          *
  44.          * @ORM\Column(name="backend_name", type="string", length=255, nullable=true)
  45.          */
  46.         private $backend_name;
  47.         /**
  48.          * @var string
  49.          *
  50.          * @ORM\Column(name="name", type="string", length=255)
  51.          */
  52.         private $name;
  53.         /**
  54.          * @var int
  55.          *
  56.          * @ORM\Column(name="sort_no", type="integer", options={"unsigned":true})
  57.          */
  58.         private $sort_no;
  59.         /**
  60.          * @var boolean
  61.          *
  62.          * @ORM\Column(name="visible", type="boolean", options={"default":true})
  63.          */
  64.         private $visible;
  65.         /**
  66.          * @var \DateTime
  67.          *
  68.          * @ORM\Column(name="create_date", type="datetimetz")
  69.          */
  70.         private $create_date;
  71.         /**
  72.          * @var \DateTime
  73.          *
  74.          * @ORM\Column(name="update_date", type="datetimetz")
  75.          */
  76.         private $update_date;
  77.         /**
  78.          * @var \Eccube\Entity\ClassName
  79.          *
  80.          * @ORM\ManyToOne(targetEntity="Eccube\Entity\ClassName", inversedBy="ClassCategories")
  81.          * @ORM\JoinColumns({
  82.          *   @ORM\JoinColumn(name="class_name_id", referencedColumnName="id")
  83.          * })
  84.          */
  85.         private $ClassName;
  86.         /**
  87.          * @var \Eccube\Entity\Member
  88.          *
  89.          * @ORM\ManyToOne(targetEntity="Eccube\Entity\Member")
  90.          * @ORM\JoinColumns({
  91.          *   @ORM\JoinColumn(name="creator_id", referencedColumnName="id")
  92.          * })
  93.          */
  94.         private $Creator;
  95.         /**
  96.          * Get id.
  97.          *
  98.          * @return int
  99.          */
  100.         public function getId()
  101.         {
  102.             return $this->id;
  103.         }
  104.         /**
  105.          * Set backend_name.
  106.          *
  107.          * @param string $backendName
  108.          *
  109.          * @return ClassCategory
  110.          */
  111.         public function setBackendName($backendName)
  112.         {
  113.             $this->backend_name $backendName;
  114.             return $this;
  115.         }
  116.         /**
  117.          * Get backend_name.
  118.          *
  119.          * @return string
  120.          */
  121.         public function getBackendName()
  122.         {
  123.             return $this->backend_name;
  124.         }
  125.         /**
  126.          * Set name.
  127.          *
  128.          * @param string $name
  129.          *
  130.          * @return ClassCategory
  131.          */
  132.         public function setName($name)
  133.         {
  134.             $this->name $name;
  135.             return $this;
  136.         }
  137.         /**
  138.          * Get name.
  139.          *
  140.          * @return string
  141.          */
  142.         public function getName()
  143.         {
  144.             return $this->name;
  145.         }
  146.         /**
  147.          * Set sortNo.
  148.          *
  149.          * @param int $sortNo
  150.          *
  151.          * @return ClassCategory
  152.          */
  153.         public function setSortNo($sortNo)
  154.         {
  155.             $this->sort_no $sortNo;
  156.             return $this;
  157.         }
  158.         /**
  159.          * Get sortNo.
  160.          *
  161.          * @return int
  162.          */
  163.         public function getSortNo()
  164.         {
  165.             return $this->sort_no;
  166.         }
  167.         /**
  168.          * Set createDate.
  169.          *
  170.          * @param \DateTime $createDate
  171.          *
  172.          * @return ClassCategory
  173.          */
  174.         public function setCreateDate($createDate)
  175.         {
  176.             $this->create_date $createDate;
  177.             return $this;
  178.         }
  179.         /**
  180.          * Get createDate.
  181.          *
  182.          * @return \DateTime
  183.          */
  184.         public function getCreateDate()
  185.         {
  186.             return $this->create_date;
  187.         }
  188.         /**
  189.          * Set updateDate.
  190.          *
  191.          * @param \DateTime $updateDate
  192.          *
  193.          * @return ClassCategory
  194.          */
  195.         public function setUpdateDate($updateDate)
  196.         {
  197.             $this->update_date $updateDate;
  198.             return $this;
  199.         }
  200.         /**
  201.          * Get updateDate.
  202.          *
  203.          * @return \DateTime
  204.          */
  205.         public function getUpdateDate()
  206.         {
  207.             return $this->update_date;
  208.         }
  209.         /**
  210.          * Set className.
  211.          *
  212.          * @param \Eccube\Entity\ClassName|null $className
  213.          *
  214.          * @return ClassCategory
  215.          */
  216.         public function setClassName(ClassName $className null)
  217.         {
  218.             $this->ClassName $className;
  219.             return $this;
  220.         }
  221.         /**
  222.          * Get className.
  223.          *
  224.          * @return \Eccube\Entity\ClassName|null
  225.          */
  226.         public function getClassName()
  227.         {
  228.             return $this->ClassName;
  229.         }
  230.         /**
  231.          * Set creator.
  232.          *
  233.          * @param \Eccube\Entity\Member|null $creator
  234.          *
  235.          * @return ClassCategory
  236.          */
  237.         public function setCreator(Member $creator null)
  238.         {
  239.             $this->Creator $creator;
  240.             return $this;
  241.         }
  242.         /**
  243.          * Get creator.
  244.          *
  245.          * @return \Eccube\Entity\Member|null
  246.          */
  247.         public function getCreator()
  248.         {
  249.             return $this->Creator;
  250.         }
  251.         /**
  252.          * Set visible
  253.          *
  254.          * @param boolean $visible
  255.          *
  256.          * @return ClassCategory
  257.          */
  258.         public function setVisible($visible)
  259.         {
  260.             $this->visible $visible;
  261.             return $this;
  262.         }
  263.         /**
  264.          * Is the visibility visible?
  265.          *
  266.          * @return boolean
  267.          */
  268.         public function isVisible()
  269.         {
  270.             return $this->visible;
  271.         }
  272.     }
  273. }