<?php
// src/Acme/UserBundle/Entity/User.php
namespace App\Entity;
use Knp\DoctrineBehaviors\Contract\Entity\SoftDeletableInterface;
use Knp\DoctrineBehaviors\Model\SoftDeletable\SoftDeletableTrait;
use Knp\DoctrineBehaviors\Model\Blameable\BlameableTrait;
use Knp\DoctrineBehaviors\Contract\Entity\BlameableInterface;
use Knp\DoctrineBehaviors\Model\Timestampable\TimestampableTrait;
use Knp\DoctrineBehaviors\Contract\Entity\TimestampableInterface;
use App\Model\LangParamRelationInterface;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Symfony\Component\Validator\Constraints as Assert;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
/**
* @Doctrine\ORM\Mapping\Entity
* @Doctrine\ORM\Mapping\Table(name="product_price_change_log")
*/
class ProductPriceChangeLog implements BlameableInterface, TimestampableInterface, SoftDeletableInterface {
use BlameableTrait;
use TimestampableTrait;
use SoftDeletableTrait;
/**
* @var integer
*
* @ORM\Column(name="id", type="integer", nullable=false)
* @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY")
*/
private $id;
/**
* @Doctrine\ORM\Mapping\ManyToOne(targetEntity="App\Entity\Product", inversedBy="productPriceChangeLog")
* @Doctrine\ORM\Mapping\JoinColumn(name="product_id", referencedColumnName="id")
*/
private $product;
/**
* @Doctrine\ORM\Mapping\ManyToOne(targetEntity="App\Entity\ProductPrice")
* @Doctrine\ORM\Mapping\JoinColumn(name="parent_product_price_id", referencedColumnName="id")
*/
private $parentProductPrice;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Currency")
*/
private $currency;
/**
* @Doctrine\ORM\Mapping\Column(name="price_before", type="float", nullable=true)
*/
protected $priceBefore;
/**
* @Doctrine\ORM\Mapping\Column(name="price_after", type="float", nullable=true)
*/
protected $priceAfter;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Language")
* @ORM\JoinColumn(name="language", referencedColumnName="id")
*/
protected $language;
/**
* @var string
*
* @ORM\Column(name="automatic_price_comment", type="string", length=255, nullable=true)
*/
private $automaticPriceComment;
/**
* @Doctrine\ORM\Mapping\Column(name="automatic_price", type="boolean", nullable=true)
*/
protected $automaticPrice;
/**
* @Doctrine\ORM\Mapping\Column(type="float", nullable=true)
*/
protected $automaticPriceDiscount;
public function getId(): ?int
{
return $this->id;
}
public function getPriceBefore(): ?float
{
return $this->priceBefore;
}
public function setPriceBefore(?float $priceBefore): self
{
$this->priceBefore = $priceBefore;
return $this;
}
public function getPriceAfter(): ?float
{
return $this->priceAfter;
}
public function setPriceAfter(?float $priceAfter): self
{
$this->priceAfter = $priceAfter;
return $this;
}
public function getAutomaticPriceComment(): ?string
{
return $this->automaticPriceComment;
}
public function setAutomaticPriceComment(?string $automaticPriceComment): self
{
$this->automaticPriceComment = $automaticPriceComment;
return $this;
}
public function getAutomaticPrice(): ?bool
{
return $this->automaticPrice;
}
public function setAutomaticPrice(?bool $automaticPrice): self
{
$this->automaticPrice = $automaticPrice;
return $this;
}
public function getAutomaticPriceDiscount(): ?float
{
return $this->automaticPriceDiscount;
}
public function setAutomaticPriceDiscount(?float $automaticPriceDiscount): self
{
$this->automaticPriceDiscount = $automaticPriceDiscount;
return $this;
}
public function getProduct(): ?Product
{
return $this->product;
}
public function setProduct(?Product $product): self
{
$this->product = $product;
return $this;
}
public function getParentProductPrice(): ?ProductPrice
{
return $this->parentProductPrice;
}
public function setParentProductPrice(?ProductPrice $parentProductPrice): self
{
$this->parentProductPrice = $parentProductPrice;
return $this;
}
public function getCurrency(): ?Currency
{
return $this->currency;
}
public function setCurrency(?Currency $currency): self
{
$this->currency = $currency;
return $this;
}
public function getLanguage(): ?Language
{
return $this->language;
}
public function setLanguage(?Language $language): self
{
$this->language = $language;
return $this;
}
}