Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

136 lines
2.8KB

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