<?php
// src/Acme/UserBundle/Entity/User.php
namespace App\Entity;
use Knp\DoctrineBehaviors\Contract\Entity\SoftDeletableInterface;
use Knp\DoctrineBehaviors\Model\SoftDeletable\SoftDeletableTrait;
use Knp\DoctrineBehaviors\Model\Blameable\BlameableTrait;
use Knp\DoctrineBehaviors\Contract\Entity\BlameableInterface;
use Knp\DoctrineBehaviors\Model\Timestampable\TimestampableTrait;
use Knp\DoctrineBehaviors\Contract\Entity\TimestampableInterface;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Symfony\Component\Validator\Constraints as Assert;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
/**
* @Doctrine\ORM\Mapping\Entity
* @Doctrine\ORM\Mapping\Table(name="product_cross_selling")
*/
class ProductCrossSelling implements BlameableInterface, TimestampableInterface, SoftDeletableInterface {
use BlameableTrait;
use TimestampableTrait;
use SoftDeletableTrait;
/**
* @var integer
*
* @ORM\Column(name="id", type="integer", nullable=false)
* @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY")
*/
private $id;
/**
* @Doctrine\ORM\Mapping\ManyToOne(targetEntity="App\Entity\Product", inversedBy="crossSelling")
* @Doctrine\ORM\Mapping\JoinColumn(name="product_id", referencedColumnName="id")
*/
private $product;
/**
* @Doctrine\ORM\Mapping\ManyToOne(targetEntity="App\Entity\Product")
* @Doctrine\ORM\Mapping\JoinColumn(name="cross_selling_product", referencedColumnName="id")
*/
private $crossSellingProduct;
/**
* @Doctrine\ORM\Mapping\Column(name="fromStats", type="boolean", options={"default"=0}, nullable=true)
*/
protected $fromStats;
/**
* @ORM\Column(name="ranking", type="integer", length=255, nullable=true)
*/
private $ranking;
public function getId(): ?int
{
return $this->id;
}
public function getProduct(): ?Product
{
return $this->product;
}
public function setProduct(?Product $product): self
{
$this->product = $product;
return $this;
}
public function getCrossSellingProduct(): ?Product
{
return $this->crossSellingProduct;
}
public function setCrossSellingProduct(?Product $crossSellingProduct): self
{
$this->crossSellingProduct = $crossSellingProduct;
return $this;
}
/**
* @return mixed
*/
public function getFromStats()
{
return $this->fromStats;
}
/**
* @param mixed $fromStats
*/
public function setFromStats($fromStats): void
{
$this->fromStats = $fromStats;
}
/**
* @return mixed
*/
public function getRanking()
{
return $this->ranking;
}
/**
* @param mixed $ranking
*/
public function setRanking($ranking): void
{
$this->ranking = $ranking;
}
}