Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

CartProduct.php 2.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  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. }