blob: 26802e246b7a840da744775026c0b7f99761ce46 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
<?php
// src/model/entities/User.php
declare(strict_types=1);
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity]
#[ORM\Table(name: TABLE_PREFIX . "user")]
class User
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: "integer")]
private int $id_user;
/*#[ORM\Column(type: "string", length: 255)]
private string $name;*/
#[ORM\Column(type: "string", length: 255, unique: true)] // risque de modifier son mot de passe sans s'apercevoir qu'il fonctionne encore sur un autre compte
private string $login;
#[ORM\Column(type: "string", length: 255)]
private string $password;
public function __construct(string $login, string $password)
{
$this->login = $login;
$this->password = $password;
}
public function getLogin(): string
{
return $this->login;
}
public function setLogin(string $login): void
{
$this->login = $login;
}
public function getPassword(): string
{
return $this->password;
}
public function setPassword(string $password): void
{
$this->password = $password;
}
}
|