src/Entity/ProductPriceChangeLog.php line 30

Open in your IDE?
  1. <?php
  2. // src/Acme/UserBundle/Entity/User.php
  3. namespace App\Entity;
  4. use Knp\DoctrineBehaviors\Contract\Entity\SoftDeletableInterface;
  5. use Knp\DoctrineBehaviors\Model\SoftDeletable\SoftDeletableTrait;
  6. use Knp\DoctrineBehaviors\Model\Blameable\BlameableTrait;
  7. use Knp\DoctrineBehaviors\Contract\Entity\BlameableInterface;
  8. use Knp\DoctrineBehaviors\Model\Timestampable\TimestampableTrait;
  9. use Knp\DoctrineBehaviors\Contract\Entity\TimestampableInterface;
  10. use App\Model\LangParamRelationInterface;
  11. use Doctrine\Common\Collections\ArrayCollection;
  12. use Doctrine\Common\Collections\Collection;
  13. use Symfony\Component\Validator\Constraints as Assert;
  14. use Doctrine\ORM\Mapping as ORM;
  15. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  16. /**
  17.  * @Doctrine\ORM\Mapping\Entity
  18.  * @Doctrine\ORM\Mapping\Table(name="product_price_change_log")
  19.  */
  20. class ProductPriceChangeLog implements BlameableInterfaceTimestampableInterfaceSoftDeletableInterface  {
  21.     use BlameableTrait;
  22.     use TimestampableTrait;
  23.     
  24.     use SoftDeletableTrait;
  25.     
  26. /**
  27.      * @var integer
  28.      *
  29.      * @ORM\Column(name="id", type="integer", nullable=false)
  30.      * @ORM\Id
  31.      * @ORM\GeneratedValue(strategy="IDENTITY")
  32.      */
  33.     private $id;
  34.     /**
  35.      * @Doctrine\ORM\Mapping\ManyToOne(targetEntity="App\Entity\Product", inversedBy="productPriceChangeLog")
  36.      * @Doctrine\ORM\Mapping\JoinColumn(name="product_id", referencedColumnName="id")
  37.      */
  38.     private $product;
  39.     /**
  40.      * @Doctrine\ORM\Mapping\ManyToOne(targetEntity="App\Entity\ProductPrice")
  41.      * @Doctrine\ORM\Mapping\JoinColumn(name="parent_product_price_id", referencedColumnName="id")
  42.      */
  43.     private $parentProductPrice;
  44.     /**
  45.      * @ORM\ManyToOne(targetEntity="App\Entity\Currency")
  46.      */
  47.     private $currency;
  48.     /**
  49.      * @Doctrine\ORM\Mapping\Column(name="price_before", type="float", nullable=true)
  50.      */
  51.     protected $priceBefore;
  52.     /**
  53.      * @Doctrine\ORM\Mapping\Column(name="price_after", type="float", nullable=true)
  54.      */
  55.     protected $priceAfter;
  56.     /**
  57.      * @ORM\ManyToOne(targetEntity="App\Entity\Language")
  58.      * @ORM\JoinColumn(name="language", referencedColumnName="id")
  59.      */
  60.     protected $language;
  61.     /**
  62.      * @var string
  63.      *
  64.      * @ORM\Column(name="automatic_price_comment", type="string", length=255, nullable=true)
  65.      */
  66.     private $automaticPriceComment;
  67.     /**
  68.      * @Doctrine\ORM\Mapping\Column(name="automatic_price", type="boolean", nullable=true)
  69.      */
  70.     protected $automaticPrice;
  71.     /**
  72.      * @Doctrine\ORM\Mapping\Column(type="float", nullable=true)
  73.      */
  74.     protected $automaticPriceDiscount;
  75.     public function getId(): ?int
  76.     {
  77.         return $this->id;
  78.     }
  79.     public function getPriceBefore(): ?float
  80.     {
  81.         return $this->priceBefore;
  82.     }
  83.     public function setPriceBefore(?float $priceBefore): self
  84.     {
  85.         $this->priceBefore $priceBefore;
  86.         return $this;
  87.     }
  88.     public function getPriceAfter(): ?float
  89.     {
  90.         return $this->priceAfter;
  91.     }
  92.     public function setPriceAfter(?float $priceAfter): self
  93.     {
  94.         $this->priceAfter $priceAfter;
  95.         return $this;
  96.     }
  97.     public function getAutomaticPriceComment(): ?string
  98.     {
  99.         return $this->automaticPriceComment;
  100.     }
  101.     public function setAutomaticPriceComment(?string $automaticPriceComment): self
  102.     {
  103.         $this->automaticPriceComment $automaticPriceComment;
  104.         return $this;
  105.     }
  106.     public function getAutomaticPrice(): ?bool
  107.     {
  108.         return $this->automaticPrice;
  109.     }
  110.     public function setAutomaticPrice(?bool $automaticPrice): self
  111.     {
  112.         $this->automaticPrice $automaticPrice;
  113.         return $this;
  114.     }
  115.     public function getAutomaticPriceDiscount(): ?float
  116.     {
  117.         return $this->automaticPriceDiscount;
  118.     }
  119.     public function setAutomaticPriceDiscount(?float $automaticPriceDiscount): self
  120.     {
  121.         $this->automaticPriceDiscount $automaticPriceDiscount;
  122.         return $this;
  123.     }
  124.     public function getProduct(): ?Product
  125.     {
  126.         return $this->product;
  127.     }
  128.     public function setProduct(?Product $product): self
  129.     {
  130.         $this->product $product;
  131.         return $this;
  132.     }
  133.     public function getParentProductPrice(): ?ProductPrice
  134.     {
  135.         return $this->parentProductPrice;
  136.     }
  137.     public function setParentProductPrice(?ProductPrice $parentProductPrice): self
  138.     {
  139.         $this->parentProductPrice $parentProductPrice;
  140.         return $this;
  141.     }
  142.     public function getCurrency(): ?Currency
  143.     {
  144.         return $this->currency;
  145.     }
  146.     public function setCurrency(?Currency $currency): self
  147.     {
  148.         $this->currency $currency;
  149.         return $this;
  150.     }
  151.     public function getLanguage(): ?Language
  152.     {
  153.         return $this->language;
  154.     }
  155.     public function setLanguage(?Language $language): self
  156.     {
  157.         $this->language $language;
  158.         return $this;
  159.     }
  160. }