src/Admin/Modules/Store/Entity/StoreOrderProduct.php line 12

  1. <?php
  2. namespace App\Admin\Modules\Store\Entity;
  3. use Doctrine\DBAL\Types\Types;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Table(name="store_order_product")
  7.  * @ORM\Entity
  8.  */
  9. class StoreOrderProduct
  10. {
  11.     /**
  12.      * @var int
  13.      *
  14.      * @ORM\Column(type="bigint", options={"unsigned"=true}))
  15.      * @ORM\Id
  16.      * @ORM\GeneratedValue(strategy="AUTO")
  17.      */
  18.     protected $id;
  19.     
  20.     /**
  21.      * @var \App\Admin\Modules\Store\Entity\StoreOrder
  22.      *
  23.      * @ORM\ManyToOne(targetEntity="App\Admin\Modules\Store\Entity\StoreOrder", inversedBy="products")
  24.      * @ORM\JoinColumns({
  25.      *   @ORM\JoinColumn(name="id_store_order", referencedColumnName="id", nullable=true, onDelete="CASCADE")
  26.      * })
  27.      */
  28.     private $order;    
  29.     /**
  30.      * @var \App\Admin\Modules\Store\Entity\StoreProduct
  31.      *
  32.      * @ORM\ManyToOne(targetEntity="App\Admin\Modules\Store\Entity\StoreProduct")
  33.      * @ORM\JoinColumns({
  34.      *   @ORM\JoinColumn(name="id_store_product", referencedColumnName="id", nullable=true, onDelete="SET NULL")
  35.      * })
  36.      */
  37.     private $product;
  38.     
  39.     /**
  40.      * @var string
  41.      *
  42.      * @ORM\Column(name="name", type="string", length=255, nullable=false)
  43.      */
  44.     private $name;
  45.     
  46.     /**
  47.      * @var int
  48.      *
  49.      * @ORM\Column(name="quantity", type="integer", nullable=false)
  50.      */
  51.     private $quantity;    
  52.     
  53.     /**
  54.      * @var string
  55.      *
  56.      * @ORM\Column(name="price", type="decimal", precision=14, scale=2, nullable=false)
  57.      */
  58.     private $price;
  59.     
  60.     /**
  61.      * @var int
  62.      *
  63.      * @ORM\Column(name="vat", type="smallint", nullable=false)
  64.      */
  65.     private $vat;
  66.     
  67.     /**
  68.      * @var string
  69.      *
  70.      * @ORM\Column(name="weight", type="string", length=25, nullable=false)
  71.      */
  72.     private $weight;
  73.     /**
  74.      * @var int
  75.      *
  76.      * @ORM\Column(name="lead_time", type="smallint", nullable=false)
  77.      */
  78.     private $leadTime;
  79.     public function getId(): ?string
  80.     {
  81.         return $this->id;
  82.     }
  83.     public function getName(): ?string
  84.     {
  85.         return $this->name;
  86.     }
  87.     public function setName(string $name): self
  88.     {
  89.         $this->name $name;
  90.         return $this;
  91.     }
  92.     public function getPrice(): ?string
  93.     {
  94.         return $this->price;
  95.     }
  96.     public function setPrice(string $price): self
  97.     {
  98.         $this->price $price;
  99.         return $this;
  100.     }
  101.     public function getVat(): ?int
  102.     {
  103.         return $this->vat;
  104.     }
  105.     public function setVat(int $vat): self
  106.     {
  107.         $this->vat $vat;
  108.         return $this;
  109.     }
  110.     public function getWeight(): ?string
  111.     {
  112.         return $this->weight;
  113.     }
  114.     public function setWeight(string $weight): self
  115.     {
  116.         $this->weight $weight;
  117.         return $this;
  118.     }
  119.     public function getLeadTime(): ?int
  120.     {
  121.         return $this->leadTime;
  122.     }
  123.     public function setLeadTime(int $leadTime): self
  124.     {
  125.         $this->leadTime $leadTime;
  126.         return $this;
  127.     }
  128.     public function getOrder(): ?StoreOrder
  129.     {
  130.         return $this->order;
  131.     }
  132.     public function setOrder(?StoreOrder $order): self
  133.     {
  134.         $this->order $order;
  135.         return $this;
  136.     }
  137.     public function getProduct(): ?StoreProduct
  138.     {
  139.         return $this->product;
  140.     }
  141.     public function setProduct(?StoreProduct $product): self
  142.     {
  143.         $this->product $product;
  144.         return $this;
  145.     }
  146.     public function getQuantity(): ?int
  147.     {
  148.         return $this->quantity;
  149.     }
  150.     public function setQuantity(int $quantity): self
  151.     {
  152.         $this->quantity $quantity;
  153.         return $this;
  154.     }
  155. }