src/CoreBundle/Entity/Model.php line 15

Open in your IDE?
  1. <?php
  2. namespace CoreBundle\Entity;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use CoreBundle\Entity\Vehicles\Vehicle;
  5. use Application\Sonata\MediaBundle\Entity\Media;
  6. use DcSiteBundle\Entity\ServiceVariation;
  7. use Doctrine\Common\Collections\Collection;
  8. use BmpGatewayBundle\Entity\VehicleTestDrive;
  9. /**
  10.  * Model
  11.  */
  12. class Model
  13. {
  14.     /**
  15.      * @var integer
  16.      */
  17.     private $id;
  18.     /**
  19.      * @var integer
  20.      */
  21.     private $state;
  22.     /**
  23.      * @var string
  24.      */
  25.     private $title;
  26.     /**
  27.      * @var Brand
  28.      */
  29.     private $brand;
  30.     /**
  31.      * @var string
  32.      */
  33.     private $crm_name;
  34.     /**
  35.      * @var VehicleTestDrive
  36.      */
  37.     private $testdrive;
  38.     /**
  39.      * @var int
  40.      */
  41.     private $position;
  42.     /**
  43.      * Get id
  44.      *
  45.      * @return integer
  46.      */
  47.     public function getId()
  48.     {
  49.         return $this->id;
  50.     }
  51.     /**
  52.      * Set state
  53.      *
  54.      * @param integer $state
  55.      *
  56.      * @return Model
  57.      */
  58.     public function setState($state)
  59.     {
  60.         $this->state $state;
  61.         return $this;
  62.     }
  63.     /**
  64.      * Get state
  65.      *
  66.      * @return integer
  67.      */
  68.     public function getState()
  69.     {
  70.         return $this->state;
  71.     }
  72.     /**
  73.      * Set title
  74.      *
  75.      * @param string $title
  76.      *
  77.      * @return Model
  78.      */
  79.     public function setTitle($title)
  80.     {
  81.         $this->title $title;
  82.         return $this;
  83.     }
  84.     /**
  85.      * Get title
  86.      *
  87.      * @return string
  88.      */
  89.     public function getTitle()
  90.     {
  91.         return $this->title;
  92.     }
  93.     /**
  94.      * Set brand
  95.      *
  96.      * @param Brand $brand
  97.      *
  98.      * @return Model
  99.      */
  100.     public function setBrand(Brand $brand null)
  101.     {
  102.         $this->brand $brand;
  103.         return $this;
  104.     }
  105.     /**
  106.      * Get brand
  107.      *
  108.      * @return Brand
  109.      */
  110.     public function getBrand()
  111.     {
  112.         return $this->brand;
  113.     }
  114.     /**
  115.      * @return string
  116.      */
  117.     public function __toString()
  118.     {
  119.         if($this->getBrand()) {
  120.             return $this->getBrand()->getName().' '.(string) $this->getTitle();
  121.         }
  122.         return (string) $this->getTitle();
  123.     }
  124.     /**
  125.      * Constructor
  126.      */
  127.     public function __construct()
  128.     {
  129.         $this->accessories = new ArrayCollection();
  130.     }
  131.     /**
  132.      * Set crmName
  133.      *
  134.      * @param string $crmName
  135.      *
  136.      * @return Model
  137.      */
  138.     public function setCrmName($crmName)
  139.     {
  140.         $this->crm_name $crmName;
  141.         return $this;
  142.     }
  143.     /**
  144.      * Get crmName
  145.      *
  146.      * @return string
  147.      */
  148.     public function getCrmName()
  149.     {
  150.         return $this->crm_name;
  151.     }
  152.     /**
  153.      * @var string
  154.      */
  155.     private $crm_id;
  156.     /**
  157.      * Set crmId
  158.      *
  159.      * @param string $crmId
  160.      *
  161.      * @return Model
  162.      */
  163.     public function setCrmId($crmId)
  164.     {
  165.         $this->crm_id $crmId;
  166.         return $this;
  167.     }
  168.     /**
  169.      * Get crmId
  170.      *
  171.      * @return string
  172.      */
  173.     public function getCrmId()
  174.     {
  175.         return $this->crm_id;
  176.     }
  177.     /**
  178.      * @var string
  179.      */
  180.     private $uid_1c;
  181.     /**
  182.      * Set uid1c
  183.      *
  184.      * @param string $uid1c
  185.      *
  186.      * @return Model
  187.      */
  188.     public function setUid1c($uid1c)
  189.     {
  190.         $this->uid_1c $uid1c;
  191.         return $this;
  192.     }
  193.     /**
  194.      * Get uid1c
  195.      *
  196.      * @return string
  197.      */
  198.     public function getUid1c()
  199.     {
  200.         return $this->uid_1c;
  201.     }
  202.     /**
  203.      * @var integer
  204.      */
  205.     private $vehicle_type;
  206.     /**
  207.      * Set vehicleType
  208.      *
  209.      * @param integer $vehicleType
  210.      *
  211.      * @return Model
  212.      */
  213.     public function setVehicleType($vehicleType)
  214.     {
  215.         $this->vehicle_type $vehicleType;
  216.         return $this;
  217.     }
  218.     /**
  219.      * Get vehicleType
  220.      *
  221.      * @return integer
  222.      */
  223.     public function getVehicleType()
  224.     {
  225.         return $this->vehicle_type;
  226.     }
  227.     /**
  228.      * @var Collection
  229.      */
  230.     private $vehicles;
  231.     /**
  232.      * Add vehicle
  233.      *
  234.      * @param Vehicle $vehicle
  235.      *
  236.      * @return Model
  237.      */
  238.     public function addVehicle(Vehicle $vehicle)
  239.     {
  240.         $this->vehicles[] = $vehicle;
  241.         return $this;
  242.     }
  243.     /**
  244.      * Remove vehicle
  245.      *
  246.      * @param Vehicle $vehicle
  247.      */
  248.     public function removeVehicle(Vehicle $vehicle)
  249.     {
  250.         $this->vehicles->removeElement($vehicle);
  251.     }
  252.     /**
  253.      * Get vehicles
  254.      *
  255.      * @return Collection
  256.      */
  257.     public function getVehicles()
  258.     {
  259.         return $this->vehicles;
  260.     }
  261.     /**
  262.      * @var integer
  263.      */
  264.     private $is_autocreate;
  265.     /**
  266.      * Set isAutocreate
  267.      *
  268.      * @param integer $isAutocreate
  269.      *
  270.      * @return Model
  271.      */
  272.     public function setIsAutocreate($isAutocreate)
  273.     {
  274.         $this->is_autocreate $isAutocreate;
  275.         return $this;
  276.     }
  277.     /**
  278.      * Get isAutocreate
  279.      *
  280.      * @return integer
  281.      */
  282.     public function getIsAutocreate()
  283.     {
  284.         return $this->is_autocreate;
  285.     }
  286.     /**
  287.      * @var string
  288.      */
  289.     private $url;
  290.     /**
  291.      * Set url
  292.      *
  293.      * @param string $url
  294.      *
  295.      * @return Model
  296.      */
  297.     public function setUrl($url)
  298.     {
  299.         $this->url $url;
  300.         return $this;
  301.     }
  302.     /**
  303.      * Get url
  304.      *
  305.      * @return string
  306.      */
  307.     public function getUrl()
  308.     {
  309.         return $this->url;
  310.     }
  311.     /**
  312.      * @var string
  313.      */
  314.     private $image_hash;
  315.     /**
  316.      * @var Media
  317.      */
  318.     private $image;
  319.     /**
  320.      * Set imageHash
  321.      *
  322.      * @param string $imageHash
  323.      *
  324.      * @return Model
  325.      */
  326.     public function setImageHash($imageHash)
  327.     {
  328.         $this->image_hash $imageHash;
  329.         return $this;
  330.     }
  331.     /**
  332.      * Get imageHash
  333.      *
  334.      * @return string
  335.      */
  336.     public function getImageHash()
  337.     {
  338.         return $this->image_hash;
  339.     }
  340.     /**
  341.      * Set image
  342.      *
  343.      * @param Media $image
  344.      *
  345.      * @return Model
  346.      */
  347.     public function setImage(Media $image null)
  348.     {
  349.         $this->image $image;
  350.         return $this;
  351.     }
  352.     /**
  353.      * Get image
  354.      *
  355.      * @return Media
  356.      */
  357.     public function getImage()
  358.     {
  359.         return $this->image;
  360.     }
  361.     /**
  362.      * @var integer
  363.      */
  364.     private $ria_id;
  365.     /**
  366.      * Set riaId
  367.      *
  368.      * @param integer $riaId
  369.      *
  370.      * @return Model
  371.      */
  372.     public function setRiaId($riaId)
  373.     {
  374.         $this->ria_id $riaId;
  375.         return $this;
  376.     }
  377.     /**
  378.      * Get riaId
  379.      *
  380.      * @return integer
  381.      */
  382.     public function getRiaId()
  383.     {
  384.         return $this->ria_id;
  385.     }
  386.     /**
  387.      * @return VehicleTestDrive
  388.      */
  389.     public function getTestdrive()
  390.     {
  391.         return $this->testdrive;
  392.     }
  393.     /**
  394.      * @param VehicleTestDrive $testdrive
  395.      *
  396.      * @return Model
  397.      */
  398.     public function setTestdrive(VehicleTestDrive $testdrive)
  399.     {
  400.         $this->testdrive $testdrive;
  401.         return $this;
  402.     }
  403.     /**
  404.      * @var Collection
  405.      */
  406.     private $service_variations;
  407.     /**
  408.      * Add serviceVariation.
  409.      *
  410.      * @param ServiceVariation $serviceVariation
  411.      *
  412.      * @return Model
  413.      */
  414.     public function addServiceVariation(ServiceVariation $serviceVariation)
  415.     {
  416.         $this->service_variations[] = $serviceVariation;
  417.         return $this;
  418.     }
  419.     /**
  420.      * Remove serviceVariation.
  421.      *
  422.      * @param ServiceVariation $serviceVariation
  423.      *
  424.      * @return boolean TRUE if this collection contained the specified element, FALSE otherwise.
  425.      */
  426.     public function removeServiceVariation(ServiceVariation $serviceVariation)
  427.     {
  428.         return $this->service_variations->removeElement($serviceVariation);
  429.     }
  430.     /**
  431.      * Get serviceVariations.
  432.      *
  433.      * @return Collection
  434.      */
  435.     public function getServiceVariations()
  436.     {
  437.         return $this->service_variations;
  438.     }
  439.     /**
  440.      * Add testdrive.
  441.      *
  442.      * @param VehicleTestDrive $testdrive
  443.      *
  444.      * @return Model
  445.      */
  446.     public function addTestdrive(VehicleTestDrive $testdrive)
  447.     {
  448.         $this->testdrive[] = $testdrive;
  449.         return $this;
  450.     }
  451.     /**
  452.      * Remove testdrive.
  453.      *
  454.      * @param VehicleTestDrive $testdrive
  455.      *
  456.      * @return boolean TRUE if this collection contained the specified element, FALSE otherwise.
  457.      */
  458.     public function removeTestdrive(VehicleTestDrive $testdrive)
  459.     {
  460.         return $this->testdrive->removeElement($testdrive);
  461.     }
  462.     /**
  463.      * Set position.
  464.      *
  465.      * @param int $position
  466.      *
  467.      * @return Model
  468.      */
  469.     public function setPosition($position)
  470.     {
  471.         $this->position $position;
  472.         return $this;
  473.     }
  474.     /**
  475.      * Get position.
  476.      *
  477.      * @return int
  478.      */
  479.     public function getPosition()
  480.     {
  481.         return $this->position;
  482.     }
  483. }