<?phpnamespace CoreBundle\Entity;use Doctrine\Common\Collections\ArrayCollection;use CoreBundle\Entity\Vehicles\Vehicle;use Application\Sonata\MediaBundle\Entity\Media;use DcSiteBundle\Entity\ServiceVariation;use Doctrine\Common\Collections\Collection;use BmpGatewayBundle\Entity\VehicleTestDrive;/** * Model */class Model{ /** * @var integer */ private $id; /** * @var integer */ private $state; /** * @var string */ private $title; /** * @var Brand */ private $brand; /** * @var string */ private $crm_name; /** * @var VehicleTestDrive */ private $testdrive; /** * @var int */ private $position; /** * Get id * * @return integer */ public function getId() { return $this->id; } /** * Set state * * @param integer $state * * @return Model */ public function setState($state) { $this->state = $state; return $this; } /** * Get state * * @return integer */ public function getState() { return $this->state; } /** * Set title * * @param string $title * * @return Model */ public function setTitle($title) { $this->title = $title; return $this; } /** * Get title * * @return string */ public function getTitle() { return $this->title; } /** * Set brand * * @param Brand $brand * * @return Model */ public function setBrand(Brand $brand = null) { $this->brand = $brand; return $this; } /** * Get brand * * @return Brand */ public function getBrand() { return $this->brand; } /** * @return string */ public function __toString() { if($this->getBrand()) { return $this->getBrand()->getName().' '.(string) $this->getTitle(); } return (string) $this->getTitle(); } /** * Constructor */ public function __construct() { $this->accessories = new ArrayCollection(); } /** * Set crmName * * @param string $crmName * * @return Model */ public function setCrmName($crmName) { $this->crm_name = $crmName; return $this; } /** * Get crmName * * @return string */ public function getCrmName() { return $this->crm_name; } /** * @var string */ private $crm_id; /** * Set crmId * * @param string $crmId * * @return Model */ public function setCrmId($crmId) { $this->crm_id = $crmId; return $this; } /** * Get crmId * * @return string */ public function getCrmId() { return $this->crm_id; } /** * @var string */ private $uid_1c; /** * Set uid1c * * @param string $uid1c * * @return Model */ public function setUid1c($uid1c) { $this->uid_1c = $uid1c; return $this; } /** * Get uid1c * * @return string */ public function getUid1c() { return $this->uid_1c; } /** * @var integer */ private $vehicle_type; /** * Set vehicleType * * @param integer $vehicleType * * @return Model */ public function setVehicleType($vehicleType) { $this->vehicle_type = $vehicleType; return $this; } /** * Get vehicleType * * @return integer */ public function getVehicleType() { return $this->vehicle_type; } /** * @var Collection */ private $vehicles; /** * Add vehicle * * @param Vehicle $vehicle * * @return Model */ public function addVehicle(Vehicle $vehicle) { $this->vehicles[] = $vehicle; return $this; } /** * Remove vehicle * * @param Vehicle $vehicle */ public function removeVehicle(Vehicle $vehicle) { $this->vehicles->removeElement($vehicle); } /** * Get vehicles * * @return Collection */ public function getVehicles() { return $this->vehicles; } /** * @var integer */ private $is_autocreate; /** * Set isAutocreate * * @param integer $isAutocreate * * @return Model */ public function setIsAutocreate($isAutocreate) { $this->is_autocreate = $isAutocreate; return $this; } /** * Get isAutocreate * * @return integer */ public function getIsAutocreate() { return $this->is_autocreate; } /** * @var string */ private $url; /** * Set url * * @param string $url * * @return Model */ public function setUrl($url) { $this->url = $url; return $this; } /** * Get url * * @return string */ public function getUrl() { return $this->url; } /** * @var string */ private $image_hash; /** * @var Media */ private $image; /** * Set imageHash * * @param string $imageHash * * @return Model */ public function setImageHash($imageHash) { $this->image_hash = $imageHash; return $this; } /** * Get imageHash * * @return string */ public function getImageHash() { return $this->image_hash; } /** * Set image * * @param Media $image * * @return Model */ public function setImage(Media $image = null) { $this->image = $image; return $this; } /** * Get image * * @return Media */ public function getImage() { return $this->image; } /** * @var integer */ private $ria_id; /** * Set riaId * * @param integer $riaId * * @return Model */ public function setRiaId($riaId) { $this->ria_id = $riaId; return $this; } /** * Get riaId * * @return integer */ public function getRiaId() { return $this->ria_id; } /** * @return VehicleTestDrive */ public function getTestdrive() { return $this->testdrive; } /** * @param VehicleTestDrive $testdrive * * @return Model */ public function setTestdrive(VehicleTestDrive $testdrive) { $this->testdrive = $testdrive; return $this; } /** * @var Collection */ private $service_variations; /** * Add serviceVariation. * * @param ServiceVariation $serviceVariation * * @return Model */ public function addServiceVariation(ServiceVariation $serviceVariation) { $this->service_variations[] = $serviceVariation; return $this; } /** * Remove serviceVariation. * * @param ServiceVariation $serviceVariation * * @return boolean TRUE if this collection contained the specified element, FALSE otherwise. */ public function removeServiceVariation(ServiceVariation $serviceVariation) { return $this->service_variations->removeElement($serviceVariation); } /** * Get serviceVariations. * * @return Collection */ public function getServiceVariations() { return $this->service_variations; } /** * Add testdrive. * * @param VehicleTestDrive $testdrive * * @return Model */ public function addTestdrive(VehicleTestDrive $testdrive) { $this->testdrive[] = $testdrive; return $this; } /** * Remove testdrive. * * @param VehicleTestDrive $testdrive * * @return boolean TRUE if this collection contained the specified element, FALSE otherwise. */ public function removeTestdrive(VehicleTestDrive $testdrive) { return $this->testdrive->removeElement($testdrive); } /** * Set position. * * @param int $position * * @return Model */ public function setPosition($position) { $this->position = $position; return $this; } /** * Get position. * * @return int */ public function getPosition() { return $this->position; }}