src/Flexy/ShopBundle/Entity/Shipping/Vehicle/VehicleConsumption.php line 12
<?php
namespace App\Flexy\ShopBundle\Entity\Shipping\Vehicle;
use ApiPlatform\Metadata\ApiResource;
use App\Repository\Flexy\ShopBundle\Entity\Shipping\VehicleConsumptionRepository;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: VehicleConsumptionRepository::class)]
#[ApiResource]
class VehicleConsumption
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(type: Types::DATETIME_MUTABLE, nullable: true)]
private ?\DateTimeInterface $createdAt = null;
#[ORM\Column(nullable: true)]
private ?int $nbrKm = null;
#[ORM\Column(nullable: true)]
private ?int $nbrLiters = null;
#[ORM\Column(nullable: true)]
private ?float $pricePerLitre = null;
#[ORM\Column(nullable: true)]
private ?float $amount = null;
#[ORM\Column(type: Types::TEXT, nullable: true)]
private ?string $description = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $place = null;
#[ORM\ManyToOne(inversedBy: 'vehicleConsumptions')]
private ?ShippingVehicle $shippingVehicle = null;
public function getId(): ?int
{
return $this->id;
}
public function getCreatedAt(): ?\DateTimeInterface
{
return $this->createdAt;
}
public function setCreatedAt(?\DateTimeInterface $createdAt): self
{
$this->createdAt = $createdAt;
return $this;
}
public function getNbrKm(): ?int
{
return $this->nbrKm;
}
public function setNbrKm(?int $nbrKm): self
{
$this->nbrKm = $nbrKm;
return $this;
}
public function getNbrLiters(): ?int
{
return $this->nbrLiters;
}
public function setNbrLiters(int $nbrLiters): self
{
$this->nbrLiters = $nbrLiters;
return $this;
}
public function getPricePerLitre(): ?float
{
return $this->pricePerLitre;
}
public function setPricePerLitre(?float $pricePerLitre): self
{
$this->pricePerLitre = $pricePerLitre;
return $this;
}
public function getAmount(): ?float
{
return $this->amount;
}
public function setAmount(?float $amount): self
{
$this->amount = $amount;
return $this;
}
public function getDescription(): ?string
{
return $this->description;
}
public function setDescription(?string $description): self
{
$this->description = $description;
return $this;
}
public function getPlace(): ?string
{
return $this->place;
}
public function setPlace(?string $place): self
{
$this->place = $place;
return $this;
}
public function getShippingVehicle(): ?ShippingVehicle
{
return $this->shippingVehicle;
}
public function setShippingVehicle(?ShippingVehicle $shippingVehicle): self
{
$this->shippingVehicle = $shippingVehicle;
return $this;
}
}