src/Entity/ProductPriceVariants.php line 28

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 Symfony\Component\Validator\Constraints as Assert;
  12. use Doctrine\ORM\Mapping as ORM;
  13. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  14. /**
  15.  * @Doctrine\ORM\Mapping\Entity
  16.  * @Doctrine\ORM\Mapping\Table(name="product_price_variants")
  17.  */
  18. class ProductPriceVariants implements BlameableInterfaceTimestampableInterfaceSoftDeletableInterface  {
  19.     use BlameableTrait;
  20.     use TimestampableTrait;
  21.     
  22.     use SoftDeletableTrait;
  23.     
  24. /**
  25.      * @var integer
  26.      *
  27.      * @ORM\Column(name="id", type="integer", nullable=false)
  28.      * @ORM\Id
  29.      * @ORM\GeneratedValue(strategy="IDENTITY")
  30.      */
  31.     private $id;
  32.     /**
  33.      * @Doctrine\ORM\Mapping\ManyToOne(targetEntity="App\Entity\Product")
  34.      * @Doctrine\ORM\Mapping\JoinColumn(name="product_id", referencedColumnName="id")
  35.      */
  36.     private $product;
  37.     /**
  38.      * @Doctrine\ORM\Mapping\ManyToOne(targetEntity="App\Entity\ProductPrice", inversedBy="variants")
  39.      * @Doctrine\ORM\Mapping\JoinColumn(name="product_price_id", referencedColumnName="id")
  40.      */
  41.     private $productPrice;
  42.     /**
  43.      * @Doctrine\ORM\Mapping\ManyToOne(targetEntity="App\Entity\ProductParameter")
  44.      * @Doctrine\ORM\Mapping\JoinColumn(name="parameter_id", referencedColumnName="id")
  45.      */
  46.     private $parameter;
  47.     /**
  48.      * @Doctrine\ORM\Mapping\ManyToOne(targetEntity="App\Entity\ProductParameterValue", fetch="EAGER")
  49.      * @Doctrine\ORM\Mapping\JoinColumn(name="product_parameter_value_id", referencedColumnName="id")
  50.      */
  51.     private $parameterValue;
  52.     /**
  53.      * @Doctrine\ORM\Mapping\ManyToOne(targetEntity="App\Entity\ProductParameterValueGroup", fetch="EAGER")
  54.      * @Doctrine\ORM\Mapping\JoinColumn(name="product_parameter_value_group_id", referencedColumnName="id")
  55.      */
  56.     private $parameterValueGroup;
  57.     /**
  58.      * Get id
  59.      *
  60.      * @return integer
  61.      */
  62.     public function getId()
  63.     {
  64.         return $this->id;
  65.     }
  66.     public function getProduct(): ?Product
  67.     {
  68.         return $this->product;
  69.     }
  70.     public function setProduct(?Product $product): self
  71.     {
  72.         $this->product $product;
  73.         return $this;
  74.     }
  75.     public function getProductPrice(): ?ProductPrice
  76.     {
  77.         return $this->productPrice;
  78.     }
  79.     public function setProductPrice(?ProductPrice $productPrice): self
  80.     {
  81.         $this->productPrice $productPrice;
  82.         return $this;
  83.     }
  84.     public function getParameter(): ?ProductParameter
  85.     {
  86.         return $this->parameter;
  87.     }
  88.     public function setParameter(?ProductParameter $parameter): self
  89.     {
  90.         $this->parameter $parameter;
  91.         return $this;
  92.     }
  93.     public function getParameterValue(): ?ProductParameterValue
  94.     {
  95.         return $this->parameterValue;
  96.     }
  97.     public function setParameterValue(?ProductParameterValue $parameterValue): self
  98.     {
  99.         $this->parameterValue $parameterValue;
  100.         return $this;
  101.     }
  102.     public function getParameterValueGroup(): ?ProductParameterValueGroup
  103.     {
  104.         return $this->parameterValueGroup;
  105.     }
  106.     public function setParameterValueGroup(?ProductParameterValueGroup $parameterValueGroup): self
  107.     {
  108.         $this->parameterValueGroup $parameterValueGroup;
  109.         return $this;
  110.     }
  111. }