src/Entity/Inspection.php line 16

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\InspectionRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Symfony\Component\HttpFoundation\File\File;
  8. /**
  9.  * @ORM\Entity(repositoryClass=InspectionRepository::class)
  10.  * @ORM\HasLifecycleCallbacks()
  11.  */
  12. class Inspection
  13. {
  14.     /**
  15.      * @ORM\Id
  16.      * @ORM\GeneratedValue
  17.      * @ORM\Column(type="integer")
  18.      */
  19.     private $id;
  20.     /**
  21.      * @ORM\Column(type="string", length=255)
  22.      */
  23.     private $clientName;
  24.     /**
  25.      * @ORM\Column(type="string", length=255, nullable=true)
  26.      */
  27.     private $clientPhone;
  28.     /**
  29.      * @ORM\Column(type="string", length=255, nullable=true)
  30.      */
  31.     private $location;
  32.     /**
  33.      * @ORM\Column(type="string", length=255, nullable=true)
  34.      */
  35.     private $inspectedBy;
  36.     /**
  37.      * @ORM\Column(type="string", length=255, nullable=true)
  38.      */
  39.     private $seller;
  40.     /**
  41.      * @ORM\Column(type="string", length=255, nullable=true)
  42.      */
  43.     private $brandModel;
  44.     /**
  45.      * @ORM\Column(type="string", length=255, nullable=true)
  46.      */
  47.     private $mileage;
  48.     /**
  49.      * @ORM\Column(type="string", length=25, nullable=true)
  50.      */
  51.     private $patent;
  52.     /**
  53.      * @ORM\Column(type="string", length=255, nullable=true)
  54.      */
  55.     private $engineType;
  56.     /**
  57.      * @ORM\Column(type="string", length=255, nullable=true)
  58.      */
  59.     private $accessories;
  60.     /**
  61.      * @ORM\Column(type="string", length=255, nullable=true)
  62.      */
  63.     private $mileageDistribution;
  64.     /**
  65.      * @ORM\Column(type="string", length=255, nullable=true)
  66.      */
  67.     private $tireCondition;
  68.     /**
  69.      * @ORM\Column(type="string", length=255, nullable=true)
  70.      */
  71.     private $checkEngine;
  72.     /**
  73.      * @ORM\Column(type="string", length=255, nullable=true)
  74.      */
  75.     private $oilMileage;
  76.     /**
  77.      * @ORM\Column(type="string", length=255, nullable=true)
  78.      */
  79.     private $duplicateKey;
  80.     /**
  81.      * @ORM\Column(type="string", length=255, nullable=true)
  82.      */
  83.     private $manuals;
  84.     /**
  85.      * @ORM\Column(type="string", length=255, nullable=true)
  86.      */
  87.     private $emergencyKit;
  88.     /**
  89.      * @ORM\Column(type="string", length=255, nullable=true)
  90.      */
  91.     private $interiorCondition;
  92.     /**
  93.      * @ORM\Column(type="string", length=255, nullable=true)
  94.      */
  95.     private $glass;
  96.     /**
  97.      * @ORM\Column(type="string", length=255, nullable=true)
  98.      */
  99.     private $exteriorCondition;
  100.     /**
  101.      * @ORM\Column(type="string", length=255, nullable=true)
  102.      */
  103.     private $engineDetails;
  104.     /**
  105.      * @ORM\Column(type="string", length=255, nullable=true)
  106.      */
  107.     private $transmissionClutch;
  108.     /**
  109.      * @ORM\Column(type="string", length=255, nullable=true)
  110.      */
  111.     private $frontRearSuspension;
  112.     /**
  113.      * @ORM\Column(type="string", length=255, nullable=true)
  114.      */
  115.     private $brakesAbs;
  116.     /**
  117.      * @ORM\Column(type="string", length=255, nullable=true)
  118.      */
  119.     private $acHeating;
  120.     /**
  121.      * @ORM\Column(type="string", length=255, nullable=true)
  122.      */
  123.     private $electronics;
  124.     /**
  125.      * @ORM\Column(type="string", length=255, nullable=true)
  126.      */
  127.     private $others;
  128.     /**
  129.      * @ORM\Column(type="datetime")
  130.      */
  131.     private $createdAt;
  132.     /**
  133.      * @ORM\Column(type="datetime", nullable=true)
  134.      */
  135.     private $updatedAt;
  136.     /**
  137.      * @ORM\OneToMany(targetEntity=InspectionImages::class, mappedBy="car", cascade={"persist", "remove"}, orphanRemoval=true)
  138.      */
  139.     private $imageId;
  140.     public function __construct()
  141.     {
  142.         $this->imageId = new ArrayCollection();
  143.     }
  144.     public function getId(): ?int
  145.     {
  146.         return $this->id;
  147.     }
  148.     public function getClientName(): ?string
  149.     {
  150.         return $this->clientName;
  151.     }
  152.     public function setClientName(string $clientName): self
  153.     {
  154.         $this->clientName $clientName;
  155.         return $this;
  156.     }
  157.     public function getClientPhone(): ?string
  158.     {
  159.         return $this->clientPhone;
  160.     }
  161.     public function setClientPhone(?string $clientPhone): self
  162.     {
  163.         $this->clientPhone $clientPhone;
  164.         return $this;
  165.     }
  166.     public function getLocation(): ?string
  167.     {
  168.         return $this->location;
  169.     }
  170.     public function setLocation(?string $location): self
  171.     {
  172.         $this->location $location;
  173.         return $this;
  174.     }
  175.     public function getInspectedBy(): ?string
  176.     {
  177.         return $this->inspectedBy;
  178.     }
  179.     public function setInspectedBy(?string $inspectedBy): self
  180.     {
  181.         $this->inspectedBy $inspectedBy;
  182.         return $this;
  183.     }
  184.     public function getSeller(): ?string
  185.     {
  186.         return $this->seller;
  187.     }
  188.     public function setSeller(?string $seller): self
  189.     {
  190.         $this->seller $seller;
  191.         return $this;
  192.     }
  193.     public function getBrandModel(): ?string
  194.     {
  195.         return $this->brandModel;
  196.     }
  197.     public function setBrandModel(?string $brandModel): self
  198.     {
  199.         $this->brandModel $brandModel;
  200.         return $this;
  201.     }
  202.     public function getMileage(): ?string
  203.     {
  204.         return $this->mileage;
  205.     }
  206.     public function setMileage(?string $mileage): self
  207.     {
  208.         $this->mileage $mileage;
  209.         return $this;
  210.     }
  211.     public function getPatent(): ?string
  212.     {
  213.         return $this->patent;
  214.     }
  215.     public function setPatent(?string $patent): self
  216.     {
  217.         $this->patent $patent;
  218.         return $this;
  219.     }
  220.     public function getEngineType(): ?string
  221.     {
  222.         return $this->engineType;
  223.     }
  224.     public function setEngineType(?string $engineType): self
  225.     {
  226.         $this->engineType $engineType;
  227.         return $this;
  228.     }
  229.     public function getAccessories(): ?string
  230.     {
  231.         return $this->accessories;
  232.     }
  233.     public function setAccessories(?string $accessories): self
  234.     {
  235.         $this->accessories $accessories;
  236.         return $this;
  237.     }
  238.     public function getMileageDistribution(): ?string
  239.     {
  240.         return $this->mileageDistribution;
  241.     }
  242.     public function setMileageDistribution(?string $mileageDistribution): self
  243.     {
  244.         $this->mileageDistribution $mileageDistribution;
  245.         return $this;
  246.     }
  247.     public function getTireCondition(): ?string
  248.     {
  249.         return $this->tireCondition;
  250.     }
  251.     public function setTireCondition(?string $tireCondition): self
  252.     {
  253.         $this->tireCondition $tireCondition;
  254.         return $this;
  255.     }
  256.     public function getCheckEngine(): ?string
  257.     {
  258.         return $this->checkEngine;
  259.     }
  260.     public function setCheckEngine(?string $checkEngine): self
  261.     {
  262.         $this->checkEngine $checkEngine;
  263.         return $this;
  264.     }
  265.     public function getOilMileage(): ?string
  266.     {
  267.         return $this->oilMileage;
  268.     }
  269.     public function setOilMileage(?string $oilMileage): self
  270.     {
  271.         $this->oilMileage $oilMileage;
  272.         return $this;
  273.     }
  274.     public function getDuplicateKey(): ?string
  275.     {
  276.         return $this->duplicateKey;
  277.     }
  278.     public function setDuplicateKey(?string $duplicateKey): self
  279.     {
  280.         $this->duplicateKey $duplicateKey;
  281.         return $this;
  282.     }
  283.     public function getManuals(): ?string
  284.     {
  285.         return $this->manuals;
  286.     }
  287.     public function setManuals(?string $manuals): self
  288.     {
  289.         $this->manuals $manuals;
  290.         return $this;
  291.     }
  292.     public function getEmergencyKit(): ?string
  293.     {
  294.         return $this->emergencyKit;
  295.     }
  296.     public function setEmergencyKit(?string $emergencyKit): self
  297.     {
  298.         $this->emergencyKit $emergencyKit;
  299.         return $this;
  300.     }
  301.     public function getInteriorCondition(): ?string
  302.     {
  303.         return $this->interiorCondition;
  304.     }
  305.     public function setInteriorCondition(?string $interiorCondition): self
  306.     {
  307.         $this->interiorCondition $interiorCondition;
  308.         return $this;
  309.     }
  310.     public function getGlass(): ?string
  311.     {
  312.         return $this->glass;
  313.     }
  314.     public function setGlass(?string $glass): self
  315.     {
  316.         $this->glass $glass;
  317.         return $this;
  318.     }
  319.     public function getExteriorCondition(): ?string
  320.     {
  321.         return $this->exteriorCondition;
  322.     }
  323.     public function setExteriorCondition(?string $exteriorCondition): self
  324.     {
  325.         $this->exteriorCondition $exteriorCondition;
  326.         return $this;
  327.     }
  328.     public function getEngineDetails(): ?string
  329.     {
  330.         return $this->engineDetails;
  331.     }
  332.     public function setEngineDetails(?string $engineDetails): self
  333.     {
  334.         $this->engineDetails $engineDetails;
  335.         return $this;
  336.     }
  337.     public function getTransmissionClutch(): ?string
  338.     {
  339.         return $this->transmissionClutch;
  340.     }
  341.     public function setTransmissionClutch(?string $transmissionClutch): self
  342.     {
  343.         $this->transmissionClutch $transmissionClutch;
  344.         return $this;
  345.     }
  346.     public function getFrontRearSuspension(): ?string
  347.     {
  348.         return $this->frontRearSuspension;
  349.     }
  350.     public function setFrontRearSuspension(?string $frontRearSuspension): self
  351.     {
  352.         $this->frontRearSuspension $frontRearSuspension;
  353.         return $this;
  354.     }
  355.     public function getBrakesAbs(): ?string
  356.     {
  357.         return $this->brakesAbs;
  358.     }
  359.     public function setBrakesAbs(?string $brakesAbs): self
  360.     {
  361.         $this->brakesAbs $brakesAbs;
  362.         return $this;
  363.     }
  364.     public function getAcHeating(): ?string
  365.     {
  366.         return $this->acHeating;
  367.     }
  368.     public function setAcHeating(?string $acHeating): self
  369.     {
  370.         $this->acHeating $acHeating;
  371.         return $this;
  372.     }
  373.     public function getElectronics(): ?string
  374.     {
  375.         return $this->electronics;
  376.     }
  377.     public function setElectronics(?string $electronics): self
  378.     {
  379.         $this->electronics $electronics;
  380.         return $this;
  381.     }
  382.     public function getOthers(): ?string
  383.     {
  384.         return $this->others;
  385.     }
  386.     public function setOthers(?string $others): self
  387.     {
  388.         $this->others $others;
  389.         return $this;
  390.     }
  391.     public function getCreatedAt(): ?\DateTimeInterface
  392.     {
  393.         return $this->createdAt;
  394.     }
  395.     /**
  396.      * @ORM\PrePersist
  397.      */
  398.     public function setCreatedAt(): self
  399.     {
  400.         $this->createdAt = new \DateTime();
  401.         return $this;
  402.     }
  403.     public function getUpdatedAt(): ?\DateTimeInterface
  404.     {
  405.         return $this->updatedAt;
  406.     }
  407.     /**
  408.      * @ORM\PreUpdate
  409.      */
  410.     public function setUpdatedAt(): self
  411.     {
  412.         $this->updatedAt = new \DateTime();
  413.         return $this;
  414.     }
  415.     /**
  416.      * @return Collection|InspectionImages[]
  417.      */
  418.     public function getImageId(): Collection
  419.     {
  420.         return $this->imageId;
  421.     }
  422.     public function addImageId(InspectionImages $imageId): self
  423.     {
  424.         if (!$this->imageId->contains($imageId)) {
  425.             //$this->imageId[] = $imageId;
  426.             $this->imageId->add($imageId);
  427.             $imageId->setCar($this);
  428.         }
  429.         return $this;
  430.     }
  431.     public function removeImageId(InspectionImages $imageId): self
  432.     {
  433.         if ($this->imageId->removeElement($imageId)) {
  434.             // set the owning side to null (unless already changed)
  435.             if ($imageId->getCar() === $this) {
  436.                 $imageId->setCar(null);
  437.             }
  438.         }
  439.         return $this;
  440.     }
  441. }