<?php
namespace App\Domain\Promotion\Entities;
class Product {
private int $id;
private string $sku;
private string $code;
private string $name;
private string $image;
private float $priceStd;
private float $priceBreak;
private float $priceList;
private float $discount;
private float $amount;
private int $qty;
private ?int $sm_precio_estimadoline_id;
private ?string $comercialName;
private ?string $allegation;
private ?int $ad_client_id;
private ?int $ad_org_id;
public function __construct(
int $id,
string $sku,
string $code,
string $name,
string $image,
float $priceStd,
float $priceBreak,
float $priceList,
float $discount,
float $amount,
int $qty,
int $sm_precio_estimadoline_id,
?string $comercialName = null,
?string $allegation = null,
?int $ad_client_id,
?int $ad_org_id
)
{
$this->id = $id;
$this->sku = $sku;
$this->code = $code;
$this->name = $name;
$this->image = $image;
$this->priceStd = $priceStd;
$this->priceBreak = $priceBreak;
$this->priceList = $priceList;
$this->amount = $amount;
$this->discount = $discount;
$this->qty = $qty;
$this->sm_precio_estimadoline_id = $sm_precio_estimadoline_id;
$this->comercialName = $comercialName;
$this->allegation = $allegation;
$this->ad_client_id = $ad_client_id;
$this->ad_org_id = $ad_org_id;
}
public function getId() : int {
return $this->id;
}
//Setters
public function setComercialName(string $name) : void {
$this->comercialName = $name;
}
public function setAllegation(string $allegation) : void {
$this->allegation = $allegation;
}
//Getters
public function getComercialName() : string {
return $this->comercialName;
}
public function getAllegation() : string {
return $this->allegation;
}
public function getCode() : string {
return $this->code;
}
public function getPriceBreak() : float {
return $this->priceBreak;
}
public function getPriceStd() : float {
return $this->priceStd;
}
public function getImage() : string {
if($this->image == "") {
return "/assets/img/default-150x150.png";
}
return $this->image;
}
public function getSmPrecioEstimadolineId() : int {
return $this->sm_precio_estimadoline_id;
}
public function getAdClientId() : ?int {
return $this->ad_client_id;
}
public function getAdOrgId() : ?int {
return $this->ad_org_id;
}
}