<?php
namespace App\Entity;
use App\Repository\UserClubRepository;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: UserClubRepository::class)]
class UserClub
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\ManyToOne(inversedBy: 'userClubs')]
#[ORM\JoinColumn(nullable: false, onDelete: "CASCADE")]
private ?User $user = null;
#[ORM\ManyToOne(inversedBy: 'userClubs')]
#[ORM\JoinColumn(nullable: false, onDelete: "CASCADE")]
private ?Club $club = null;
public function getId(): ?int
{
return $this->id;
}
public function getUser(): ?User
{
return $this->user;
}
public function setUser(?User $user): self
{
$this->user = $user;
return $this;
}
public function getClub(): ?Club
{
return $this->club;
}
public function setClub(?Club $club): self
{
$this->club = $club;
return $this;
}
}