src/Domain/Promotion/Entities/Product.php line 24

Open in your IDE?
  1. <?php
  2. namespace App\Domain\Promotion\Entities;
  3. class Product {
  4. private int $id;
  5. private string $sku;
  6. private string $code;
  7. private string $name;
  8. private string $image;
  9. private float $priceStd;
  10. private float $priceBreak;
  11. private float $priceList;
  12. private float $discount;
  13. private float $amount;
  14. private int $qty;
  15. private ?int $sm_precio_estimadoline_id;
  16. private ?string $comercialName;
  17. private ?string $allegation;
  18. private ?int $ad_client_id;
  19. private ?int $ad_org_id;
  20. public function __construct(
  21. int $id,
  22. string $sku,
  23. string $code,
  24. string $name,
  25. string $image,
  26. float $priceStd,
  27. float $priceBreak,
  28. float $priceList,
  29. float $discount,
  30. float $amount,
  31. int $qty,
  32. int $sm_precio_estimadoline_id,
  33. ?string $comercialName = null,
  34. ?string $allegation = null,
  35. ?int $ad_client_id,
  36. ?int $ad_org_id
  37. )
  38. {
  39. $this->id = $id;
  40. $this->sku = $sku;
  41. $this->code = $code;
  42. $this->name = $name;
  43. $this->image = $image;
  44. $this->priceStd = $priceStd;
  45. $this->priceBreak = $priceBreak;
  46. $this->priceList = $priceList;
  47. $this->amount = $amount;
  48. $this->discount = $discount;
  49. $this->qty = $qty;
  50. $this->sm_precio_estimadoline_id = $sm_precio_estimadoline_id;
  51. $this->comercialName = $comercialName;
  52. $this->allegation = $allegation;
  53. $this->ad_client_id = $ad_client_id;
  54. $this->ad_org_id = $ad_org_id;
  55. }
  56. public function getId() : int {
  57. return $this->id;
  58. }
  59. //Setters
  60. public function setComercialName(string $name) : void {
  61. $this->comercialName = $name;
  62. }
  63. public function setAllegation(string $allegation) : void {
  64. $this->allegation = $allegation;
  65. }
  66. //Getters
  67. public function getComercialName() : string {
  68. return $this->comercialName;
  69. }
  70. public function getAllegation() : string {
  71. return $this->allegation;
  72. }
  73. public function getCode() : string {
  74. return $this->code;
  75. }
  76. public function getPriceBreak() : float {
  77. return $this->priceBreak;
  78. }
  79. public function getPriceStd() : float {
  80. return $this->priceStd;
  81. }
  82. public function getImage() : string {
  83. if($this->image == "") {
  84. return "/assets/img/default-150x150.png";
  85. }
  86. return $this->image;
  87. }
  88. public function getSmPrecioEstimadolineId() : int {
  89. return $this->sm_precio_estimadoline_id;
  90. }
  91. public function getAdClientId() : ?int {
  92. return $this->ad_client_id;
  93. }
  94. public function getAdOrgId() : ?int {
  95. return $this->ad_org_id;
  96. }
  97. }