<?php
declare(strict_types=1);
namespace App\Entity\System;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Table(
*
* uniqueConstraints={
*
* @ORM\UniqueConstraint(name="uk_product_price_product_attribute", columns={"id_product", "id_product_attribute"})
* }
* )
*
* @ORM\Entity(repositoryClass="App\Repository\System\ProductPriceRepository")
*/
class ProductPrice
{
/**
* @var int
*
* @ORM\Column(type="integer")
*
* @ORM\Id
*
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @var Product
*
* @ORM\ManyToOne(targetEntity="Product", inversedBy="productPrices")
*
* @ORM\JoinColumn(name="id_product", referencedColumnName="id_product", nullable=false)
*/
private $product;
/**
* @var ProductAttribute|null
*
* @ORM\OneToOne(targetEntity="ProductAttribute", inversedBy="productPrice")
*
* @ORM\JoinColumn(name="id_product_attribute", referencedColumnName="id_product_attribute")
*/
private $productAttribute;
/**
* @ORM\Column(type="float", options={"default" : 0}, nullable=false)
*/
private float $reductionOld = 0.0;
/**
* @ORM\Column(type="float", options={"default" : 0}, nullable=false)
*/
private float $reduction = 0.0;
/**
* @ORM\Column(type="float", options={"default" : 0}, nullable=false)
*/
private float $price = 0.0;
/**
* @ORM\Column(type="float", options={"default" : 0}, nullable=false)
*/
private float $wholesalePrice = 0.0;
/**
* @ORM\Column(type="float", options={"default" : 0}, nullable=false)
*/
private float $wholesalePriceOld = 0.0;
/**
* @ORM\Column(type="float", options={"default" : 0}, nullable=false)
*/
private float $estimateCostPrice = 0.0;
/**
* @ORM\Column(type="float", options={"default" : 0}, nullable=false)
*/
private float $unitPriceImpact = 0.0;
/**
* @ORM\Column(type="float", options={"default" : 0}, nullable=false)
*/
private float $unitPriceImpactOld = 0.0;
public function getId(): int
{
return $this->id;
}
public function setId(int $id): ProductPrice
{
$this->id = $id;
return $this;
}
public function getProduct(): Product
{
return $this->product;
}
public function setProduct(Product $product): ProductPrice
{
$this->product = $product;
return $this;
}
public function getProductAttribute(): ?ProductAttribute
{
return $this->productAttribute;
}
public function setProductAttribute(?ProductAttribute $productAttribute = null): ProductPrice
{
$this->productAttribute = $productAttribute;
return $this;
}
public function getReduction(): float
{
return $this->reduction;
}
public function setReduction(float $reduction): ProductPrice
{
$this->reduction = $reduction;
return $this;
}
public function getPrice(): float
{
return $this->price;
}
public function setPrice(float $price): ProductPrice
{
$this->price = $price;
return $this;
}
public function getWholesalePrice(): float
{
return $this->wholesalePrice;
}
public function setWholesalePrice(float $wholesalePrice): ProductPrice
{
$this->wholesalePrice = $wholesalePrice;
return $this;
}
public function getEstimateCostPrice(): float
{
return $this->estimateCostPrice;
}
public function setEstimateCostPrice(float $estimateCostPrice): ProductPrice
{
$this->estimateCostPrice = $estimateCostPrice;
return $this;
}
public function getUnitPriceImpact(): float
{
return $this->unitPriceImpact;
}
public function setUnitPriceImpact(float $unitPriceImpact): ProductPrice
{
$this->unitPriceImpact = $unitPriceImpact;
return $this;
}
public function getReductionOld(): float
{
return $this->reductionOld;
}
public function setReductionOld(float $reductionOld): ProductPrice
{
$this->reductionOld = $reductionOld;
return $this;
}
public function getWholesalePriceOld(): float
{
return $this->wholesalePriceOld;
}
public function setWholesalePriceOld(float $wholesalePriceOld): ProductPrice
{
$this->wholesalePriceOld = $wholesalePriceOld;
return $this;
}
public function getUnitPriceImpactOld(): float
{
return $this->unitPriceImpactOld;
}
public function setUnitPriceImpactOld(float $unitPriceImpactOld): ProductPrice
{
$this->unitPriceImpactOld = $unitPriceImpactOld;
return $this;
}
}