src/Entity/System/ProductPrice.php line 20

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace App\Entity\System;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6. * @ORM\Table(
  7. *
  8. * uniqueConstraints={
  9. *
  10. * @ORM\UniqueConstraint(name="uk_product_price_product_attribute", columns={"id_product", "id_product_attribute"})
  11. * }
  12. * )
  13. *
  14. * @ORM\Entity(repositoryClass="App\Repository\System\ProductPriceRepository")
  15. */
  16. class ProductPrice
  17. {
  18. /**
  19. * @var int
  20. *
  21. * @ORM\Column(type="integer")
  22. *
  23. * @ORM\Id
  24. *
  25. * @ORM\GeneratedValue(strategy="AUTO")
  26. */
  27. private $id;
  28. /**
  29. * @var Product
  30. *
  31. * @ORM\ManyToOne(targetEntity="Product", inversedBy="productPrices")
  32. *
  33. * @ORM\JoinColumn(name="id_product", referencedColumnName="id_product", nullable=false)
  34. */
  35. private $product;
  36. /**
  37. * @var ProductAttribute|null
  38. *
  39. * @ORM\OneToOne(targetEntity="ProductAttribute", inversedBy="productPrice")
  40. *
  41. * @ORM\JoinColumn(name="id_product_attribute", referencedColumnName="id_product_attribute")
  42. */
  43. private $productAttribute;
  44. /**
  45. * @ORM\Column(type="float", options={"default" : 0}, nullable=false)
  46. */
  47. private float $reductionOld = 0.0;
  48. /**
  49. * @ORM\Column(type="float", options={"default" : 0}, nullable=false)
  50. */
  51. private float $reduction = 0.0;
  52. /**
  53. * @ORM\Column(type="float", options={"default" : 0}, nullable=false)
  54. */
  55. private float $price = 0.0;
  56. /**
  57. * @ORM\Column(type="float", options={"default" : 0}, nullable=false)
  58. */
  59. private float $wholesalePrice = 0.0;
  60. /**
  61. * @ORM\Column(type="float", options={"default" : 0}, nullable=false)
  62. */
  63. private float $wholesalePriceOld = 0.0;
  64. /**
  65. * @ORM\Column(type="float", options={"default" : 0}, nullable=false)
  66. */
  67. private float $estimateCostPrice = 0.0;
  68. /**
  69. * @ORM\Column(type="float", options={"default" : 0}, nullable=false)
  70. */
  71. private float $unitPriceImpact = 0.0;
  72. /**
  73. * @ORM\Column(type="float", options={"default" : 0}, nullable=false)
  74. */
  75. private float $unitPriceImpactOld = 0.0;
  76. public function getId(): int
  77. {
  78. return $this->id;
  79. }
  80. public function setId(int $id): ProductPrice
  81. {
  82. $this->id = $id;
  83. return $this;
  84. }
  85. public function getProduct(): Product
  86. {
  87. return $this->product;
  88. }
  89. public function setProduct(Product $product): ProductPrice
  90. {
  91. $this->product = $product;
  92. return $this;
  93. }
  94. public function getProductAttribute(): ?ProductAttribute
  95. {
  96. return $this->productAttribute;
  97. }
  98. public function setProductAttribute(?ProductAttribute $productAttribute = null): ProductPrice
  99. {
  100. $this->productAttribute = $productAttribute;
  101. return $this;
  102. }
  103. public function getReduction(): float
  104. {
  105. return $this->reduction;
  106. }
  107. public function setReduction(float $reduction): ProductPrice
  108. {
  109. $this->reduction = $reduction;
  110. return $this;
  111. }
  112. public function getPrice(): float
  113. {
  114. return $this->price;
  115. }
  116. public function setPrice(float $price): ProductPrice
  117. {
  118. $this->price = $price;
  119. return $this;
  120. }
  121. public function getWholesalePrice(): float
  122. {
  123. return $this->wholesalePrice;
  124. }
  125. public function setWholesalePrice(float $wholesalePrice): ProductPrice
  126. {
  127. $this->wholesalePrice = $wholesalePrice;
  128. return $this;
  129. }
  130. public function getEstimateCostPrice(): float
  131. {
  132. return $this->estimateCostPrice;
  133. }
  134. public function setEstimateCostPrice(float $estimateCostPrice): ProductPrice
  135. {
  136. $this->estimateCostPrice = $estimateCostPrice;
  137. return $this;
  138. }
  139. public function getUnitPriceImpact(): float
  140. {
  141. return $this->unitPriceImpact;
  142. }
  143. public function setUnitPriceImpact(float $unitPriceImpact): ProductPrice
  144. {
  145. $this->unitPriceImpact = $unitPriceImpact;
  146. return $this;
  147. }
  148. public function getReductionOld(): float
  149. {
  150. return $this->reductionOld;
  151. }
  152. public function setReductionOld(float $reductionOld): ProductPrice
  153. {
  154. $this->reductionOld = $reductionOld;
  155. return $this;
  156. }
  157. public function getWholesalePriceOld(): float
  158. {
  159. return $this->wholesalePriceOld;
  160. }
  161. public function setWholesalePriceOld(float $wholesalePriceOld): ProductPrice
  162. {
  163. $this->wholesalePriceOld = $wholesalePriceOld;
  164. return $this;
  165. }
  166. public function getUnitPriceImpactOld(): float
  167. {
  168. return $this->unitPriceImpactOld;
  169. }
  170. public function setUnitPriceImpactOld(float $unitPriceImpactOld): ProductPrice
  171. {
  172. $this->unitPriceImpactOld = $unitPriceImpactOld;
  173. return $this;
  174. }
  175. }