Admin.ts
962 Bytes
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
51
52
53
54
55
56
57
import FormRequest from "src/models/FormRequest";
export default class Admin extends FormRequest {
private _id: number;
private _name: string;
private _login: string;
private _email: string;
constructor(id: number, name: string, login: string, email: string) {
super();
this._id = id;
this._name = name;
this._login = login;
this._email = email;
}
get id(): number {
return this._id;
}
set id(value: number) {
this._id = value;
}
get name(): string {
return this._name;
}
set name(value: string) {
this._name = value;
}
get login(): string {
return this._login;
}
set login(value: string) {
this._login = value;
}
get email(): string {
return this._email;
}
set email(value: string) {
this._email = value;
}
public build(): object {
return {
id: this._id,
name: this._name,
login: this._login,
email: this._email
}
}
}