104 lines
2.0 KiB
PHP
104 lines
2.0 KiB
PHP
<?php
|
|
|
|
namespace App\Entity;
|
|
// table Utilisateur
|
|
use App\Repository\UserRepository;
|
|
use Doctrine\ORM\Mapping as ORM;
|
|
use phpDocumentor\Reflection\Types\Collection;
|
|
|
|
#[ORM\Entity(repositoryClass: UserRepository::class)]
|
|
#[ORM\Table(name: '`user`')]
|
|
class User
|
|
{
|
|
#[ORM\Id]
|
|
#[ORM\GeneratedValue]
|
|
#[ORM\Column]
|
|
private ?int $id = null;
|
|
|
|
#[ORM\Column(length: 255)]
|
|
private ?string $FirstName = null;
|
|
|
|
#[ORM\Column(length: 255)]
|
|
private ?string $LastName = null;
|
|
|
|
#[ORM\Column(length: 255)]
|
|
private ?string $Mail = null;
|
|
|
|
#[ORM\Column(length: 255)]
|
|
private ?string $Password = null;
|
|
|
|
#[ORM\Column(length: 255)]
|
|
private ?string $Role = null;
|
|
|
|
#[ORM\ManyToMany(targetEntity: Reservation::class, inversedBy: "User")]
|
|
private ?Reservation $Reservation = null;
|
|
|
|
#[ORM\OneToMany(targetEntity: Table::class, mappedBy: "User")]
|
|
private Table $Table ;
|
|
|
|
public function getId(): ?int
|
|
{
|
|
return $this->id;
|
|
}
|
|
|
|
public function getFirstName(): ?string
|
|
{
|
|
return $this->FirstName;
|
|
}
|
|
|
|
public function setFirstName(string $FirstName): static
|
|
{
|
|
$this->FirstName = $FirstName;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getLastName(): ?string
|
|
{
|
|
return $this->LastName;
|
|
}
|
|
|
|
public function setLastName(string $LastName): static
|
|
{
|
|
$this->LastName = $LastName;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getMail(): ?string
|
|
{
|
|
return $this->Mail;
|
|
}
|
|
|
|
public function setMail(string $Mail): static
|
|
{
|
|
$this->Mail = $Mail;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getPassword(): ?string
|
|
{
|
|
return $this->Password;
|
|
}
|
|
|
|
public function setPassword(string $Password): static
|
|
{
|
|
$this->Password = $Password;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getRole(): ?string
|
|
{
|
|
return $this->Role;
|
|
}
|
|
|
|
public function setRole(string $Role): static
|
|
{
|
|
$this->Role = $Role;
|
|
|
|
return $this;
|
|
}
|
|
}
|