src/Entity/ProductProducerPriceChange.php line 30

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Knp\DoctrineBehaviors\Contract\Entity\SoftDeletableInterface;
  4. use Knp\DoctrineBehaviors\Model\SoftDeletable\SoftDeletableTrait;
  5. use Knp\DoctrineBehaviors\Model\Blameable\BlameableTrait;
  6. use Knp\DoctrineBehaviors\Contract\Entity\BlameableInterface;
  7. use Knp\DoctrineBehaviors\Model\Timestampable\TimestampableTrait;
  8. use Knp\DoctrineBehaviors\Contract\Entity\TimestampableInterface;
  9. use Doctrine\Common\Collections\ArrayCollection;
  10. use Doctrine\Common\Collections\Collection;
  11. use Doctrine\ORM\Mapping as ORM;
  12. use Symfony\Component\Validator\Constraints as Assert;
  13. use Symfony\Component\HttpFoundation\File\UploadedFile;
  14. use Symfony\Component\HttpFoundation\File\File;
  15. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  16. /**
  17.  * @ORM\Entity
  18.  * @ORM\Table(name="product_producer_price_change")
  19.  */
  20. class ProductProducerPriceChange implements BlameableInterfaceTimestampableInterfaceSoftDeletableInterface  {
  21.     use BlameableTrait;
  22.     use TimestampableTrait;
  23.     
  24.     use SoftDeletableTrait;
  25.     
  26. /**
  27.      * @ORM\Id
  28.      * @ORM\Column(type="integer")
  29.      * @ORM\GeneratedValue(strategy="AUTO")
  30.      */
  31.     protected $id;
  32.     /**
  33.      * @Doctrine\ORM\Mapping\Column(name="price_change", type="float", nullable=true)
  34.      */
  35.     protected $priceChange;
  36.     /**
  37.      * @ORM\ManyToOne(targetEntity="App\Entity\Language")
  38.      * @ORM\JoinColumn(name="language", referencedColumnName="id")
  39.      */
  40.     protected $language;
  41.     /**
  42.      * @ORM\ManyToOne(targetEntity="App\Entity\ProductProducer", cascade={"all"}, inversedBy="priceChanges")
  43.      * @ORM\JoinColumn(name="product_producer_id", referencedColumnName="id", onDelete="CASCADE")
  44.      */
  45.     protected $productProducer;
  46.     public function getId(): ?int
  47.     {
  48.         return $this->id;
  49.     }
  50.     public function getPriceChange(): ?float
  51.     {
  52.         return $this->priceChange;
  53.     }
  54.     public function setPriceChange(?float $priceChange): self
  55.     {
  56.         $this->priceChange $priceChange;
  57.         return $this;
  58.     }
  59.     public function getLanguage(): ?Language
  60.     {
  61.         return $this->language;
  62.     }
  63.     public function setLanguage(?Language $language): self
  64.     {
  65.         $this->language $language;
  66.         return $this;
  67.     }
  68.     public function getProductProducer(): ?ProductProducer
  69.     {
  70.         return $this->productProducer;
  71.     }
  72.     public function setProductProducer(?ProductProducer $productProducer): self
  73.     {
  74.         $this->productProducer $productProducer;
  75.         return $this;
  76.     }
  77. }