src/Entity/ArticleView.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5.  * @ORM\Entity(repositoryClass="App\Repository\ArticleViewRepository")
  6.  */
  7. class ArticleView
  8. {
  9.     /**
  10.      * @ORM\Id()
  11.      *
  12.      * @ORM\GeneratedValue()
  13.      *
  14.      * @ORM\Column(type="integer")
  15.      */
  16.     private $id;
  17.     /**
  18.      * @ORM\Column(type="string", length=255)
  19.      */
  20.     private $identifier;
  21.     /**
  22.      * @ORM\ManyToOne(targetEntity="App\Entity\User", inversedBy="articlesViewed")
  23.      *
  24.      * @ORM\JoinColumn(nullable=true)
  25.      */
  26.     private $user;
  27.     /**
  28.      * @ORM\ManyToOne(targetEntity="App\Entity\Article", inversedBy="views")
  29.      */
  30.     private $article;
  31.     /**
  32.      * @ORM\Column(type="datetime")
  33.      */
  34.     private $visitedAt;
  35.     public function getId(): ?int
  36.     {
  37.         return $this->id;
  38.     }
  39.     public function getIdentifier(): ?string
  40.     {
  41.         return $this->identifier;
  42.     }
  43.     public function setIdentifier(string $identifier): self
  44.     {
  45.         $this->identifier $identifier;
  46.         return $this;
  47.     }
  48.     public function getVisitedAt(): ?\DateTimeInterface
  49.     {
  50.         return $this->visitedAt;
  51.     }
  52.     public function setVisitedAt(\DateTimeInterface $visitedAt): self
  53.     {
  54.         $this->visitedAt $visitedAt;
  55.         return $this;
  56.     }
  57.     /**
  58.      * @return mixed
  59.      */
  60.     public function getUser()
  61.     {
  62.         return $this->user;
  63.     }
  64.     /**
  65.      * @param mixed $user
  66.      *
  67.      * @return ArticleView
  68.      */
  69.     public function setUser($user)
  70.     {
  71.         $this->user $user;
  72.         return $this;
  73.     }
  74.     /**
  75.      * @return mixed
  76.      */
  77.     public function getArticle()
  78.     {
  79.         return $this->article;
  80.     }
  81.     /**
  82.      * @param mixed $article
  83.      *
  84.      * @return ArticleView
  85.      */
  86.     public function setArticle($article)
  87.     {
  88.         $this->article $article;
  89.         return $this;
  90.     }
  91. }