|
|
@ -5,18 +5,41 @@ use Model\Role;
|
|
|
|
// Data Class
|
|
|
|
// Data Class
|
|
|
|
|
|
|
|
|
|
|
|
class User{
|
|
|
|
class User{
|
|
|
|
|
|
|
|
private int $id;
|
|
|
|
|
|
|
|
private string $nom;
|
|
|
|
|
|
|
|
private string $prenom;
|
|
|
|
|
|
|
|
private string $email;
|
|
|
|
|
|
|
|
private string $motDePasse;
|
|
|
|
|
|
|
|
private string $sexe;
|
|
|
|
|
|
|
|
private float $taille;
|
|
|
|
|
|
|
|
private float $poids;
|
|
|
|
|
|
|
|
private \DateTime $dateNaissance;
|
|
|
|
|
|
|
|
private Role $role;
|
|
|
|
|
|
|
|
|
|
|
|
public function __construct(
|
|
|
|
public function __construct(
|
|
|
|
private int $id,
|
|
|
|
int $id,
|
|
|
|
private string $nom,
|
|
|
|
string $nom,
|
|
|
|
private string $prenom,
|
|
|
|
string $prenom,
|
|
|
|
private string $email,
|
|
|
|
string $email,
|
|
|
|
private string $motDePasse,
|
|
|
|
string $motDePasse,
|
|
|
|
private string $sexe,
|
|
|
|
string $sexe,
|
|
|
|
private float $taille,
|
|
|
|
float $taille,
|
|
|
|
private float $poids,
|
|
|
|
float $poids,
|
|
|
|
private \DateTime $dateNaissance,
|
|
|
|
\DateTime $dateNaissance,
|
|
|
|
private Role $role,
|
|
|
|
Role $role
|
|
|
|
) {}
|
|
|
|
) {
|
|
|
|
|
|
|
|
$this->id = $id;
|
|
|
|
|
|
|
|
$this->nom = $nom;
|
|
|
|
|
|
|
|
$this->prenom = $prenom;
|
|
|
|
|
|
|
|
$this->email = $email;
|
|
|
|
|
|
|
|
$this->motDePasse = $motDePasse;
|
|
|
|
|
|
|
|
$this->sexe = $sexe;
|
|
|
|
|
|
|
|
$this->taille = $taille;
|
|
|
|
|
|
|
|
$this->poids = $poids;
|
|
|
|
|
|
|
|
$this->dateNaissance = $dateNaissance;
|
|
|
|
|
|
|
|
$this->role = $role;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public function getId(): int {
|
|
|
|
public function getId(): int {
|
|
|
|
return $this->id;
|
|
|
|
return $this->id;
|
|
|
|
}
|
|
|
|
}
|
|
|
|