src/Flexy/ShopBundle/Entity/Shipping/Vehicle/VehicleRent.php line 17

  1. <?php
  2. namespace App\Flexy\ShopBundle\Entity\Shipping\Vehicle;
  3. use ApiPlatform\Metadata\ApiResource;
  4. use App\Flexy\ShopBundle\Entity\Order\Order;
  5. use App\Flexy\ShopBundle\Entity\Order\OrderItem;
  6. use App\Flexy\ShopBundle\Entity\Payment\Payment;
  7. use App\Repository\Flexy\ShopBundle\Entity\Shipping\Vehicle\VehicleRentRepository;
  8. use Doctrine\Common\Collections\ArrayCollection;
  9. use Doctrine\Common\Collections\Collection;
  10. use Doctrine\DBAL\Types\Types;
  11. use Doctrine\ORM\Mapping as ORM;
  12. #[ORM\Entity(repositoryClassVehicleRentRepository::class)]
  13. #[ApiResource]
  14. class VehicleRent
  15. {
  16.     #[ORM\Id]
  17.     #[ORM\GeneratedValue]
  18.     #[ORM\Column]
  19.     private ?int $id null;
  20.     #[ORM\Column(nullabletrue)]
  21.     private ?float $amount null;
  22.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  23.     private ?\DateTimeInterface $startAt null;
  24.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  25.     private ?\DateTimeInterface $endAt null;
  26.     #[ORM\ManyToOne(inversedBy'vehicleRents')]
  27.     private ?ShippingVehicle $vehicle null;
  28.     #[ORM\OneToOne(cascade: ['persist''remove'])]
  29.     private ?OrderItem $orderItem null;
  30.     public function __construct()
  31.     {
  32.         
  33.     }
  34.     public function getId(): ?int
  35.     {
  36.         return $this->id;
  37.     }
  38.     public function getAmount(): ?float
  39.     {
  40.         return $this->amount;
  41.     }
  42.     public function setAmount(?float $amount): self
  43.     {
  44.         $this->amount $amount;
  45.         return $this;
  46.     }
  47.     public function getStartAt(): ?\DateTimeInterface
  48.     {
  49.         return $this->startAt;
  50.     }
  51.     public function setStartAt(?\DateTimeInterface $startAt): self
  52.     {
  53.         $this->startAt $startAt;
  54.         return $this;
  55.     }
  56.     public function getEndAt(): ?\DateTimeInterface
  57.     {
  58.         return $this->endAt;
  59.     }
  60.     public function setEndAt(?\DateTimeInterface $endAt): self
  61.     {
  62.         $this->endAt $endAt;
  63.         return $this;
  64.     }
  65.     public function getVehicle(): ?ShippingVehicle
  66.     {
  67.         return $this->vehicle;
  68.     }
  69.     public function setVehicle(?ShippingVehicle $vehicle): self
  70.     {
  71.         $this->vehicle $vehicle;
  72.         return $this;
  73.     }
  74.   
  75.     public function getOrderItem(): ?OrderItem
  76.     {
  77.         return $this->orderItem;
  78.     }
  79.     public function setOrderItem(?OrderItem $orderItem): self
  80.     {
  81.         $this->orderItem $orderItem;
  82.         return $this;
  83.     }
  84. }