src\Entity\UserBookmark.php line 9

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\UserBookmarkRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. #[ORM\Entity(repositoryClassUserBookmarkRepository::class)]
  6. class UserBookmark
  7. {
  8.     #[ORM\Id]
  9.     #[ORM\GeneratedValue]
  10.     #[ORM\Column(type'integer')]
  11.     private $id;
  12.     #[ORM\JoinColumn(nullablefalse)]
  13.     #[ORM\ManyToOne(targetEntityUser::class, inversedBy'bookmarks')]
  14.     private $user;
  15.     #[ORM\JoinColumn(nullablefalse)]
  16.     #[ORM\ManyToOne(targetEntitynews::class, inversedBy'bookmarks')]
  17.     private $news;
  18.     #[ORM\Column(type'datetime')]
  19.     private $created_at;
  20.     #[ORM\Column(type'string'length255)]
  21.     private $title;
  22.     public function getId(): ?int
  23.     {
  24.         return $this->id;
  25.     }
  26.     public function getUser(): ?User
  27.     {
  28.         return $this->user;
  29.     }
  30.     public function setUser(?User $user): self
  31.     {
  32.         $this->user $user;
  33.         return $this;
  34.     }
  35.     public function getNews(): ?news
  36.     {
  37.         return $this->news;
  38.     }
  39.     public function setNews(?news $news): self
  40.     {
  41.         $this->news $news;
  42.         return $this;
  43.     }
  44.     public function getCreatedAt(): ?\DateTimeInterface
  45.     {
  46.         return $this->created_at;
  47.     }
  48.     public function setCreatedAt(\DateTimeInterface $created_at): self
  49.     {
  50.         $this->created_at $created_at;
  51.         return $this;
  52.     }
  53.     public function getTitle(): ?string
  54.     {
  55.         return $this->title;
  56.     }
  57.     public function setTitle(string $title): self
  58.     {
  59.         $this->title $title;
  60.         return $this;
  61.     }
  62. }