You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

OrderProduct.php 2.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. <?php
  2. namespace Lc\ShopBundle\Model;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5. * @ORM\MappedSuperclass()
  6. */
  7. abstract class OrderProduct extends AbstractEntity
  8. {
  9. /**
  10. * @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\OrderShopInterface", inversedBy="orderProducts")
  11. * @ORM\JoinColumn(nullable=false)
  12. */
  13. protected $orderShop;
  14. /**
  15. * @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\ProductInterface")
  16. */
  17. protected $product;
  18. /**
  19. * @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\TaxRateInterface")
  20. * @ORM\JoinColumn(nullable=false)
  21. */
  22. protected $taxRate;
  23. /**
  24. * @ORM\Column(type="float")
  25. */
  26. protected $price;
  27. /**
  28. * @ORM\Column(type="string", length=31)
  29. */
  30. protected $unit;
  31. /**
  32. * @ORM\Column(type="float")
  33. */
  34. protected $quantity;
  35. /**
  36. * @ORM\Column(type="string", length=255)
  37. */
  38. protected $title;
  39. public function getOrderShop(): ?OrderShop
  40. {
  41. return $this->orderShop;
  42. }
  43. public function setOrderShop(?OrderShop $orderShop): self
  44. {
  45. $this->orderShop = $orderShop;
  46. return $this;
  47. }
  48. public function getProduct(): ?Product
  49. {
  50. return $this->product;
  51. }
  52. public function setProduct(?Product $product): self
  53. {
  54. $this->product = $product;
  55. return $this;
  56. }
  57. public function getTaxRate(): ?TaxRate
  58. {
  59. return $this->taxRate;
  60. }
  61. public function setTaxRate(?TaxRate $taxRate): self
  62. {
  63. $this->taxRate = $taxRate;
  64. return $this;
  65. }
  66. public function getPrice(): ?float
  67. {
  68. return $this->price;
  69. }
  70. public function setPrice(float $price): self
  71. {
  72. $this->price = $price;
  73. return $this;
  74. }
  75. public function getUnit(): ?string
  76. {
  77. return $this->unit;
  78. }
  79. public function setUnit(string $unit): self
  80. {
  81. $this->unit = $unit;
  82. return $this;
  83. }
  84. public function getQuantity(): ?float
  85. {
  86. return $this->quantity;
  87. }
  88. public function setQuantity(float $quantity): self
  89. {
  90. $this->quantity = $quantity;
  91. return $this;
  92. }
  93. public function getTitle(): ?string
  94. {
  95. return $this->title;
  96. }
  97. public function setTitle(string $title): self
  98. {
  99. $this->title = $title;
  100. return $this;
  101. }
  102. }