src/Flexy/ShopBundle/Entity/Shipping/Vehicle/TechnicalControl.php line 13

  1. <?php
  2. namespace App\Flexy\ShopBundle\Entity\Shipping\Vehicle;
  3. use ApiPlatform\Metadata\ApiResource;
  4. use App\Flexy\ShopBundle\Entity\Accounting\PayableInvoice;
  5. use App\Repository\Flexy\ShopBundle\Entity\Shipping\Vehicle\TechnicalControlRepository;
  6. use Doctrine\DBAL\Types\Types;
  7. use Doctrine\ORM\Mapping as ORM;
  8. #[ORM\Entity(repositoryClassTechnicalControlRepository::class)]
  9. #[ApiResource]
  10. class TechnicalControl
  11. {
  12.     #[ORM\Id]
  13.     #[ORM\GeneratedValue]
  14.     #[ORM\Column]
  15.     private ?int $id null;
  16.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  17.     private ?\DateTimeInterface $controlAt null;
  18.     #[ORM\Column(nullabletrue)]
  19.     private ?float $counterKm null;
  20.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  21.     private ?\DateTimeInterface $futureControlAt null;
  22.     #[ORM\OneToOne(cascade: ['persist''remove'])]
  23.     private ?PayableInvoice $payableInvoice null;
  24.     #[ORM\ManyToOne(inversedBy'technicalControls')]
  25.     private ?ShippingVehicle $shippingVehicle null;
  26.     public function getId(): ?int
  27.     {
  28.         return $this->id;
  29.     }
  30.     public function getControlAt(): ?\DateTimeInterface
  31.     {
  32.         return $this->controlAt;
  33.     }
  34.     public function setControlAt(?\DateTimeInterface $controlAt): self
  35.     {
  36.         $this->controlAt $controlAt;
  37.         return $this;
  38.     }
  39.     public function getCounterKm(): ?float
  40.     {
  41.         return $this->counterKm;
  42.     }
  43.     public function setCounterKm(?float $counterKm): self
  44.     {
  45.         $this->counterKm $counterKm;
  46.         return $this;
  47.     }
  48.     public function getFutureControlAt(): ?\DateTimeInterface
  49.     {
  50.         return $this->futureControlAt;
  51.     }
  52.     public function setFutureControlAt(?\DateTimeInterface $futureControlAt): self
  53.     {
  54.         $this->futureControlAt $futureControlAt;
  55.         return $this;
  56.     }
  57.     public function getPayableInvoice(): ?PayableInvoice
  58.     {
  59.         return $this->payableInvoice;
  60.     }
  61.     public function setPayableInvoice(?PayableInvoice $payableInvoice): self
  62.     {
  63.         $this->payableInvoice $payableInvoice;
  64.         return $this;
  65.     }
  66.     public function getShippingVehicle(): ?ShippingVehicle
  67.     {
  68.         return $this->shippingVehicle;
  69.     }
  70.     public function setShippingVehicle(?ShippingVehicle $shippingVehicle): self
  71.     {
  72.         $this->shippingVehicle $shippingVehicle;
  73.         return $this;
  74.     }
  75. }