app/Customize/Entity/YearModel.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\YearModel')) {
  5.     /**
  6.      * YearModel
  7.      *
  8.      * @ORM\Table(name="dtb_year_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\YearModelRepository")
  13.      * @ORM\Cache(usage="NONSTRICT_READ_WRITE")
  14.      */
  15.     class YearModel 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\VehicleModel
  40.          *
  41.          * @ORM\ManyToOne(targetEntity="Customize\Entity\VehicleModel", inversedBy="YearModel")
  42.          * @ORM\JoinColumns({
  43.          *   @ORM\JoinColumn(name="vehicle_model_id", referencedColumnName="id")
  44.          * })
  45.          */
  46.         private $VehicleModel;
  47.         /**
  48.          * Set id.
  49.          *
  50.          * @param int $id
  51.          *
  52.          * @return $this
  53.          */
  54.         public function setId($id)
  55.         {
  56.             $this->id $id;
  57.             return $this;
  58.         }
  59.         /**
  60.          * Get id.
  61.          *
  62.          * @return int
  63.          */
  64.         public function getId()
  65.         {
  66.             return $this->id;
  67.         }
  68.         /**
  69.          * Set name.
  70.          *
  71.          * @param string $name
  72.          *
  73.          * @return $this
  74.          */
  75.         public function setName($name)
  76.         {
  77.             $this->name $name;
  78.             return $this;
  79.         }
  80.         /**
  81.          * Get name.
  82.          *
  83.          * @return string
  84.          */
  85.         public function getName()
  86.         {
  87.             return $this->name;
  88.         }
  89.         /**
  90.          * Set vehicle_model.
  91.          *
  92.          * @param \Customize\Entity\VehicleModel|null $vehicle_model
  93.          *
  94.          * @return VehicleModel
  95.          */
  96.         public function setVehicleModel (VehicleModel $vehicle_model null)
  97.         {
  98.             $this->VehicleModel $vehicle_model;
  99.             return $this;
  100.         }
  101.         /**
  102.          * Get maker.
  103.          *
  104.          * @return \Customize\Entity\VehicleModel|null
  105.          */
  106.         public function getVehicleModel()
  107.         {
  108.             return $this->VehicleModel;
  109.         }
  110.     }
  111. }