src/Entity/Vehicle.php line 48

  1. <?php
  2. namespace App\Entity;
  3. use ApiPlatform\Doctrine\Orm\Filter\BooleanFilter;
  4. use ApiPlatform\Doctrine\Orm\Filter\NumericFilter;
  5. use ApiPlatform\Doctrine\Orm\Filter\SearchFilter;
  6. use ApiPlatform\Doctrine\Orm\Filter\OrderFilter;
  7. use ApiPlatform\Doctrine\Orm\Filter\RangeFilter;
  8. use ApiPlatform\Metadata\ApiFilter;
  9. use ApiPlatform\Metadata\ApiResource;
  10. use ApiPlatform\Metadata\Get;
  11. use ApiPlatform\Metadata\GetCollection;
  12. use App\Repository\VehicleRepository;
  13. use DateTimeImmutable;
  14. use Doctrine\Common\Collections\ArrayCollection;
  15. use Doctrine\Common\Collections\Collection;
  16. use Doctrine\DBAL\Types\Types;
  17. use Doctrine\ORM\Mapping as ORM;
  18. use Symfony\Component\Serializer\Annotation\Groups;
  19. #[ApiResource(
  20.     description'Vehicle from dealers ...',
  21.     operations: [
  22.         new Get(),
  23.         new GetCollection(
  24.             cacheHeaders: [
  25.                 'max_age' => 60,
  26.                 'shared_max_age' => 120
  27.             ]
  28.         )
  29.     ],
  30.     normalizationContext: ['groups' => ['vehicle:read']]
  31. )]
  32. #[ApiFilter(SearchFilter::class, properties: ['partKind' => 'exact''category' => 'exact''category.url' => 'exact''kind' => 'exact''manufacturer' => 'exact',
  33.     'model' => 'exact''type' => 'exact''body' => 'exact''color' => 'exact''fuel' => 'exact',
  34.     'gearbox' => 'exact''conditionVehicle' => 'exact''drive' => 'exact''country' => 'exact',
  35.     'dealerAd.dealer.codeRegion' => 'exact''dealerAd.dealer.codeDistrict' => 'exact''' => 'exact',])]
  36. #[ApiFilter(OrderFilter::class, properties: ['createAt'])]
  37. #[ApiFilter(RangeFilter::class, properties: ['price''madeDate''mileage''engineVolume'])]
  38. #[ApiFilter(BooleanFilter::class, properties: ['visible''dealer.visible''firstOwner''dealerAd.dealer.visibleVehicle''equipments.name'])]
  39. #[ApiFilter(NumericFilter::class, properties: ['doors''places'])]
  40. #[ORM\Index(columns: ["gearbox"], name"gearbox_idx")]
  41. #[ORM\Index(columns: ["first_seen_at"], name"first_seen_at_idx")]
  42. #[ORM\UniqueConstraint(name"UNIQ_VEHICLE_IMPORT_IDENTITY"columns: ["id_import""create_at"])]
  43. #[ORM\Entity(repositoryClassVehicleRepository::class)]
  44. class Vehicle
  45. {
  46.     #[Groups(['vehicle:read'])]
  47.     #[ORM\Id]
  48.     #[ORM\GeneratedValue]
  49.     #[ORM\Column]
  50.     private ?int $id null;
  51.     #[Groups(['vehicle:read'])]
  52.     #[ORM\Column(nullabletrue)]
  53.     private ?int $idImport null;
  54.     #[Groups(['vehicle:read'])]
  55.     #[ORM\Column]
  56.     private ?bool $visible null;
  57.     #[Groups(['vehicle:read'])]
  58.     #[ORM\Column]
  59.     private ?DateTimeImmutable $createAt null;
  60.     #[ORM\Column(nullabletrue)]
  61.     private ?DateTimeImmutable $hiddenAt null;
  62.     #[ORM\Column(nullabletrue)]
  63.     private ?DateTimeImmutable $firstSeenAt null;
  64.     #[ORM\Column(nullabletrue)]
  65.     private ?DateTimeImmutable $lastSeenAt null;
  66.     #[ORM\Column(length500nullabletrue)]
  67.     private ?string $seoSlug null;
  68.     #[ORM\Column(length255nullabletrue)]
  69.     private ?string $seoTitle null;
  70.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  71.     private ?string $seoDescription null;
  72.     #[ORM\Column(length255nullabletrue)]
  73.     private ?string $seoH1 null;
  74.     #[ORM\Column(nullabletrue)]
  75.     private ?DateTimeImmutable $urlGeneratedAt null;
  76.     #[Groups(['vehicle:read'])]
  77.     #[ORM\Column(length255nullabletrue)]
  78.     private ?string $vin null;
  79.     #[Groups(['vehicle:read'])]
  80.     #[ORM\Column(nullabletrue)]
  81.     private ?int $places null;
  82.     #[Groups(['vehicle:read'])]
  83.     #[ORM\Column(nullabletrue)]
  84.     private ?int $doors null;
  85.     #[Groups(['vehicle:read'])]
  86.     #[ORM\Column(nullabletrue)]
  87.     private ?float $loadCapacity null;
  88.     #[Groups(['vehicle:read'])]
  89.     #[ORM\Column(nullabletrue)]
  90.     private ?float $totalWeight null;
  91.     #[Groups(['vehicle:read'])]
  92.     #[ORM\Column(nullabletrue)]
  93.     private ?string $state null;
  94.     #[Groups(['vehicle:read'])]
  95.     #[ORM\Column(nullabletrue)]
  96.     private ?int $mileage null;
  97.     #[Groups(['vehicle:read'])]
  98.     #[ORM\Column(length5nullabletrue)]
  99.     private ?string $mileageUnit null;
  100.     #[Groups(['vehicle:read'])]
  101.     #[ORM\Column(nullabletrue)]
  102.     private ?int $madeDate null;
  103.     #[Groups(['vehicle:read'])]
  104.     #[ORM\Column]
  105.     private ?int $price null;
  106.     #[Groups(['vehicle:read'])]
  107.     #[ORM\Column(nullabletrue)]
  108.     private ?bool $vat null;
  109.     #[Groups(['vehicle:read'])]
  110.     #[ORM\Column(nullabletrue)]
  111.     private ?int $priceBefore null;
  112.     #[Groups(['vehicle:read'])]
  113.     #[ORM\Column(nullabletrue)]
  114.     private ?int $priceLeasing null;
  115.     #[Groups(['vehicle:read'])]
  116.     #[ORM\Column(nullabletrue)]
  117.     private ?int $paymentLeasingCount null;
  118.     #[Groups(['vehicle:read'])]
  119.     #[ORM\Column(nullabletrue)]
  120.     private ?bool $ecoVat null;
  121.     #[Groups(['vehicle:read'])]
  122.     #[ORM\Column(nullabletrue)]
  123.     private ?int $engineVolume null;
  124.     #[Groups(['vehicle:read'])]
  125.     #[ORM\Column(nullabletrue)]
  126.     private ?int $stkTo null;
  127.     #[Groups(['vehicle:read'])]
  128.     #[ORM\Column(nullabletrue)]
  129.     private ?bool $firstOwner null;
  130.     #[Groups(['vehicle:read'])]
  131.     #[ORM\Column(nullabletrue)]
  132.     private ?bool $serviceBook null;
  133.     #[Groups(['vehicle:read'])]
  134.     #[ORM\Column(nullabletrue)]
  135.     private ?bool $tuning null;
  136.     #[Groups(['vehicle:read'])]
  137.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  138.     private ?string $note null;
  139.     #[Groups(['vehicle:read'])]
  140.     #[ORM\Column(nullabletrue)]
  141.     private ?int $enginePower null;
  142.     #[Groups(['vehicle:read'])]
  143.     #[ORM\Column(nullabletrue)]
  144.     private ?string $type null;
  145.     #[Groups(['vehicle:read'])]
  146.     #[ORM\Column(nullabletrue)]
  147.     private ?bool $notCrashed null;
  148.     #[Groups(['vehicle:read'])]
  149.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  150.     private ?string $financialInfo null;
  151.     #[Groups(['vehicle:read'])]
  152.     #[ORM\ManyToOne(inversedBy'vehicles')]
  153.     private ?VehicleCategory $category null;
  154.     #[Groups(['vehicle:read'])]
  155.     #[ORM\ManyToOne(inversedBy'vehicles')]
  156.     private ?VehicleKind $kind null;
  157.     #[Groups(['vehicle:read'])]
  158.     #[ORM\ManyToOne(inversedBy'vehicles')]
  159.     private ?VehicleSubKind $subKind null;
  160.     #[Groups(['vehicle:read'])]
  161.     #[ORM\ManyToOne(inversedBy'vehicles')]
  162.     private ?VehicleModel $model null;
  163.     #[Groups(['vehicle:read'])]
  164.     #[ORM\ManyToOne(inversedBy'vehicles')]
  165.     private ?VehicleBody $body null;
  166.     #[Groups(['vehicle:read'])]
  167.     #[ORM\ManyToOne(inversedBy'vehicles')]
  168.     private ?VehicleColor $color null;
  169.     #[Groups(['vehicle:read'])]
  170.     #[ORM\ManyToOne(inversedBy'vehicles')]
  171.     private ?VehicleFuel $fuel null;
  172.     #[Groups(['vehicle:read'])]
  173.     #[ORM\ManyToOne(inversedBy'vehicles')]
  174.     private ?VehicleCondition $conditionVehicle null;
  175.     #[Groups(['vehicle:read'])]
  176.     #[ORM\ManyToMany(targetEntityVehicleFinancial::class, inversedBy'vehicles'cascade: ['persist''remove'])]
  177.     private Collection $financials;
  178.     #[Groups(['vehicle:read'])]
  179.     #[ORM\ManyToMany(targetEntityVehicleEquipment::class, inversedBy'vehicles'cascade: ['persist''remove'])]
  180.     private Collection $equipments;
  181.     #[Groups(['vehicle:read'])]
  182.     #[ORM\OrderBy(['main' => 'DESC''id' => 'ASC'])]
  183.     #[ORM\OneToMany(mappedBy'vehicle'targetEntityVehicleImage::class, cascade: ['persist''remove'])]
  184.     private Collection $vehicleImages;
  185.     #[Groups(['vehicle:read'])]
  186.     #[ORM\Column(nullabletrue)]
  187.     private ?int $paymentLeasing null;
  188.     #[Groups(['vehicle:read'])]
  189.     #[ORM\ManyToOne(inversedBy'vehicles')]
  190.     private ?VehiclePartKind $partKind null;
  191.     #[Groups(['vehicle:read'])]
  192.     #[ORM\ManyToOne(inversedBy'vehicles')]
  193.     private ?VehicleManufacturer $manufacturer null;
  194.     #[ORM\OneToOne(mappedBy'vehicle'cascade: ['persist''remove'])]
  195.     private ?VehicleTip $vehicleTip null;
  196.     #[ORM\ManyToOne(inversedBy'vehicles')]
  197.     private ?Dealer $dealer null;
  198.     #[Groups(['vehicle:read'])]
  199.     #[ORM\Column(length100nullabletrue)]
  200.     private ?string $gearbox null;
  201.     #[ORM\OneToMany(mappedBy'vehicle'targetEntityVehicleForm::class)]
  202.     private Collection $vehicleForms;
  203.     public function __construct()
  204.     {
  205.         $this->financials = new ArrayCollection();
  206.         $this->equipments = new ArrayCollection();
  207.         $this->vehicleImages = new ArrayCollection();
  208.         $this->vehicleForms = new ArrayCollection();
  209.     }
  210.     public function getId(): ?int
  211.     {
  212.         return $this->id;
  213.     }
  214.     public function getIdImport(): ?int
  215.     {
  216.         return $this->idImport;
  217.     }
  218.     /**
  219.      * @return string|null
  220.      */
  221.     public function getType(): ?string
  222.     {
  223.         return $this->type;
  224.     }
  225.     /**
  226.      * @param string|null $type
  227.      */
  228.     public function setType(?string $type): void
  229.     {
  230.         $this->type $type;
  231.     }
  232.     public function setIdImport(?int $idImport): self
  233.     {
  234.         $this->idImport $idImport;
  235.         return $this;
  236.     }
  237.     public function isVisible(): ?bool
  238.     {
  239.         return $this->visible;
  240.     }
  241.     public function setVisible(bool $visible): self
  242.     {
  243.         $this->visible $visible;
  244.         return $this;
  245.     }
  246.     public function getCreateAt(): ?DateTimeImmutable
  247.     {
  248.         return $this->createAt;
  249.     }
  250.     public function setCreateAt(DateTimeImmutable $createAt): self
  251.     {
  252.         $this->createAt $createAt;
  253.         return $this;
  254.     }
  255.     public function getVin(): ?string
  256.     {
  257.         return $this->vin;
  258.     }
  259.     public function setVin(string $vin): self
  260.     {
  261.         $this->vin $vin;
  262.         return $this;
  263.     }
  264.     public function getPlaces(): ?int
  265.     {
  266.         return $this->places;
  267.     }
  268.     public function setPlaces(int $places): self
  269.     {
  270.         $this->places $places;
  271.         return $this;
  272.     }
  273.     public function getDoors(): ?int
  274.     {
  275.         return $this->doors;
  276.     }
  277.     public function setDoors(?int $doors): self
  278.     {
  279.         $this->doors $doors;
  280.         return $this;
  281.     }
  282.     public function getLoadCapacity(): ?float
  283.     {
  284.         return $this->loadCapacity;
  285.     }
  286.     public function setLoadCapacity(float $loadCapacity): self
  287.     {
  288.         $this->loadCapacity $loadCapacity;
  289.         return $this;
  290.     }
  291.     public function getTotalWeight(): ?float
  292.     {
  293.         return $this->totalWeight;
  294.     }
  295.     public function setTotalWeight(float $totalWeight): self
  296.     {
  297.         $this->totalWeight $totalWeight;
  298.         return $this;
  299.     }
  300.     public function getState(): ?string
  301.     {
  302.         return $this->state;
  303.     }
  304.     public function setState(string $state): self
  305.     {
  306.         $this->state $state;
  307.         return $this;
  308.     }
  309.     public function getMileage(): ?int
  310.     {
  311.         return $this->mileage;
  312.     }
  313.     public function setMileage(?int $mileage): self
  314.     {
  315.         $this->mileage $mileage;
  316.         return $this;
  317.     }
  318.     public function getMileageUnit(): ?string
  319.     {
  320.         return $this->mileageUnit;
  321.     }
  322.     public function setMileageUnit(?string $mileageUnit): self
  323.     {
  324.         $this->mileageUnit $mileageUnit;
  325.         return $this;
  326.     }
  327.     public function getMadeDate(): ?int
  328.     {
  329.         return $this->madeDate;
  330.     }
  331.     public function setMadeDate(?int $madeDate): self
  332.     {
  333.         $this->madeDate $madeDate;
  334.         return $this;
  335.     }
  336.     public function getPrice(): ?int
  337.     {
  338.         return $this->price;
  339.     }
  340.     public function setPrice(int $price): self
  341.     {
  342.         $this->price $price;
  343.         return $this;
  344.     }
  345.     public function isVat(): ?bool
  346.     {
  347.         return $this->vat;
  348.     }
  349.     public function setVat(bool $vat): self
  350.     {
  351.         $this->vat $vat;
  352.         return $this;
  353.     }
  354.     public function getPriceBefore(): ?int
  355.     {
  356.         return $this->priceBefore;
  357.     }
  358.     public function setPriceBefore(int $priceBefore): self
  359.     {
  360.         $this->priceBefore $priceBefore;
  361.         return $this;
  362.     }
  363.     public function getPriceLeasing(): ?int
  364.     {
  365.         return $this->priceLeasing;
  366.     }
  367.     public function setPriceLeasing(?int $priceLeasing): self
  368.     {
  369.         $this->priceLeasing $priceLeasing;
  370.         return $this;
  371.     }
  372.     public function getPaymentLeasingCount(): ?int
  373.     {
  374.         return $this->paymentLeasingCount;
  375.     }
  376.     public function setPaymentLeasingCount(?int $paymentLeasingCount): self
  377.     {
  378.         $this->paymentLeasingCount $paymentLeasingCount;
  379.         return $this;
  380.     }
  381.     public function isEcoVat(): ?bool
  382.     {
  383.         return $this->ecoVat;
  384.     }
  385.     public function setEcoVat(bool $ecoVat): self
  386.     {
  387.         $this->ecoVat $ecoVat;
  388.         return $this;
  389.     }
  390.     public function getEngineVolume(): ?int
  391.     {
  392.         return $this->engineVolume;
  393.     }
  394.     public function setEngineVolume(int $engineVolume): self
  395.     {
  396.         $this->engineVolume $engineVolume;
  397.         return $this;
  398.     }
  399.     public function getStkTo(): ?int
  400.     {
  401.         return $this->stkTo;
  402.     }
  403.     public function setStkTo(?int $stkTo): self
  404.     {
  405.         $this->stkTo $stkTo;
  406.         return $this;
  407.     }
  408.     public function isFirstOwner(): ?bool
  409.     {
  410.         return $this->firstOwner;
  411.     }
  412.     public function setFirstOwner(?bool $firstOwner): self
  413.     {
  414.         $this->firstOwner $firstOwner;
  415.         return $this;
  416.     }
  417.     public function isServiceBook(): ?bool
  418.     {
  419.         return $this->serviceBook;
  420.     }
  421.     public function setServiceBook(bool $serviceBook): self
  422.     {
  423.         $this->serviceBook $serviceBook;
  424.         return $this;
  425.     }
  426.     public function isTuning(): ?bool
  427.     {
  428.         return $this->tuning;
  429.     }
  430.     public function setTuning(bool $tuning): self
  431.     {
  432.         $this->tuning $tuning;
  433.         return $this;
  434.     }
  435.     public function getNote(): ?string
  436.     {
  437.         return $this->note;
  438.     }
  439.     public function setNote(?string $note): self
  440.     {
  441.         $this->note $note;
  442.         return $this;
  443.     }
  444.     public function getEnginePower(): ?int
  445.     {
  446.         return $this->enginePower;
  447.     }
  448.     public function setEnginePower(int $enginePower): self
  449.     {
  450.         $this->enginePower $enginePower;
  451.         return $this;
  452.     }
  453.     public function isNotCrashed(): ?bool
  454.     {
  455.         return $this->notCrashed;
  456.     }
  457.     public function setNotCrashed(bool $notCrashed): self
  458.     {
  459.         $this->notCrashed $notCrashed;
  460.         return $this;
  461.     }
  462.     public function getFinancialInfo(): ?string
  463.     {
  464.         return $this->financialInfo;
  465.     }
  466.     public function setFinancialInfo(?string $financialInfo): self
  467.     {
  468.         $this->financialInfo $financialInfo;
  469.         return $this;
  470.     }
  471.     public function getCategory(): ?VehicleCategory
  472.     {
  473.         return $this->category;
  474.     }
  475.     public function setCategory(?VehicleCategory $category): self
  476.     {
  477.         $this->category $category;
  478.         return $this;
  479.     }
  480.     public function getKind(): ?VehicleKind
  481.     {
  482.         return $this->kind;
  483.     }
  484.     public function setKind(?VehicleKind $kind): self
  485.     {
  486.         $this->kind $kind;
  487.         return $this;
  488.     }
  489.     public function getSubKind(): ?VehicleSubKind
  490.     {
  491.         return $this->subKind;
  492.     }
  493.     public function setSubKind(?VehicleSubKind $subKind): self
  494.     {
  495.         $this->subKind $subKind;
  496.         return $this;
  497.     }
  498.     public function getModel(): ?VehicleModel
  499.     {
  500.         return $this->model;
  501.     }
  502.     public function setModel(?VehicleModel $model): self
  503.     {
  504.         $this->model $model;
  505.         return $this;
  506.     }
  507.     public function getBody(): ?VehicleBody
  508.     {
  509.         return $this->body;
  510.     }
  511.     public function setBody(?VehicleBody $body): self
  512.     {
  513.         $this->body $body;
  514.         return $this;
  515.     }
  516.     public function getColor(): ?VehicleColor
  517.     {
  518.         return $this->color;
  519.     }
  520.     public function setColor(?VehicleColor $color): self
  521.     {
  522.         $this->color $color;
  523.         return $this;
  524.     }
  525.     public function getFuel(): ?VehicleFuel
  526.     {
  527.         return $this->fuel;
  528.     }
  529.     public function setFuel(?VehicleFuel $fuel): self
  530.     {
  531.         $this->fuel $fuel;
  532.         return $this;
  533.     }
  534.     public function getConditionVehicle(): ?VehicleCondition
  535.     {
  536.         return $this->conditionVehicle;
  537.     }
  538.     public function setConditionVehicle(?VehicleCondition $conditionVehicle): self
  539.     {
  540.         $this->conditionVehicle $conditionVehicle;
  541.         return $this;
  542.     }
  543.     /**
  544.      * @return Collection<int, VehicleFinancial>
  545.      */
  546.     public function getFinancials(): Collection
  547.     {
  548.         return $this->financials;
  549.     }
  550.     public function addFinancial(VehicleFinancial $financial): self
  551.     {
  552.         if (!$this->financials->contains($financial)) {
  553.             $this->financials->add($financial);
  554.         }
  555.         return $this;
  556.     }
  557.     public function removeFinancial(VehicleFinancial $financial): self
  558.     {
  559.         $this->financials->removeElement($financial);
  560.         return $this;
  561.     }
  562.     /**
  563.      * @return Collection<int, VehicleEquipment>
  564.      */
  565.     public function getEquipments(): Collection
  566.     {
  567.         return $this->equipments;
  568.     }
  569.     public function addEquipment(VehicleEquipment $equipment): self
  570.     {
  571.         if (!$this->equipments->contains($equipment)) {
  572.             $this->equipments->add($equipment);
  573.         }
  574.         return $this;
  575.     }
  576.     public function removeEquipment(VehicleEquipment $equipment): self
  577.     {
  578.         $this->equipments->removeElement($equipment);
  579.         return $this;
  580.     }
  581.     /**
  582.      * @return Collection<int, VehicleImage>
  583.      */
  584.     public function getVehicleImages(): Collection
  585.     {
  586.         return $this->vehicleImages;
  587.     }
  588.     public function addVehicleImage(VehicleImage $vehicleImage): self
  589.     {
  590.         if (!$this->vehicleImages->contains($vehicleImage)) {
  591.             $this->vehicleImages->add($vehicleImage);
  592.             $vehicleImage->setVehicle($this);
  593.         }
  594.         return $this;
  595.     }
  596.     public function removeVehicleImage(VehicleImage $vehicleImage): self
  597.     {
  598.         if ($this->vehicleImages->removeElement($vehicleImage)) {
  599.             // set the owning side to null (unless already changed)
  600.             if ($vehicleImage->getVehicle() === $this) {
  601.                 $vehicleImage->setVehicle(null);
  602.             }
  603.         }
  604.         return $this;
  605.     }
  606.     public function getPaymentLeasing(): ?int
  607.     {
  608.         return $this->paymentLeasing;
  609.     }
  610.     public function setPaymentLeasing(?int $paymentLeasing): self
  611.     {
  612.         $this->paymentLeasing $paymentLeasing;
  613.         return $this;
  614.     }
  615.     public function getPartKind(): ?VehiclePartKind
  616.     {
  617.         return $this->partKind;
  618.     }
  619.     public function setPartKind(?VehiclePartKind $partKind): self
  620.     {
  621.         $this->partKind $partKind;
  622.         return $this;
  623.     }
  624.     public function getManufacturer(): ?VehicleManufacturer
  625.     {
  626.         return $this->manufacturer;
  627.     }
  628.     public function setManufacturer(?VehicleManufacturer $manufacturer): self
  629.     {
  630.         $this->manufacturer $manufacturer;
  631.         return $this;
  632.     }
  633.     public function getVehicleTip(): ?VehicleTip
  634.     {
  635.         return $this->vehicleTip;
  636.     }
  637.     public function setVehicleTip(?VehicleTip $vehicleTip): self
  638.     {
  639.         // unset the owning side of the relation if necessary
  640.         if ($vehicleTip === null && $this->vehicleTip !== null) {
  641.             $this->vehicleTip->setVehicle(null);
  642.         }
  643.         // set the owning side of the relation if necessary
  644.         if ($vehicleTip !== null && $vehicleTip->getVehicle() !== $this) {
  645.             $vehicleTip->setVehicle($this);
  646.         }
  647.         $this->vehicleTip $vehicleTip;
  648.         return $this;
  649.     }
  650.     public function getDealer(): ?Dealer
  651.     {
  652.         return $this->dealer;
  653.     }
  654.     public function setDealer(?Dealer $dealer): self
  655.     {
  656.         $this->dealer $dealer;
  657.         return $this;
  658.     }
  659.     public function getGearbox(): ?string
  660.     {
  661.         return $this->gearbox;
  662.     }
  663.     public function setGearbox(?string $gearbox): self
  664.     {
  665.         $this->gearbox $gearbox;
  666.         return $this;
  667.     }
  668.     /**
  669.      * @return Collection<int, VehicleForm>
  670.      */
  671.     public function getVehicleForms(): Collection
  672.     {
  673.         return $this->vehicleForms;
  674.     }
  675.     public function addVehicleForm(VehicleForm $vehicleForm): self
  676.     {
  677.         if (!$this->vehicleForms->contains($vehicleForm)) {
  678.             $this->vehicleForms->add($vehicleForm);
  679.             $vehicleForm->setVehicle($this);
  680.         }
  681.         return $this;
  682.     }
  683.     public function removeVehicleForm(VehicleForm $vehicleForm): self
  684.     {
  685.         if ($this->vehicleForms->removeElement($vehicleForm)) {
  686.             // set the owning side to null (unless already changed)
  687.             if ($vehicleForm->getVehicle() === $this) {
  688.                 $vehicleForm->setVehicle(null);
  689.             }
  690.         }
  691.         return $this;
  692.     }
  693.     public function getHiddenAt(): ?DateTimeImmutable
  694.     {
  695.         return $this->hiddenAt;
  696.     }
  697.     public function setHiddenAt(?DateTimeImmutable $hiddenAt): self
  698.     {
  699.         $this->hiddenAt $hiddenAt;
  700.         return $this;
  701.     }
  702.     public function getFirstSeenAt(): ?DateTimeImmutable
  703.     {
  704.         return $this->firstSeenAt;
  705.     }
  706.     public function setFirstSeenAt(?DateTimeImmutable $firstSeenAt): self
  707.     {
  708.         $this->firstSeenAt $firstSeenAt;
  709.         return $this;
  710.     }
  711.     public function getLastSeenAt(): ?DateTimeImmutable
  712.     {
  713.         return $this->lastSeenAt;
  714.     }
  715.     public function setLastSeenAt(?DateTimeImmutable $lastSeenAt): self
  716.     {
  717.         $this->lastSeenAt $lastSeenAt;
  718.         return $this;
  719.     }
  720.     public function getSeoSlug(): ?string
  721.     {
  722.         return $this->seoSlug;
  723.     }
  724.     public function setSeoSlug(?string $seoSlug): self
  725.     {
  726.         $this->seoSlug $seoSlug;
  727.         return $this;
  728.     }
  729.     public function getSeoTitle(): ?string
  730.     {
  731.         return $this->seoTitle;
  732.     }
  733.     public function setSeoTitle(?string $seoTitle): self
  734.     {
  735.         $this->seoTitle $seoTitle;
  736.         return $this;
  737.     }
  738.     public function getSeoDescription(): ?string
  739.     {
  740.         return $this->seoDescription;
  741.     }
  742.     public function setSeoDescription(?string $seoDescription): self
  743.     {
  744.         $this->seoDescription $seoDescription;
  745.         return $this;
  746.     }
  747.     public function getSeoH1(): ?string
  748.     {
  749.         return $this->seoH1;
  750.     }
  751.     public function setSeoH1(?string $seoH1): self
  752.     {
  753.         $this->seoH1 $seoH1;
  754.         return $this;
  755.     }
  756.     public function getUrlGeneratedAt(): ?DateTimeImmutable
  757.     {
  758.         return $this->urlGeneratedAt;
  759.     }
  760.     public function setUrlGeneratedAt(?DateTimeImmutable $urlGeneratedAt): self
  761.     {
  762.         $this->urlGeneratedAt $urlGeneratedAt;
  763.         return $this;
  764.     }
  765. }