src/Entity/OrderLine.php line 9

  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\OrderLineRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. #[ORM\Entity(repositoryClassOrderLineRepository::class)]
  6. class OrderLine
  7. {
  8.     #[ORM\Id]
  9.     #[ORM\GeneratedValue]
  10.     #[ORM\Column]
  11.     private ?int $id null;
  12.     #[ORM\ManyToOne(inversedBy'orderLines',cascade: ['persist''remove'])]
  13.     private ?Order $orderRef null;
  14.     #[ORM\ManyToOne(inversedBy'orderLines')]
  15.     private ?Product $product null;
  16.     #[ORM\Column(nullabletrue)]
  17.     private ?float $qty null;
  18.     #[ORM\Column]
  19.     private ?float $prixUnite null;
  20.     #[ORM\Column(length255)]
  21.     private ?string $productName null;
  22.     public function getId(): ?int
  23.     {
  24.         return $this->id;
  25.     }
  26.     public function getOrderRef(): ?Order
  27.     {
  28.         return $this->orderRef;
  29.     }
  30.     public function setOrderRef(?Order $orderRef): self
  31.     {
  32.         $this->orderRef $orderRef;
  33.         return $this;
  34.     }
  35.     public function getProduct(): ?Product
  36.     {
  37.         return $this->product;
  38.     }
  39.     public function setProduct(?Product $product): self
  40.     {
  41.         $this->product $product;
  42.         return $this;
  43.     }
  44.     public function getQty(): ?float
  45.     {
  46.         return $this->qty;
  47.     }
  48.     public function setQty(?float $qty): self
  49.     {
  50.         $this->qty $qty;
  51.         return $this;
  52.     }
  53.     public function getPrixUnite(): ?float
  54.     {
  55.         return $this->prixUnite;
  56.     }
  57.     public function setPrixUnite(float $prixUnite): self
  58.     {
  59.         $this->prixUnite $prixUnite;
  60.         return $this;
  61.     }
  62.     public function getProductName(): ?string
  63.     {
  64.         return $this->productName;
  65.     }
  66.     public function setProductName(string $productName): self
  67.     {
  68.         $this->productName $productName;
  69.         return $this;
  70.     }
  71. }