src/Entity/ProductPriceVariants.php line 24

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