<?php
/*
* This file is part of EC-CUBE
*
* Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
*
* http://www.ec-cube.co.jp/
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Eccube\Entity;
use Doctrine\ORM\Mapping as ORM;
if (!class_exists('\Eccube\Entity\ClassCategory')) {
/**
* ClassCategory
*
* @ORM\Table(name="dtb_class_category")
* @ORM\InheritanceType("SINGLE_TABLE")
* @ORM\DiscriminatorColumn(name="discriminator_type", type="string", length=255)
* @ORM\HasLifecycleCallbacks()
* @ORM\Entity(repositoryClass="Eccube\Repository\ClassCategoryRepository")
*/
class ClassCategory extends \Eccube\Entity\AbstractEntity
{
/**
* @return string
*/
public function __toString()
{
return (string) $this->getName();
}
/**
* @var int
*
* @ORM\Column(name="id", type="integer", options={"unsigned":true})
* @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY")
*/
private $id;
/**
* @var string
*
* @ORM\Column(name="backend_name", type="string", length=255, nullable=true)
*/
private $backend_name;
/**
* @var string
*
* @ORM\Column(name="name", type="string", length=255)
*/
private $name;
/**
* @var int
*
* @ORM\Column(name="sort_no", type="integer", options={"unsigned":true})
*/
private $sort_no;
/**
* @var boolean
*
* @ORM\Column(name="visible", type="boolean", options={"default":true})
*/
private $visible;
/**
* @var \DateTime
*
* @ORM\Column(name="create_date", type="datetimetz")
*/
private $create_date;
/**
* @var \DateTime
*
* @ORM\Column(name="update_date", type="datetimetz")
*/
private $update_date;
/**
* @var \Eccube\Entity\ClassName
*
* @ORM\ManyToOne(targetEntity="Eccube\Entity\ClassName", inversedBy="ClassCategories")
* @ORM\JoinColumns({
* @ORM\JoinColumn(name="class_name_id", referencedColumnName="id")
* })
*/
private $ClassName;
/**
* @var \Eccube\Entity\Member
*
* @ORM\ManyToOne(targetEntity="Eccube\Entity\Member")
* @ORM\JoinColumns({
* @ORM\JoinColumn(name="creator_id", referencedColumnName="id")
* })
*/
private $Creator;
/**
* Get id.
*
* @return int
*/
public function getId()
{
return $this->id;
}
/**
* Set backend_name.
*
* @param string $backendName
*
* @return ClassCategory
*/
public function setBackendName($backendName)
{
$this->backend_name = $backendName;
return $this;
}
/**
* Get backend_name.
*
* @return string
*/
public function getBackendName()
{
return $this->backend_name;
}
/**
* Set name.
*
* @param string $name
*
* @return ClassCategory
*/
public function setName($name)
{
$this->name = $name;
return $this;
}
/**
* Get name.
*
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* Set sortNo.
*
* @param int $sortNo
*
* @return ClassCategory
*/
public function setSortNo($sortNo)
{
$this->sort_no = $sortNo;
return $this;
}
/**
* Get sortNo.
*
* @return int
*/
public function getSortNo()
{
return $this->sort_no;
}
/**
* Set createDate.
*
* @param \DateTime $createDate
*
* @return ClassCategory
*/
public function setCreateDate($createDate)
{
$this->create_date = $createDate;
return $this;
}
/**
* Get createDate.
*
* @return \DateTime
*/
public function getCreateDate()
{
return $this->create_date;
}
/**
* Set updateDate.
*
* @param \DateTime $updateDate
*
* @return ClassCategory
*/
public function setUpdateDate($updateDate)
{
$this->update_date = $updateDate;
return $this;
}
/**
* Get updateDate.
*
* @return \DateTime
*/
public function getUpdateDate()
{
return $this->update_date;
}
/**
* Set className.
*
* @param \Eccube\Entity\ClassName|null $className
*
* @return ClassCategory
*/
public function setClassName(ClassName $className = null)
{
$this->ClassName = $className;
return $this;
}
/**
* Get className.
*
* @return \Eccube\Entity\ClassName|null
*/
public function getClassName()
{
return $this->ClassName;
}
/**
* Set creator.
*
* @param \Eccube\Entity\Member|null $creator
*
* @return ClassCategory
*/
public function setCreator(Member $creator = null)
{
$this->Creator = $creator;
return $this;
}
/**
* Get creator.
*
* @return \Eccube\Entity\Member|null
*/
public function getCreator()
{
return $this->Creator;
}
/**
* Set visible
*
* @param boolean $visible
*
* @return ClassCategory
*/
public function setVisible($visible)
{
$this->visible = $visible;
return $this;
}
/**
* Is the visibility visible?
*
* @return boolean
*/
public function isVisible()
{
return $this->visible;
}
}
}