src/Flexy/ShopBundle/Entity/Shipping/Vehicle/VehicleConsumption.php line 12

  1. <?php
  2. namespace App\Flexy\ShopBundle\Entity\Shipping\Vehicle;
  3. use ApiPlatform\Metadata\ApiResource;
  4. use App\Repository\Flexy\ShopBundle\Entity\Shipping\VehicleConsumptionRepository;
  5. use Doctrine\DBAL\Types\Types;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassVehicleConsumptionRepository::class)]
  8. #[ApiResource]
  9. class VehicleConsumption
  10. {
  11.     #[ORM\Id]
  12.     #[ORM\GeneratedValue]
  13.     #[ORM\Column]
  14.     private ?int $id null;
  15.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  16.     private ?\DateTimeInterface $createdAt null;
  17.     #[ORM\Column(nullabletrue)]
  18.     private ?int $nbrKm null;
  19.     #[ORM\Column(nullabletrue)]
  20.     private ?int $nbrLiters null;
  21.     #[ORM\Column(nullabletrue)]
  22.     private ?float $pricePerLitre null;
  23.     #[ORM\Column(nullabletrue)]
  24.     private ?float $amount null;
  25.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  26.     private ?string $description null;
  27.     #[ORM\Column(length255nullabletrue)]
  28.     private ?string $place null;
  29.     #[ORM\ManyToOne(inversedBy'vehicleConsumptions')]
  30.     private ?ShippingVehicle $shippingVehicle null;
  31.     public function getId(): ?int
  32.     {
  33.         return $this->id;
  34.     }
  35.     public function getCreatedAt(): ?\DateTimeInterface
  36.     {
  37.         return $this->createdAt;
  38.     }
  39.     public function setCreatedAt(?\DateTimeInterface $createdAt): self
  40.     {
  41.         $this->createdAt $createdAt;
  42.         return $this;
  43.     }
  44.     public function getNbrKm(): ?int
  45.     {
  46.         return $this->nbrKm;
  47.     }
  48.     public function setNbrKm(?int $nbrKm): self
  49.     {
  50.         $this->nbrKm $nbrKm;
  51.         return $this;
  52.     }
  53.     public function getNbrLiters(): ?int
  54.     {
  55.         return $this->nbrLiters;
  56.     }
  57.     public function setNbrLiters(int $nbrLiters): self
  58.     {
  59.         $this->nbrLiters $nbrLiters;
  60.         return $this;
  61.     }
  62.     public function getPricePerLitre(): ?float
  63.     {
  64.         return $this->pricePerLitre;
  65.     }
  66.     public function setPricePerLitre(?float $pricePerLitre): self
  67.     {
  68.         $this->pricePerLitre $pricePerLitre;
  69.         return $this;
  70.     }
  71.     public function getAmount(): ?float
  72.     {
  73.         return $this->amount;
  74.     }
  75.     public function setAmount(?float $amount): self
  76.     {
  77.         $this->amount $amount;
  78.         return $this;
  79.     }
  80.     public function getDescription(): ?string
  81.     {
  82.         return $this->description;
  83.     }
  84.     public function setDescription(?string $description): self
  85.     {
  86.         $this->description $description;
  87.         return $this;
  88.     }
  89.     public function getPlace(): ?string
  90.     {
  91.         return $this->place;
  92.     }
  93.     public function setPlace(?string $place): self
  94.     {
  95.         $this->place $place;
  96.         return $this;
  97.     }
  98.     public function getShippingVehicle(): ?ShippingVehicle
  99.     {
  100.         return $this->shippingVehicle;
  101.     }
  102.     public function setShippingVehicle(?ShippingVehicle $shippingVehicle): self
  103.     {
  104.         $this->shippingVehicle $shippingVehicle;
  105.         return $this;
  106.     }
  107. }