src/Entity/EventFav.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\EventFavRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use phpDocumentor\Reflection\PseudoTypes\Numeric_;
  6. #[ORM\Entity(repositoryClassEventFavRepository::class)]
  7. class EventFav
  8. {
  9.    
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue(strategy:"AUTO")]
  12.     #[ORM\Column(type:"integer"unique:true )]
  13.     private $id;
  14.     #[ORM\Column(type:"date"nullable:true)]
  15.     private $date;
  16.     #[ORM\ManyToOne (targetEntity:"User")]
  17.     #[ORM\JoinColumn (nullable:false,onDelete:"CASCADE")]
  18.     private $user;
  19.     #[ORM\ManyToOne (targetEntity:"Event")]
  20.     #[ORM\JoinColumn (nullable:false,onDelete:"CASCADE")]
  21.     private $event;
  22.     public function getId(): ?int
  23.     {
  24.         return $this->id;
  25.     }
  26.     /**
  27.      * @return mixed
  28.      */
  29.     public function getUser()
  30.     {
  31.         return $this->user;
  32.     }
  33.     /**
  34.      * @param mixed $user
  35.      */
  36.     public function setUser($user): void
  37.     {
  38.         $this->user $user;
  39.     }
  40.     /**
  41.      * @return mixed
  42.      */
  43.     public function getEvent()
  44.     {
  45.         return $this->event;
  46.     }
  47.     /**
  48.      * @param mixed $event
  49.      */
  50.     public function setEvent($event): void
  51.     {
  52.         $this->event $event;
  53.     }
  54.     public function getDate(): ?\DateTimeInterface
  55.     {
  56.         return $this->date;
  57.     }
  58.     public function setDate(?\DateTimeInterface $date): self
  59.     {
  60.         $this->date $date;
  61.         return $this;
  62.     }
  63. }