src/Entity/Favorite.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\FavoriteRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Entity(repositoryClass=FavoriteRepository::class)
  7.  */
  8. class Favorite
  9. {
  10.     /**
  11.      * @ORM\Id
  12.      * @ORM\GeneratedValue
  13.      * @ORM\Column(type="integer")
  14.      */
  15.     private $id;
  16.     /**
  17.      * @ORM\ManyToOne(targetEntity=Articles::class, inversedBy="favorites")
  18.      */
  19.     private $article;
  20.     /**
  21.      * @ORM\ManyToOne(targetEntity=Establishments::class, inversedBy="favorites")
  22.      */
  23.     private $establishment;
  24.     /**
  25.      * @ORM\ManyToOne(targetEntity=Users::class, inversedBy="favorites")
  26.      */
  27.     private $user;
  28.     /**
  29.      * @ORM\Column(type="datetime")
  30.      */
  31.     private $created_at;
  32.     /**
  33.      * @ORM\Column(type="boolean")
  34.      */
  35.     private $deleted false;
  36.     public function getId(): ?int
  37.     {
  38.         return $this->id;
  39.     }
  40.     public function getArticle(): ?Articles
  41.     {
  42.         return $this->article;
  43.     }
  44.     public function setArticle(?Articles $article): self
  45.     {
  46.         $this->article $article;
  47.         return $this;
  48.     }
  49.     public function getEstablishment(): ?Establishments
  50.     {
  51.         return $this->establishment;
  52.     }
  53.     public function setEstablishment(?Establishments $establishment): self
  54.     {
  55.         $this->establishment $establishment;
  56.         return $this;
  57.     }
  58.     public function getUser(): ?Users
  59.     {
  60.         return $this->user;
  61.     }
  62.     public function setUser(?Users $user): self
  63.     {
  64.         $this->user $user;
  65.         return $this;
  66.     }
  67.     public function getCreatedAt(): ?\DateTimeInterface
  68.     {
  69.         return $this->created_at;
  70.     }
  71.     public function setCreatedAt(\DateTimeInterface $created_at): self
  72.     {
  73.         $this->created_at $created_at;
  74.         return $this;
  75.     }
  76.     public function isDeleted(): ?bool
  77.     {
  78.         return $this->deleted;
  79.     }
  80.     public function setDeleted(bool $deleted): self
  81.     {
  82.         $this->deleted $deleted;
  83.         return $this;
  84.     }
  85. }