src/Entity/ProductCrossSelling.php line 29

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 Doctrine\Common\Collections\ArrayCollection;
  11. use Doctrine\Common\Collections\Collection;
  12. use Symfony\Component\Validator\Constraints as Assert;
  13. use Doctrine\ORM\Mapping as ORM;
  14. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  15. /**
  16.  * @Doctrine\ORM\Mapping\Entity
  17.  * @Doctrine\ORM\Mapping\Table(name="product_cross_selling")
  18.  */
  19. class ProductCrossSelling implements BlameableInterfaceTimestampableInterfaceSoftDeletableInterface  {
  20.     use BlameableTrait;
  21.     use TimestampableTrait;
  22.     
  23.     use SoftDeletableTrait;
  24.     
  25. /**
  26.      * @var integer
  27.      *
  28.      * @ORM\Column(name="id", type="integer", nullable=false)
  29.      * @ORM\Id
  30.      * @ORM\GeneratedValue(strategy="IDENTITY")
  31.      */
  32.     private $id;
  33.     /**
  34.      * @Doctrine\ORM\Mapping\ManyToOne(targetEntity="App\Entity\Product", inversedBy="crossSelling")
  35.      * @Doctrine\ORM\Mapping\JoinColumn(name="product_id", referencedColumnName="id")
  36.      */
  37.     private $product;
  38.     /**
  39.      * @Doctrine\ORM\Mapping\ManyToOne(targetEntity="App\Entity\Product")
  40.      * @Doctrine\ORM\Mapping\JoinColumn(name="cross_selling_product", referencedColumnName="id")
  41.      */
  42.     private $crossSellingProduct;
  43.     /**
  44.      * @Doctrine\ORM\Mapping\Column(name="fromStats", type="boolean", options={"default"=0}, nullable=true)
  45.      */
  46.     protected $fromStats;
  47.     /**
  48.      * @ORM\Column(name="ranking", type="integer", length=255, nullable=true)
  49.      */
  50.     private $ranking;
  51.     public function getId(): ?int
  52.     {
  53.         return $this->id;
  54.     }
  55.     public function getProduct(): ?Product
  56.     {
  57.         return $this->product;
  58.     }
  59.     public function setProduct(?Product $product): self
  60.     {
  61.         $this->product $product;
  62.         return $this;
  63.     }
  64.     public function getCrossSellingProduct(): ?Product
  65.     {
  66.         return $this->crossSellingProduct;
  67.     }
  68.     public function setCrossSellingProduct(?Product $crossSellingProduct): self
  69.     {
  70.         $this->crossSellingProduct $crossSellingProduct;
  71.         return $this;
  72.     }
  73.     /**
  74.      * @return mixed
  75.      */
  76.     public function getFromStats()
  77.     {
  78.         return $this->fromStats;
  79.     }
  80.     /**
  81.      * @param mixed $fromStats
  82.      */
  83.     public function setFromStats($fromStats): void
  84.     {
  85.         $this->fromStats $fromStats;
  86.     }
  87.     /**
  88.      * @return mixed
  89.      */
  90.     public function getRanking()
  91.     {
  92.         return $this->ranking;
  93.     }
  94.     /**
  95.      * @param mixed $ranking
  96.      */
  97.     public function setRanking($ranking): void
  98.     {
  99.         $this->ranking $ranking;
  100.     }
  101. }