<?php
namespace App\Entity;
use App\Repository\UtilisateurMineRepository;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=UtilisateurMineRepository::class)
*/
class UtilisateurMine
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity=User::class, inversedBy="utilisateurMines",cascade={"persist"})
* @ORM\JoinColumn(nullable=false)
*/
private $user;
/**
* @ORM\ManyToOne(targetEntity=Mine::class, inversedBy="utilisateurMines")
* @ORM\JoinColumn(nullable=false)
*/
private $mine;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $estPrincipale;
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 getMine(): ?Mine
{
return $this->mine;
}
public function setMine(?Mine $mine): self
{
$this->mine = $mine;
return $this;
}
public function getEstPrincipale(): ?bool
{
return $this->estPrincipale;
}
public function setEstPrincipale(?bool $estPrincipale): self
{
$this->estPrincipale = $estPrincipale;
return $this;
}
}