app/Customize/Entity/VehicleModel.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\VehicleModel')) {
  5.     /**
  6.      * VehicleModel
  7.      *
  8.      * @ORM\Table(name="dtb_vehicle_model")
  9.      * @ORM\InheritanceType("SINGLE_TABLE")
  10.      * @ORM\DiscriminatorColumn(name="discriminator_type", type="string", length=255)
  11.      * @ORM\HasLifecycleCallbacks()
  12.      * @ORM\Entity(repositoryClass="Customize\Repository\VehicleModelRepository")
  13.      * @ORM\Cache(usage="NONSTRICT_READ_WRITE")
  14.      */
  15.     class VehicleModel 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 \Customize\Entity\Maker
  40.          *
  41.          * @ORM\ManyToOne(targetEntity="Customize\Entity\Maker", inversedBy="VehicleModel")
  42.          * @ORM\JoinColumns({
  43.          *   @ORM\JoinColumn(name="maker_id", referencedColumnName="id")
  44.          * })
  45.          */
  46.         private $Maker;
  47.         /**
  48.          * @var \Doctrine\Common\Collections\Collection
  49.          *
  50.          * @ORM\OneToMany(targetEntity="Customize\Entity\YearModel", mappedBy="VehicleModel")
  51.          */
  52.         protected $YearModel;
  53.         /**
  54.          * Set id.
  55.          *
  56.          * @param int $id
  57.          *
  58.          * @return $this
  59.          */
  60.         public function setId($id)
  61.         {
  62.             $this->id $id;
  63.             return $this;
  64.         }
  65.         /**
  66.          * Get id.
  67.          *
  68.          * @return int
  69.          */
  70.         public function getId()
  71.         {
  72.             return $this->id;
  73.         }
  74.         /**
  75.          * Set name.
  76.          *
  77.          * @param string $name
  78.          *
  79.          * @return $this
  80.          */
  81.         public function setName($name)
  82.         {
  83.             $this->name $name;
  84.             return $this;
  85.         }
  86.         /**
  87.          * Get name.
  88.          *
  89.          * @return string
  90.          */
  91.         public function getName()
  92.         {
  93.             return $this->name;
  94.         }
  95.         /**
  96.          * Set maker.
  97.          *
  98.          * @param \Customize\Entity\Maker|null $maker
  99.          *
  100.          * @return VehicleModel
  101.          */
  102.         public function setMaker (Maker $maker null)
  103.         {
  104.             $this->Maker $maker;
  105.             return $this;
  106.         }
  107.         /**
  108.          * Get maker.
  109.          *
  110.          * @return \Customize\Entity\Maker|null
  111.          */
  112.         public function getMaker()
  113.         {
  114.             return $this->Maker;
  115.         }
  116.         /**
  117.          * Get YearModel.
  118.          * @return \Doctrine\Common\Collections\Collection
  119.          */
  120.         public function getYearModel()
  121.         {
  122.             return $this->YearModel;
  123.         }
  124.     }
  125. }