User.ts
1.28 KB
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
import FormRequest from "src/models/FormRequest";
import {ParseItem} from "src/models/models";
export default class User extends FormRequest {
private _name: string;
private _login: string;
private _password: string;
private _email: string;
public parseNames: ParseItem[] = [
{
fieldName: 'name',
translation: 'nome'
},
{
fieldName: 'description',
translation: 'descrição'
}
];
constructor(name: string, login: string, password: string, email: string, parseNames: ParseItem[]) {
super();
this._name = name;
this._login = login;
this._password = password;
this._email = email;
this.parseNames = parseNames;
}
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 password(): string {
return this._password;
}
set password(value: string) {
this._password = value;
}
get email(): string {
return this._email;
}
set email(value: string) {
this._email = value;
}
public build(): object {
return {
name: this._name,
login: this._login,
password: this._password,
email: this._email
}
}
}