Project.ts
1.54 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
73
74
75
76
77
78
79
80
import FormRequest from "src/models/FormRequest";
import {ParseItem} from "src/models/models";
export default class Project extends FormRequest {
private _name: string;
private _description: string;
private _adminId: number;
private _situation: string;
private _visible: boolean;
public parseNames: ParseItem[] = [
{
fieldName: 'name',
translation: 'nome'
},
{
fieldName: 'description',
translation: 'descrição'
}
];
constructor(name: string, description: string, adminId: number, situation: string, visible: boolean) {
super();
this._name = name;
this._description = description;
this._adminId = adminId;
this._situation = situation;
this._visible = visible;
}
get name(): string {
return this._name;
}
set name(value: string) {
this._name = value;
}
get description(): string {
return this._description;
}
set description(value: string) {
this._description = value;
}
get adminId(): number {
return this._adminId;
}
set adminId(value: number) {
this._adminId = value;
}
get situation(): string {
return this._situation;
}
set situation(value: string) {
this._situation = value;
}
get visible(): boolean {
return this._visible;
}
set visible(value: boolean) {
this._visible = value;
}
public build(): object {
return {
name: this._name,
description: this._description,
adminId: this._adminId,
situation: this._situation,
visible: this._visible
};
}
}