src/Entity/ProductView.php line 32

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Knp\DoctrineBehaviors\Contract\Entity\SoftDeletableInterface;
  4. use Knp\DoctrineBehaviors\Model\SoftDeletable\SoftDeletableTrait;
  5. use Knp\DoctrineBehaviors\Contract\Entity\BlameableInterface;
  6. use Knp\DoctrineBehaviors\Model\Blameable\BlameableTrait;
  7. use Knp\DoctrineBehaviors\Model\Timestampable\TimestampableTrait;
  8. use Knp\DoctrineBehaviors\Contract\Entity\TimestampableInterface;
  9. use App\Model\LangParamInterface;
  10. use App\Model\LangParamRelationInterface;
  11. use Doctrine\Common\Collections\ArrayCollection;
  12. use Doctrine\Common\Collections\Collection;
  13. use Doctrine\ORM\Mapping as ORM;
  14. use Doctrine\ORM\Query\Parameter;
  15. use Symfony\Component\Validator\Constraints as Assert;
  16. use Symfony\Component\HttpFoundation\File\UploadedFile;
  17. use Symfony\Component\HttpFoundation\File\File;
  18. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  19. /**
  20.  * @ORM\Entity
  21.  * @ORM\Table(name="product_view")
  22.  */
  23. class ProductView implements TimestampableInterfaceBlameableInterfaceSoftDeletableInterface  {
  24.     use BlameableTrait;
  25.     use TimestampableTrait;
  26.     
  27.     use SoftDeletableTrait;
  28.     /**
  29.      * @ORM\Id
  30.      * @ORM\Column(type="integer")
  31.      * @ORM\GeneratedValue(strategy="AUTO")
  32.      */
  33.     protected $id;
  34.     /**
  35.      * @var string
  36.      *
  37.      * @ORM\Column(name="session", type="string", length=255, nullable=true)
  38.      */
  39.     private $session;
  40.     /**
  41.      * @ORM\ManyToOne(targetEntity="App\Entity\Product")
  42.      * @ORM\JoinColumn(name="product_id", referencedColumnName="id")
  43.      */
  44.     protected $product;
  45.     public function getId(): ?int
  46.     {
  47.         return $this->id;
  48.     }
  49.     public function getSession(): ?string
  50.     {
  51.         return $this->session;
  52.     }
  53.     public function setSession(?string $session): self
  54.     {
  55.         $this->session $session;
  56.         return $this;
  57.     }
  58.     public function getProduct(): ?Product
  59.     {
  60.         return $this->product;
  61.     }
  62.     public function setProduct(?Product $product): self
  63.     {
  64.         $this->product $product;
  65.         return $this;
  66.     }
  67. }