<?php
namespace App\Entity;
use App\Repository\EventFavRepository;
use Doctrine\ORM\Mapping as ORM;
use phpDocumentor\Reflection\PseudoTypes\Numeric_;
#[ORM\Entity(repositoryClass: EventFavRepository::class)]
class EventFav
{
#[ORM\Id]
#[ORM\GeneratedValue(strategy:"AUTO")]
#[ORM\Column(type:"integer", unique:true )]
private $id;
#[ORM\Column(type:"date", nullable:true)]
private $date;
#[ORM\ManyToOne (targetEntity:"User")]
#[ORM\JoinColumn (nullable:false,onDelete:"CASCADE")]
private $user;
#[ORM\ManyToOne (targetEntity:"Event")]
#[ORM\JoinColumn (nullable:false,onDelete:"CASCADE")]
private $event;
public function getId(): ?int
{
return $this->id;
}
/**
* @return mixed
*/
public function getUser()
{
return $this->user;
}
/**
* @param mixed $user
*/
public function setUser($user): void
{
$this->user = $user;
}
/**
* @return mixed
*/
public function getEvent()
{
return $this->event;
}
/**
* @param mixed $event
*/
public function setEvent($event): void
{
$this->event = $event;
}
public function getDate(): ?\DateTimeInterface
{
return $this->date;
}
public function setDate(?\DateTimeInterface $date): self
{
$this->date = $date;
return $this;
}
}