src/Entity/Eg/Osm/Parking.php line 29

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Eg\Osm;
  3. use App\Entity\Eg\ParkingMeter;
  4. use App\Entity\GeoParkingShape;
  5. use App\Entity\ParkingDates;
  6. use App\Repository\ParkingRepository;
  7. use Doctrine\Common\Collections\ArrayCollection;
  8. use Doctrine\Common\Collections\Collection;
  9. use Doctrine\ORM\Mapping as ORM;
  10. use Gedmo\Mapping\Annotation as Gedmo;
  11. use Gedmo\SoftDeleteable\Traits\SoftDeleteableEntity;
  12. #[ORM\Table(name: 'eg_osm_parkings')]
  13. #[ORM\Entity(repositoryClass: ParkingRepository::class)]
  14. #[Gedmo\SoftDeleteable]
  15. #[ORM\Index(name: 'geomshape_idx', columns: ['geomshape'])]
  16. #[ORM\Index(name: 'lastoccupancychange_idx', columns: ['last_occupancy_change'])]
  17. #[ORM\Index(name: 'idx_1b3a46dc9f2c3fab', columns: ['zone_id'])]
  18. #[ORM\Index(name: 'vendorsystem_idx', columns: ['vendor_system'])]
  19. #[ORM\Index(name: 'unpaidplaces_idx', columns: ['unpaid_places'])]
  20. #[ORM\Index(name: 'lastpaymentchange_idx', columns: ['last_payment_change'])]
  21. #[ORM\Index(name: 'idx_1b3a46dc4ba67449', columns: ['parking_type_id'])]
  22. #[ORM\Index(name: 'occupiedplaces_idx', columns: ['occupied_places'])]
  23. #[ORM\Index(name: 'vendorid_idx', columns: ['vendor_id'])]
  24. #[ORM\Index(name: 'IDX_1B3A46DC62939AB5', columns: ['stop_type_id'])]
  25. #[ORM\Index(name: 'IDX_1B3A46DC18B7791E', columns: ['parking_side_id'])]
  26. class Parking
  27. {
  28.     use SoftDeleteableEntity;
  29.     #[ORM\Id]
  30.     #[ORM\GeneratedValue(strategy: 'IDENTITY')]
  31.     #[ORM\Column(type: 'integer')]
  32.     private ?int $id = null;
  33.     #[ORM\Column(name: 'aux_vendor_id', type: 'string', length: 255, nullable: true)]
  34.     private ?string $auxVendorId = null;
  35.     #[ORM\Column(name: 'callback', type: 'string', length: 255, nullable: true)]
  36.     private ?string $callback = null;
  37.     /**
  38.      * @var string|null
  39.      */
  40.     #[ORM\Column(name: 'address', type: 'string', length: 255, nullable: true)]
  41.     private $address;
  42.     /**
  43.      * @var bool|null
  44.      */
  45.     #[ORM\Column(name: 'owned', type: 'boolean', nullable: true)]
  46.     private $owned;
  47.     /**
  48.      * @var bool|null
  49.      */
  50.     #[ORM\Column(name: 'managed', type: 'boolean', nullable: true)]
  51.     private $managed;
  52.     /**
  53.      * @var bool|null
  54.      */
  55.     #[ORM\Column(name: 'payment_possible', type: 'boolean', nullable: true)]
  56.     private $paymentPossible;
  57.     /**
  58.      * @var string|null
  59.      */
  60.     #[ORM\Column(name: 'osm_ids', type: 'text', nullable: true)]
  61.     private $osmIds;
  62.     /**
  63.      * @var string
  64.      */
  65.     #[ORM\Column(name: 'custom_shape', type: 'text')]
  66.     private $customShape;
  67.     /**
  68.      * @var int|null
  69.      */
  70.     #[ORM\Column(name: 'total_places', type: 'smallint', nullable: true)]
  71.     private $totalPlaces;
  72.     /**
  73.      * @var int|null
  74.      */
  75.     #[ORM\Column(name: 'occupied_places', type: 'smallint', nullable: true)]
  76.     private $occupiedPlaces;
  77.     /**
  78.      * @var \DateTime|null
  79.      */
  80.     #[ORM\Column(name: 'last_occupancy_change', type: 'datetimetz', nullable: true)]
  81.     private $lastOccupancyChange;
  82.     /**
  83.      * @var int|null
  84.      */
  85.     #[ORM\Column(name: 'unpaid_places', type: 'smallint', nullable: true)]
  86.     private $unpaidPlaces;
  87.     /**
  88.      * @var \DateTime|null
  89.      */
  90.     #[ORM\Column(name: 'last_payment_change', type: 'datetimetz', nullable: true)]
  91.     private $lastPaymentChange;
  92.     /**
  93.      * @var string|null
  94.      */
  95.     #[ORM\Column(name: 'geomshape', type: 'geography', nullable: true, options: ['srid' => 4326])]
  96.     private $geomshape;
  97.     /**
  98.      * @var string|null
  99.      */
  100.     #[ORM\Column(name: 'ushape', type: 'geography', nullable: true, options: ['srid' => 4326])]
  101.     private $ushape;
  102.     #[ORM\Column(name: 'ushape_ctl', type: 'text', nullable: true)]
  103.     private ?string $ushapeCtl = null;
  104.     /**
  105.      * @var int|null
  106.      */
  107.     #[ORM\Column(name: 'gps_snap_radius', type: 'smallint', nullable: true, options: ['default' => 5])]
  108.     private $gpsSnapRadius = 5;
  109.     #[ORM\Column(name: 'bufferedshape', type: 'text', nullable: true)]
  110.     private ?string $bufferedshape = null;
  111.     /**
  112.      * @var string
  113.      */
  114.     #[ORM\Column(name: 'vendor_system', type: 'string', length: 30)]
  115.     private $vendorSystem;
  116.     /**
  117.      * @var string
  118.      */
  119.     #[ORM\Column(name: 'vendor_entity', type: 'string', length: 30)]
  120.     private $vendorEntity;
  121.     /**
  122.      * @var string
  123.      */
  124.     #[ORM\Column(name: 'vendor_id', type: 'string', length: 255)]
  125.     private $vendorId;
  126.     /**
  127.      * @var \DateTime
  128.      */
  129.     #[ORM\Column(name: 'last_refreshed_at', type: 'datetimetz')]
  130.     private $lastRefreshedAt;
  131.     /**
  132.      * @var string
  133.      */
  134.     #[ORM\Column(name: 'name', type: 'string', length: 255)]
  135.     private $name;
  136.     /**
  137.      * @var bool
  138.      */
  139.     #[ORM\Column(name: 'configured', type: 'boolean')]
  140.     private $configured;
  141.     #[ORM\Column(name: 'color', type: 'string', length: 7, nullable: true)]
  142.     private ?string $color = null;
  143.     #[ORM\Column(name: 'enabled', type: 'boolean', nullable: true)]
  144.     private ?bool $enabled = null;
  145.     #[ORM\Column(name: 'position_lon', type: 'float', precision: 10, scale: 0, nullable: true)]
  146.     private ?float $positionLon = null;
  147.     #[ORM\Column(name: 'position_lat', type: 'float', precision: 10, scale: 0, nullable: true)]
  148.     private ?float $positionLat = null;
  149.     #[ORM\Column(name: 'shape', type: 'text', nullable: true)]
  150.     private ?string $shape = null;
  151.     #[ORM\Column(name: 'bufferedshape2', type: 'text', nullable: true)]
  152.     private ?string $bufferedshape2 = null;
  153.     #[ORM\Column(name: 'geombufferedshape2', type: 'geography', nullable: true, options: ['srid' => 4326])]
  154.     private ?string $geombufferedshape2 = null;
  155.     #[ORM\Column(name: 'speed', type: 'integer', nullable: true)]
  156.     private ?int $speed = null;
  157.     #[ORM\ManyToOne(inversedBy: 'parkings')]
  158.     private ?ParkingType $parkingType = null;
  159.     #[ORM\ManyToOne(targetEntity: StopType::class)]
  160.     private ?StopType $stopType = null;
  161.     #[ORM\ManyToOne(targetEntity: ParkingSide::class)]
  162.     private ?ParkingSide $parkingSide = null;
  163.     #[ORM\ManyToOne(targetEntity: Zone::class, inversedBy: 'parkings')]
  164.     private ?Zone $zone = null;
  165.     /**
  166.      * @var Collection
  167.      */
  168.     #[ORM\JoinTable(name: 'eg_osm_parkings_data_agregators_join')]
  169.     #[ORM\JoinColumn(name: 'parking_id', referencedColumnName: 'id')]
  170.     #[ORM\InverseJoinColumn(name: 'data_agregator_id', referencedColumnName: 'id')]
  171.     #[ORM\ManyToMany(targetEntity: DataAggregator::class, inversedBy: 'parking')]
  172.     private $dataAggregators;
  173.     /**
  174.      * @var Collection
  175.      */
  176.     #[ORM\JoinTable(name: 'eg_osm_parking_cameras_join')]
  177.     #[ORM\JoinColumn(name: 'parking_id', referencedColumnName: 'id')]
  178.     #[ORM\InverseJoinColumn(name: 'cameras_id', referencedColumnName: 'id')]
  179.     #[ORM\ManyToMany(targetEntity: Camera::class, inversedBy: 'parking')]
  180.     private $cameras;
  181.     /**
  182.      * @var Collection
  183.      */
  184.     #[ORM\JoinTable(name: 'eg_osm_parking_parkingmeter_join')]
  185.     #[ORM\JoinColumn(name: 'parking_id', referencedColumnName: 'id')]
  186.     #[ORM\InverseJoinColumn(name: 'parking_meter_id', referencedColumnName: 'id')]
  187.     #[ORM\ManyToMany(targetEntity: ParkingMeter::class, inversedBy: 'parking')]
  188.     private $parkingMeter;
  189.     #[ORM\OneToMany(targetEntity: GeoParkingShape::class, mappedBy: 'parking')]
  190.     private $parkingShapes;
  191.     #[ORM\Column(name: 'parking_direction', type: 'float', precision: 10, scale: 0, nullable: true)]
  192.     private ?float $parkingDirection = null;
  193.     #[ORM\OneToOne(targetEntity: ParkingCarDrawingDetails::class, inversedBy: 'parking', cascade: ['persist', 'remove'])]
  194.     private $carDrawingDetails;
  195.     #[ORM\OneToMany(targetEntity: ParkingDates::class, mappedBy: 'parkingi')]
  196.     private $parkingDates;
  197.     public function __construct()
  198.     {
  199.         $this->dataAggregators = new ArrayCollection();
  200.         $this->cameras = new ArrayCollection();
  201.         $this->parkingMeter = new ArrayCollection();
  202.         $this->parkingShapes = new ArrayCollection();
  203.         $this->parkingDates = new ArrayCollection();
  204.     }
  205.     public function __toString(): string
  206.     {
  207.         return $this->name ?: 'NIEPOPRAWNIE SKONSTRUOWANY PARKING';
  208.     }
  209.     public function getId(): ?int
  210.     {
  211.         return $this->id;
  212.     }
  213.     public function getAuxVendorId(): ?string
  214.     {
  215.         return $this->auxVendorId;
  216.     }
  217.     public function setAuxVendorId(?string $auxVendorId): self
  218.     {
  219.         $this->auxVendorId = $auxVendorId;
  220.         return $this;
  221.     }
  222.     public function getCallback(): ?string
  223.     {
  224.         return $this->callback;
  225.     }
  226.     public function setCallback(?string $callback): self
  227.     {
  228.         $this->callback = $callback;
  229.         return $this;
  230.     }
  231.     public function getAddress(): ?string
  232.     {
  233.         return $this->address;
  234.     }
  235.     public function setAddress(?string $address): self
  236.     {
  237.         $this->address = $address;
  238.         return $this;
  239.     }
  240.     public function getOwned(): ?bool
  241.     {
  242.         return $this->owned;
  243.     }
  244.     public function setOwned(?bool $owned): self
  245.     {
  246.         $this->owned = $owned;
  247.         return $this;
  248.     }
  249.     public function getManaged(): ?bool
  250.     {
  251.         return $this->managed;
  252.     }
  253.     public function setManaged(?bool $managed): self
  254.     {
  255.         $this->managed = $managed;
  256.         return $this;
  257.     }
  258.     public function getPaymentPossible(): ?bool
  259.     {
  260.         return $this->paymentPossible;
  261.     }
  262.     public function setPaymentPossible(?bool $paymentPossible): self
  263.     {
  264.         $this->paymentPossible = $paymentPossible;
  265.         return $this;
  266.     }
  267.     public function getOsmIds(): ?string
  268.     {
  269.         return $this->osmIds;
  270.     }
  271.     public function setOsmIds(?string $osmIds): self
  272.     {
  273.         $this->osmIds = $osmIds;
  274.         return $this;
  275.     }
  276.     public function getCustomShape(): ?string
  277.     {
  278.         return $this->customShape;
  279.     }
  280.     public function setCustomShape(string $customShape): self
  281.     {
  282.         $this->customShape = $customShape;
  283.         return $this;
  284.     }
  285.     public function getTotalPlaces(): ?int
  286.     {
  287.         return $this->totalPlaces;
  288.     }
  289.     public function setTotalPlaces(?int $totalPlaces): self
  290.     {
  291.         $this->totalPlaces = $totalPlaces;
  292.         return $this;
  293.     }
  294.     public function getOccupiedPlaces(): ?int
  295.     {
  296.         return $this->occupiedPlaces;
  297.     }
  298.     public function setOccupiedPlaces(?int $occupiedPlaces): self
  299.     {
  300.         $this->occupiedPlaces = $occupiedPlaces;
  301.         return $this;
  302.     }
  303.     public function getLastOccupancyChange(): ?\DateTimeInterface
  304.     {
  305.         return $this->lastOccupancyChange;
  306.     }
  307.     public function setLastOccupancyChange(?\DateTimeInterface $lastOccupancyChange): self
  308.     {
  309.         $this->lastOccupancyChange = $lastOccupancyChange;
  310.         return $this;
  311.     }
  312.     public function getUnpaidPlaces(): ?int
  313.     {
  314.         return $this->unpaidPlaces;
  315.     }
  316.     public function setUnpaidPlaces(?int $unpaidPlaces): self
  317.     {
  318.         $this->unpaidPlaces = $unpaidPlaces;
  319.         return $this;
  320.     }
  321.     public function getLastPaymentChange(): ?\DateTimeInterface
  322.     {
  323.         return $this->lastPaymentChange;
  324.     }
  325.     public function setLastPaymentChange(?\DateTimeInterface $lastPaymentChange): self
  326.     {
  327.         $this->lastPaymentChange = $lastPaymentChange;
  328.         return $this;
  329.     }
  330.     public function getGeomshape()
  331.     {
  332.         return $this->geomshape;
  333.     }
  334.     public function setGeomshape($geomshape): self
  335.     {
  336.         $this->geomshape = $geomshape;
  337.         return $this;
  338.     }
  339.     public function getUshape()
  340.     {
  341.         return $this->ushape;
  342.     }
  343.     public function setUshape($ushape): self
  344.     {
  345.         $this->ushape = $ushape;
  346.         return $this;
  347.     }
  348.     public function getUshapeCtl(): ?string
  349.     {
  350.         return $this->ushapeCtl;
  351.     }
  352.     public function setUshapeCtl(?string $ushapeCtl): self
  353.     {
  354.         $this->ushapeCtl = $ushapeCtl;
  355.         return $this;
  356.     }
  357.     public function getGpsSnapRadius(): ?int
  358.     {
  359.         return $this->gpsSnapRadius;
  360.     }
  361.     public function setGpsSnapRadius(?int $gpsSnapRadius): self
  362.     {
  363.         $this->gpsSnapRadius = $gpsSnapRadius;
  364.         return $this;
  365.     }
  366.     public function getBufferedshape(): ?string
  367.     {
  368.         return $this->bufferedshape;
  369.     }
  370.     public function setBufferedshape(?string $bufferedshape): self
  371.     {
  372.         $this->bufferedshape = $bufferedshape;
  373.         return $this;
  374.     }
  375.     public function getVendorSystem(): ?string
  376.     {
  377.         return $this->vendorSystem;
  378.     }
  379.     public function setVendorSystem(string $vendorSystem): self
  380.     {
  381.         $this->vendorSystem = $vendorSystem;
  382.         return $this;
  383.     }
  384.     public function getVendorEntity(): ?string
  385.     {
  386.         return $this->vendorEntity;
  387.     }
  388.     public function setVendorEntity(string $vendorEntity): self
  389.     {
  390.         $this->vendorEntity = $vendorEntity;
  391.         return $this;
  392.     }
  393.     public function getVendorId(): ?string
  394.     {
  395.         return $this->vendorId;
  396.     }
  397.     public function setVendorId(string $vendorId): self
  398.     {
  399.         $this->vendorId = $vendorId;
  400.         return $this;
  401.     }
  402.     public function getLastRefreshedAt(): ?\DateTimeInterface
  403.     {
  404.         return $this->lastRefreshedAt;
  405.     }
  406.     public function setLastRefreshedAt(\DateTimeInterface $lastRefreshedAt): self
  407.     {
  408.         $this->lastRefreshedAt = $lastRefreshedAt;
  409.         return $this;
  410.     }
  411.     public function getName(): ?string
  412.     {
  413.         return $this->name;
  414.     }
  415.     public function setName(string $name): self
  416.     {
  417.         $this->name = $name;
  418.         return $this;
  419.     }
  420.     public function getConfigured(): ?bool
  421.     {
  422.         return $this->configured;
  423.     }
  424.     public function setConfigured(bool $configured): self
  425.     {
  426.         $this->configured = $configured;
  427.         return $this;
  428.     }
  429.     public function getColor(): ?string
  430.     {
  431.         return $this->color;
  432.     }
  433.     public function setColor(?string $color): self
  434.     {
  435.         $this->color = $color;
  436.         return $this;
  437.     }
  438.     public function getEnabled(): ?bool
  439.     {
  440.         return $this->enabled;
  441.     }
  442.     public function setEnabled(?bool $enabled): self
  443.     {
  444.         $this->enabled = $enabled;
  445.         return $this;
  446.     }
  447.     public function getPositionLon(): ?float
  448.     {
  449.         return $this->positionLon;
  450.     }
  451.     public function setPositionLon(?float $positionLon): self
  452.     {
  453.         $this->positionLon = $positionLon;
  454.         return $this;
  455.     }
  456.     public function getPositionLat(): ?float
  457.     {
  458.         return $this->positionLat;
  459.     }
  460.     public function setPositionLat(?float $positionLat): self
  461.     {
  462.         $this->positionLat = $positionLat;
  463.         return $this;
  464.     }
  465.     public function getShape(): ?string
  466.     {
  467.         return $this->shape;
  468.     }
  469.     public function setShape(?string $shape): self
  470.     {
  471.         $this->shape = $shape;
  472.         return $this;
  473.     }
  474.     public function getBufferedshape2(): ?string
  475.     {
  476.         return $this->bufferedshape2;
  477.     }
  478.     public function setBufferedshape2(?string $bufferedshape2): self
  479.     {
  480.         $this->bufferedshape2 = $bufferedshape2;
  481.         return $this;
  482.     }
  483.     public function getGeombufferedshape2()
  484.     {
  485.         return $this->geombufferedshape2;
  486.     }
  487.     public function setGeombufferedshape2($geombufferedshape2): self
  488.     {
  489.         $this->geombufferedshape2 = $geombufferedshape2;
  490.         return $this;
  491.     }
  492.     public function getSpeed(): ?int
  493.     {
  494.         return $this->speed;
  495.     }
  496.     public function setSpeed(?int $speed): self
  497.     {
  498.         $this->speed = $speed;
  499.         return $this;
  500.     }
  501.     public function getParkingType(): ?ParkingType
  502.     {
  503.         return $this->parkingType;
  504.     }
  505.     public function setParkingType(?ParkingType $parkingType): static
  506.     {
  507.         $this->parkingType = $parkingType;
  508.         return $this;
  509.     }
  510.     public function getStopType(): ?StopType
  511.     {
  512.         return $this->stopType;
  513.     }
  514.     public function setStopType(?StopType $stopType): self
  515.     {
  516.         $this->stopType = $stopType;
  517.         return $this;
  518.     }
  519.     public function getParkingSide(): ?ParkingSide
  520.     {
  521.         return $this->parkingSide;
  522.     }
  523.     public function setParkingSide(?ParkingSide $parkingSide): self
  524.     {
  525.         $this->parkingSide = $parkingSide;
  526.         return $this;
  527.     }
  528.     public function getZone(): ?Zone
  529.     {
  530.         return $this->zone;
  531.     }
  532.     public function setZone(?Zone $zone): self
  533.     {
  534.         $this->zone = $zone;
  535.         return $this;
  536.     }
  537.     /**
  538.      * @return Collection<int, DataAggregator>
  539.      */
  540.     public function getDataAggregators(): ?Collection
  541.     {
  542.         return $this->dataAggregators;
  543.     }
  544.     public function addDataAggregators(DataAggregator $dataAggregators): self
  545.     {
  546.         if (!$this->dataAggregators->contains($dataAggregators)) {
  547.             $this->dataAggregators[] = $dataAggregators;
  548.         }
  549.         return $this;
  550.     }
  551.     public function removeDataAggregators(DataAggregator $dataAggregators): self
  552.     {
  553.         $this->dataAggregators->removeElement($dataAggregators);
  554.         return $this;
  555.     }
  556.     /**
  557.      * @return Collection<int, Camera>
  558.      */
  559.     public function getCameras(): Collection
  560.     {
  561.         return $this->cameras;
  562.     }
  563.     public function addCamera(Camera $camera): self
  564.     {
  565.         if (!$this->cameras->contains($camera)) {
  566.             $this->cameras[] = $camera;
  567.         }
  568.         return $this;
  569.     }
  570.     public function removeCamera(Camera $camera): self
  571.     {
  572.         $this->cameras->removeElement($camera);
  573.         return $this;
  574.     }
  575.     /**
  576.      * @return Collection<int, ParkingMeter>
  577.      */
  578.     public function getParkingMeter(): Collection
  579.     {
  580.         return $this->parkingMeter;
  581.     }
  582.     public function addParkingMeter(ParkingMeter $parkingMeter): self
  583.     {
  584.         if (!$this->parkingMeter->contains($parkingMeter)) {
  585.             $this->parkingMeter[] = $parkingMeter;
  586.         }
  587.         return $this;
  588.     }
  589.     public function removeParkingMeter(ParkingMeter $parkingMeter): self
  590.     {
  591.         $this->parkingMeter->removeElement($parkingMeter);
  592.         return $this;
  593.     }
  594.     /**
  595.      * @return Collection<int, GeoParkingShape>
  596.      */
  597.     public function getParkingShapes(): Collection
  598.     {
  599.         return $this->parkingShapes;
  600.     }
  601.     public function addParkingShape(GeoParkingShape $parkingShape): self
  602.     {
  603.         if (!$this->parkingShapes->contains($parkingShape)) {
  604.             $this->parkingShapes[] = $parkingShape;
  605.             $parkingShape->setParking($this);
  606.         }
  607.         return $this;
  608.     }
  609.     public function calculateCenterPoint($locations)
  610.     {
  611.         $totalLat = 0;
  612.         $totalLon = 0;
  613.         foreach ($locations as $location) {
  614.             $totalLat += $location[0];
  615.             $totalLon += $location[1];
  616.         }
  617.         $totalPoints = count($locations);
  618.         $centerLat = $totalLat / $totalPoints;
  619.         $centerLon = $totalLon / $totalPoints;
  620.         return [$centerLat, $centerLon];
  621.     }
  622.     public function calculateCenterPointOfParking()
  623.     {
  624.         $points = [];
  625.         $geometry = json_decode($this->getBufferedshape(), true);
  626.         if ($geometry['type'] === 'MultiPolygon') {
  627.             foreach ($geometry['coordinates'] as $polygon) {
  628.                 foreach ($polygon as $ring) {
  629.                     foreach ($ring as $point) {
  630.                         $points[] = $point;
  631.                     }
  632.                 }
  633.             }
  634.         } elseif ($geometry['type'] === 'Polygon') {
  635.             foreach ($geometry['coordinates'] as $ring) {
  636.                 foreach ($ring as $point) {
  637.                     $points[] = $point;
  638.                 }
  639.             }
  640.         } else {
  641.             return null;
  642.         }
  643.         return $this->calculateCenterPoint($points);
  644.     }
  645.     public function removeParkingShape(GeoParkingShape $parkingShape): self
  646.     {
  647.         if ($this->parkingShapes->removeElement($parkingShape)) {
  648.             // set the owning side to null (unless already changed)
  649.             if ($parkingShape->getParking() === $this) {
  650.                 $parkingShape->setParking(null);
  651.             }
  652.         }
  653.         return $this;
  654.     }
  655.     public function getParkingDirection(): ?float
  656.     {
  657.         return $this->parkingDirection;
  658.     }
  659.     public function setParkingDirection(?float $parkingDirection): self
  660.     {
  661.         $this->parkingDirection = $parkingDirection;
  662.         return $this;
  663.     }
  664.     public function getCarDrawingDetails(): ?ParkingCarDrawingDetails
  665.     {
  666.         return $this->carDrawingDetails;
  667.     }
  668.     public function setCarDrawingDetails(?ParkingCarDrawingDetails $carDrawingDetails): self
  669.     {
  670.         $this->carDrawingDetails = $carDrawingDetails;
  671.         return $this;
  672.     }
  673.     /**
  674.      * @return Collection<int, ParkingDates>
  675.      */
  676.     public function getParkingDates(): Collection
  677.     {
  678.         return $this->parkingDates;
  679.     }
  680. }