src/Flexy/ShopBundle/Entity/Shipping/Vehicle/VehicleRent.php line 17
<?php
namespace App\Flexy\ShopBundle\Entity\Shipping\Vehicle;
use ApiPlatform\Metadata\ApiResource;
use App\Flexy\ShopBundle\Entity\Order\Order;
use App\Flexy\ShopBundle\Entity\Order\OrderItem;
use App\Flexy\ShopBundle\Entity\Payment\Payment;
use App\Repository\Flexy\ShopBundle\Entity\Shipping\Vehicle\VehicleRentRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: VehicleRentRepository::class)]
#[ApiResource]
class VehicleRent
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(nullable: true)]
private ?float $amount = null;
#[ORM\Column(type: Types::DATETIME_MUTABLE, nullable: true)]
private ?\DateTimeInterface $startAt = null;
#[ORM\Column(type: Types::DATETIME_MUTABLE, nullable: true)]
private ?\DateTimeInterface $endAt = null;
#[ORM\ManyToOne(inversedBy: 'vehicleRents')]
private ?ShippingVehicle $vehicle = null;
#[ORM\OneToOne(cascade: ['persist', 'remove'])]
private ?OrderItem $orderItem = null;
public function __construct()
{
}
public function getId(): ?int
{
return $this->id;
}
public function getAmount(): ?float
{
return $this->amount;
}
public function setAmount(?float $amount): self
{
$this->amount = $amount;
return $this;
}
public function getStartAt(): ?\DateTimeInterface
{
return $this->startAt;
}
public function setStartAt(?\DateTimeInterface $startAt): self
{
$this->startAt = $startAt;
return $this;
}
public function getEndAt(): ?\DateTimeInterface
{
return $this->endAt;
}
public function setEndAt(?\DateTimeInterface $endAt): self
{
$this->endAt = $endAt;
return $this;
}
public function getVehicle(): ?ShippingVehicle
{
return $this->vehicle;
}
public function setVehicle(?ShippingVehicle $vehicle): self
{
$this->vehicle = $vehicle;
return $this;
}
public function getOrderItem(): ?OrderItem
{
return $this->orderItem;
}
public function setOrderItem(?OrderItem $orderItem): self
{
$this->orderItem = $orderItem;
return $this;
}
}