1 | <?php |
||
22 | class User implements UserInterface |
||
23 | { |
||
24 | use Entity; |
||
25 | |||
26 | /** |
||
27 | * @ORM\Column(name="id", type="integer", nullable=false) |
||
28 | * @ORM\Id |
||
29 | * @ORM\GeneratedValue(strategy="IDENTITY") |
||
30 | * @Serializer\Type("integer") |
||
31 | * @var int |
||
32 | */ |
||
33 | protected $id; |
||
34 | |||
35 | /** |
||
36 | * @ORM\Column(name="name", type="string", length=1024, nullable=false) |
||
37 | * @Serializer\Type("string") |
||
38 | * @var string |
||
39 | */ |
||
40 | protected $name; |
||
41 | |||
42 | /** |
||
43 | * @ORM\Column(name="email", type="string", length=255, nullable=false, unique=true) |
||
44 | * @Serializer\Type("string") |
||
45 | * @Serializer\Exclude |
||
46 | * @var string |
||
47 | */ |
||
48 | protected $email; |
||
49 | |||
50 | /** |
||
51 | * @ORM\Column(name="active", type="boolean", nullable=true) |
||
52 | * @Serializer\Type("boolean") |
||
53 | * @Serializer\Exclude |
||
54 | * @var bool |
||
55 | */ |
||
56 | protected $active; |
||
57 | |||
58 | /** |
||
59 | * @ORM\Column(name="created", type="datetime", nullable=false) |
||
60 | * @Serializer\Type("DateTime") |
||
61 | * @var DateTime |
||
62 | */ |
||
63 | protected $created; |
||
64 | |||
65 | /** |
||
66 | * @ORM\Column(name="updated", type="datetime", nullable=false) |
||
67 | * @Serializer\Type("DateTime") |
||
68 | * @var DateTime |
||
69 | */ |
||
70 | protected $updated; |
||
71 | |||
72 | /** |
||
73 | * Constructor |
||
74 | */ |
||
75 | public function __construct() |
||
79 | |||
80 | /** |
||
81 | * @inheritDoc |
||
82 | */ |
||
83 | public function getId(): int |
||
87 | |||
88 | /** |
||
89 | * @inheritdoc |
||
90 | */ |
||
91 | public function getName(): string |
||
95 | |||
96 | /** |
||
97 | * @inheritdoc |
||
98 | */ |
||
99 | public function setName(string $name) |
||
109 | |||
110 | /** |
||
111 | * @inheritdoc |
||
112 | */ |
||
113 | public function getEmail(): string |
||
117 | |||
118 | /** |
||
119 | * @inheritdoc |
||
120 | */ |
||
121 | public function setEmail(string $email) |
||
131 | |||
132 | /** |
||
133 | * @inheritdoc |
||
134 | */ |
||
135 | public function delete(): bool |
||
141 | } |
||
142 |