src/Entity/Detail.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\DetailRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Entity(repositoryClass=DetailRepository::class)
  7.  */
  8. class Detail
  9. {
  10.     /**
  11.      * @ORM\Id
  12.      * @ORM\GeneratedValue
  13.      * @ORM\Column(type="integer")
  14.      */
  15.     private $id;
  16.     /**
  17.      * @ORM\ManyToOne(targetEntity=Order::class, inversedBy="details")
  18.      * @ORM\JoinColumn(nullable=false)
  19.      */
  20.     private $orderId;
  21.     /**
  22.      * @ORM\ManyToOne(targetEntity=Product::class, inversedBy="orders", cascade={"persist"})
  23.      * @ORM\JoinColumn(nullable=false)
  24.      */
  25.     private $product;
  26.     /**
  27.      * @ORM\Column(type="float")
  28.      */
  29.     private $htPrice;
  30.     /**
  31.      * @ORM\Column(type="float")
  32.      */
  33.     private $price;
  34.     /**
  35.      * @ORM\Column(type="smallint")
  36.      */
  37.     private $qty;
  38.     public function getId(): ?int
  39.     {
  40.         return $this->id;
  41.     }
  42.     public function getOrderId(): ?Order
  43.     {
  44.         return $this->orderId;
  45.     }
  46.     public function setOrderId(?Order $orderId): self
  47.     {
  48.         $this->orderId $orderId;
  49.         return $this;
  50.     }
  51.     public function getProduct(): ?Product
  52.     {
  53.         return $this->product;
  54.     }
  55.     public function setProduct(?Product $product): self
  56.     {
  57.         $this->product $product;
  58.         return $this;
  59.     }
  60.     public function getHtPrice(): ?float
  61.     {
  62.         return $this->htPrice;
  63.     }
  64.     public function setHtPrice(float $htPrice): self
  65.     {
  66.         $this->htPrice $htPrice;
  67.         return $this;
  68.     }
  69.     public function getPrice(): ?float
  70.     {
  71.         return $this->price;
  72.     }
  73.     public function setPrice(float $price): self
  74.     {
  75.         $this->price $price;
  76.         return $this;
  77.     }
  78.     public function getQty(): ?int
  79.     {
  80.         return $this->qty;
  81.     }
  82.     public function setQty(int $qty): self
  83.     {
  84.         $this->qty $qty;
  85.         return $this;
  86.     }
  87. }