src\Entity\UserBookmark.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\UserBookmarkRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Entity(repositoryClass=UserBookmarkRepository::class)
  7.  */
  8. class UserBookmark
  9. {
  10.     /**
  11.      * @ORM\Id
  12.      * @ORM\GeneratedValue
  13.      * @ORM\Column(type="integer")
  14.      */
  15.     private $id;
  16.     /**
  17.      * @ORM\ManyToOne(targetEntity=User::class, inversedBy="bookmarks")
  18.      * @ORM\JoinColumn(nullable=false)
  19.      */
  20.     private $user;
  21.     /**
  22.      * @ORM\ManyToOne(targetEntity=news::class, inversedBy="bookmarks")
  23.      * @ORM\JoinColumn(nullable=false)
  24.      */
  25.     private $news;
  26.     /**
  27.      * @ORM\Column(type="datetime")
  28.      */
  29.     private $created_at;
  30.     /**
  31.      * @ORM\Column(type="string", length=255)
  32.      */
  33.     private $title;
  34.     public function getId(): ?int
  35.     {
  36.         return $this->id;
  37.     }
  38.     public function getUser(): ?User
  39.     {
  40.         return $this->user;
  41.     }
  42.     public function setUser(?User $user): self
  43.     {
  44.         $this->user $user;
  45.         return $this;
  46.     }
  47.     public function getNews(): ?news
  48.     {
  49.         return $this->news;
  50.     }
  51.     public function setNews(?news $news): self
  52.     {
  53.         $this->news $news;
  54.         return $this;
  55.     }
  56.     public function getCreatedAt(): ?\DateTimeInterface
  57.     {
  58.         return $this->created_at;
  59.     }
  60.     public function setCreatedAt(\DateTimeInterface $created_at): self
  61.     {
  62.         $this->created_at $created_at;
  63.         return $this;
  64.     }
  65.     public function getTitle(): ?string
  66.     {
  67.         return $this->title;
  68.     }
  69.     public function setTitle(string $title): self
  70.     {
  71.         $this->title $title;
  72.         return $this;
  73.     }
  74. }