src/Entity/Order/CartItem.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Order;
  3. use App\Repository\Order\CartItemRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\DBAL\Types\Types;
  7. use Doctrine\ORM\Mapping as ORM;
  8. #[ORM\Entity(repositoryClassCartItemRepository::class)]
  9. class CartItem
  10. {
  11.     #[ORM\Id]
  12.     #[ORM\GeneratedValue]
  13.     #[ORM\Column]
  14.     private ?int $id null;
  15.     #[ORM\ManyToOne(inversedBy'cartItems')]
  16.     private ?Cart $cart null;
  17.     #[ORM\Column(typeTypes::DECIMALprecision10scale2nullabletrue)]
  18.     private ?string $quantity null;
  19.     #[ORM\Column(typeTypes::DECIMALprecision10scale2nullabletrue)]
  20.     private ?string $unit_price null;
  21.     #[ORM\ManyToOne(inversedBy'cartItems')]
  22.     private ?SaleItem $saleItem null;
  23.     #[ORM\Column(length50nullabletrue)]
  24.     private ?string $type null;
  25.     public function getId(): ?int
  26.     {
  27.         return $this->id;
  28.     }
  29.     public function getCart(): ?Cart
  30.     {
  31.         return $this->cart;
  32.     }
  33.     public function setCart(?Cart $cart): static
  34.     {
  35.         $this->cart $cart;
  36.         return $this;
  37.     }
  38.     public function getQuantity(): ?string
  39.     {
  40.         return $this->quantity;
  41.     }
  42.     public function setQuantity(?string $quantity): static
  43.     {
  44.         $this->quantity $quantity;
  45.         return $this;
  46.     }
  47.     public function getUnitPrice(): ?string
  48.     {
  49.         return $this->unit_price;
  50.     }
  51.     public function setUnitPrice(?string $unit_price): static
  52.     {
  53.         $this->unit_price $unit_price;
  54.         return $this;
  55.     }
  56.     public function getSaleItem(): ?SaleItem
  57.     {
  58.         return $this->saleItem;
  59.     }
  60.     public function setSaleItem(?SaleItem $saleItem): static
  61.     {
  62.         $this->saleItem $saleItem;
  63.         return $this;
  64.     }
  65.     public function getType(): ?string
  66.     {
  67.         return $this->type;
  68.     }
  69.     public function setType(?string $type): static
  70.     {
  71.         $this->type $type;
  72.         return $this;
  73.     }
  74. }