<?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 Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
use Symfony\Component\HttpFoundation\File\UploadedFile;
use Symfony\Component\HttpFoundation\File\File;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
/**
* @ORM\Entity
* @ORM\Table(name="product_producer_price_change")
*/
class ProductProducerPriceChange implements BlameableInterface, TimestampableInterface, SoftDeletableInterface {
use BlameableTrait;
use TimestampableTrait;
use SoftDeletableTrait;
/**
* @ORM\Id
* @ORM\Column(type="integer")
* @ORM\GeneratedValue(strategy="AUTO")
*/
protected $id;
/**
* @Doctrine\ORM\Mapping\Column(name="price_change", type="float", nullable=true)
*/
protected $priceChange;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Language")
* @ORM\JoinColumn(name="language", referencedColumnName="id")
*/
protected $language;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\ProductProducer", cascade={"all"}, inversedBy="priceChanges")
* @ORM\JoinColumn(name="product_producer_id", referencedColumnName="id", onDelete="CASCADE")
*/
protected $productProducer;
public function getId(): ?int
{
return $this->id;
}
public function getPriceChange(): ?float
{
return $this->priceChange;
}
public function setPriceChange(?float $priceChange): self
{
$this->priceChange = $priceChange;
return $this;
}
public function getLanguage(): ?Language
{
return $this->language;
}
public function setLanguage(?Language $language): self
{
$this->language = $language;
return $this;
}
public function getProductProducer(): ?ProductProducer
{
return $this->productProducer;
}
public function setProductProducer(?ProductProducer $productProducer): self
{
$this->productProducer = $productProducer;
return $this;
}
}