src/Entity/OrderItem.php line 10

  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\OrderItemRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. #[ORM\Table(name'order_item')]
  6. #[ORM\Entity(repositoryClassOrderItemRepository::class)]
  7. class OrderItem
  8. {
  9.     #[ORM\Id]
  10.     #[ORM\GeneratedValue]
  11.     #[ORM\Column]
  12.     private ?int $id null;
  13.     #[ORM\Column]
  14.     private ?bool $isActive null;
  15.     #[ORM\ManyToOne(targetEntityOrder::class, inversedBy'orderItem')]
  16.     private ?object $order;
  17.     #[ORM\ManyToOne(targetEntityTickets::class,fetch'EAGER'inversedBy'orderItem')]
  18.     private object $ticket;
  19.     #[ORM\Column(type'float'nullabletrue)]
  20.     private ?float $discountedPrice null;
  21.     #[ORM\Column(type'float'nullabletrue)]
  22.     private ?float $price null;
  23.     #[ORM\Column(type'integer'nullabletrue)]
  24.     private ?int $quantity null;
  25.     #[ORM\Column(type'boolean'nullable:true)]
  26.     private ?bool $isPackage null;
  27.     #[ORM\Column(type'float'nullabletrue)]
  28.     private ?float $itemPrice null;
  29.     #[ORM\Column(length255nullabletrue)]
  30.     private ?string $usePromoCode null;
  31.     #[ORM\Column(type'date'nullabletrue)]
  32.     private mixed $date null;
  33.     public function getId(): ?int
  34.     {
  35.         return $this->id;
  36.     }
  37.     public function isIsActive(): ?bool
  38.     {
  39.         return $this->isActive;
  40.     }
  41.     public function setIsActive(bool $isActive): static
  42.     {
  43.         $this->isActive $isActive;
  44.         return $this;
  45.     }
  46.     public function getQuantity(): ?int
  47.     {
  48.         return $this->quantity;
  49.     }
  50.     public function setQuantity(int $quantity): static
  51.     {
  52.         $this->quantity $quantity;
  53.         return $this;
  54.     }
  55.     public function isIsPackage(): ?bool
  56.     {
  57.         return $this->isPackage;
  58.     }
  59.     public function setIsPackage(bool $isPackage): static
  60.     {
  61.         $this->isPackage $isPackage;
  62.         return $this;
  63.     }
  64.     public function getItemPrice(): ?float
  65.     {
  66.         return $this->itemPrice;
  67.     }
  68.     public function setItemPrice(?float $itemPrice): void
  69.     {
  70.         $this->itemPrice $itemPrice;
  71.     }
  72.     public function getPrice(): ?float
  73.     {
  74.         return $this->price;
  75.     }
  76.     public function setPrice(float $price): static
  77.     {
  78.         $this->price $price;
  79.         return $this;
  80.     }
  81.     public function getUsePromoCode(): ?string
  82.     {
  83.         return $this->usePromoCode;
  84.     }
  85.     public function setUsePromoCode(?string $usePromoCode): static
  86.     {
  87.         $this->usePromoCode $usePromoCode;
  88.         return $this;
  89.     }
  90.     public function getOrder(): ?Order
  91.     {
  92.         return $this->order;
  93.     }
  94.     public function setOrder(?Order $order): static
  95.     {
  96.         $this->order $order;
  97.         return $this;
  98.     }
  99.     public function getTicket(): object
  100.     {
  101.         return $this->ticket;
  102.     }
  103.     public function setTicket(object $ticket): void
  104.     {
  105.         $this->ticket $ticket;
  106.     }
  107.     public function getDiscountedPrice(): ?float
  108.     {
  109.         return $this->discountedPrice;
  110.     }
  111.     public function setDiscountedPrice(?float $discountedPrice): static
  112.     {
  113.         $this->discountedPrice $discountedPrice;
  114.         return $this;
  115.     }
  116.     public function getDate(): mixed
  117.     {
  118.         return $this->date;
  119.     }
  120.     public function setDate(mixed $date): void
  121.     {
  122.         $this->date $date;
  123.     }
  124. }