app/Customize/Entity/Maker.php line 18

Open in your IDE?
  1. <?php
  2. namespace Customize\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. if (!class_exists('\Customize\Entity\Maker')) {
  5.     /**
  6.      * Maker
  7.      *
  8.      * @ORM\Table(name="dtb_maker")
  9.      * @ORM\InheritanceType("SINGLE_TABLE")
  10.      * @ORM\DiscriminatorColumn(name="discriminator_type", type="string", length=255)
  11.      * @ORM\HasLifecycleCallbacks()
  12.      * @ORM\Entity(repositoryClass="Customize\Repository\MakerRepository")
  13.      * @ORM\Cache(usage="NONSTRICT_READ_WRITE")
  14.      */
  15.     class Maker extends \Eccube\Entity\AbstractEntity
  16.     {
  17.         /**
  18.          * @return string
  19.          */
  20.         public function __toString()
  21.         {
  22.             return (string) $this->getName();
  23.         }
  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.         protected $id;
  32.         /**
  33.          * @var string
  34.          *
  35.          * @ORM\Column(name="name", type="string", length=255)
  36.          */
  37.         protected $name;
  38.         /**
  39.          * @var \Doctrine\Common\Collections\Collection
  40.          *
  41.          * @ORM\OneToMany(targetEntity="Customize\Entity\ProductMaker", mappedBy="Maker")
  42.          */
  43.         protected $ProductMaker;
  44.         /**
  45.          * @var \Doctrine\Common\Collections\Collection
  46.          *
  47.          * @ORM\OneToMany(targetEntity="Customize\Entity\VehicleModel", mappedBy="Maker")
  48.          */
  49.         protected $VehicleModel;
  50.         /**
  51.          * @var \Customize\Entity\Master\CustomStatus
  52.          *
  53.          * @ORM\ManyToOne(targetEntity="Customize\Entity\Master\CustomStatus")
  54.          * @ORM\JoinColumns({
  55.          *   @ORM\JoinColumn(name="status_id", referencedColumnName="id")
  56.          * })
  57.          */
  58.         private $Status;
  59.         /**
  60.          * @var int
  61.          *
  62.          * @ORM\Column(name="sort_no", type="integer")
  63.          */
  64.         private $sort_no;
  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 \DateTime
  79.          *
  80.          * @ORM\Column(name="del_flg", type="datetimetz")
  81.          */
  82.         /**
  83.          * Constructor
  84.          */
  85.         public function __construct()
  86.         {
  87.             $this->ProductMaker = new \Doctrine\Common\Collections\ArrayCollection();
  88.         }
  89.         /**
  90.          * Set id.
  91.          *
  92.          * @param int $id
  93.          *
  94.          * @return $this
  95.          */
  96.         public function setId($id)
  97.         {
  98.             $this->id $id;
  99.             return $this;
  100.         }
  101.         /**
  102.          * Get id.
  103.          *
  104.          * @return int
  105.          */
  106.         public function getId()
  107.         {
  108.             return $this->id;
  109.         }
  110.         /**
  111.          * Set name.
  112.          *
  113.          * @param string $name
  114.          *
  115.          * @return $this
  116.          */
  117.         public function setName($name)
  118.         {
  119.             $this->name $name;
  120.             return $this;
  121.         }
  122.         /**
  123.          * Get name.
  124.          *
  125.          * @return string
  126.          */
  127.         public function getName()
  128.         {
  129.             return $this->name;
  130.         }
  131.         /**
  132.          * Get VehicleModel.
  133.          * @return \Doctrine\Common\Collections\Collection
  134.          */
  135.         public function getVehicleModel()
  136.         {
  137.             return $this->VehicleModel;
  138.         }
  139.         /**
  140.          * Add productMaker.
  141.          *
  142.          * @param \Customize\Entity\ProductMaker $productMaker
  143.          *
  144.          * @return Maker
  145.          */
  146.         public function addProductMaker(ProductMaker $productMaker)
  147.         {
  148.             $this->ProductMaker[] = $productMaker;
  149.             return $this;
  150.         }
  151.         /**
  152.          * Remove productMaker.
  153.          *
  154.          * @param \Customize\Entity\ProductMaker $productMaker
  155.          *
  156.          * @return boolean TRUE if this collection contained the specified element, FALSE otherwise.
  157.          */
  158.         public function removeProductMaker(ProductMaker $productMaker)
  159.         {
  160.             return $this->ProductMaker->removeElement($productMaker);
  161.         }
  162.         /**
  163.          * Get productMaker.
  164.          *
  165.          * @return \Doctrine\Common\Collections\Collection
  166.          */
  167.         public function getProductMaker()
  168.         {
  169.             return $this->ProductMaker;
  170.         }
  171.         /**
  172.          * Set Status.
  173.          *
  174.          * @param \Customize\Entity\Master\CustomStatus|null $Status
  175.          *
  176.          * @return Catalog
  177.          */
  178.         public function setStatus(Master\CustomStatus $Status null)
  179.         {
  180.             $this->Status $Status;
  181.             return $this;
  182.         }
  183.         /**
  184.          * Get Status.
  185.          *
  186.          * @return \Customize\Entity\Master\CustomStatus|null
  187.          */
  188.         public function getStatus()
  189.         {
  190.             return $this->Status;
  191.         }
  192.         /**
  193.          * Set sortNo.
  194.          *
  195.          * @param int $sortNo
  196.          *
  197.          * @return Category
  198.          */
  199.         public function setSortNo($sortNo)
  200.         {
  201.             $this->sort_no $sortNo;
  202.             return $this;
  203.         }
  204.         /**
  205.          * Get sortNo.
  206.          *
  207.          * @return int
  208.          */
  209.         public function getSortNo()
  210.         {
  211.             return $this->sort_no;
  212.         }
  213.         /**
  214.          * Set createDate.
  215.          *
  216.          * @param \DateTime $createDate
  217.          *
  218.          * @return Product
  219.          */
  220.         public function setCreateDate($createDate)
  221.         {
  222.             $this->create_date $createDate;
  223.             return $this;
  224.         }
  225.         /**
  226.          * Get createDate.
  227.          *
  228.          * @return \DateTime
  229.          */
  230.         public function getCreateDate()
  231.         {
  232.             return $this->create_date;
  233.         }
  234.         /**
  235.          * Set updateDate.
  236.          *
  237.          * @param \DateTime $updateDate
  238.          *
  239.          * @return Product
  240.          */
  241.         public function setUpdateDate($updateDate)
  242.         {
  243.             $this->update_date $updateDate;
  244.             return $this;
  245.         }
  246.         /**
  247.          * Get updateDate.
  248.          *
  249.          * @return \DateTime
  250.          */
  251.         public function getUpdateDate()
  252.         {
  253.             return $this->update_date;
  254.         }
  255.     }
  256. }