-
Notifications
You must be signed in to change notification settings - Fork 81
Expand file tree
/
Copy pathadminUser.model.ts
More file actions
118 lines (105 loc) · 2.23 KB
/
adminUser.model.ts
File metadata and controls
118 lines (105 loc) · 2.23 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
import { Entity, model, property } from '@loopback/repository';
/* eslint-disable @typescript-eslint/no-empty-interface */
@model({
settings: {
idInjection: false,
postgresql: { schema: 'public', table: 'admin_user' },
},
})
export class AdminUser extends Entity {
@property({
type: Number,
required: true,
scale: 0,
id: 1,
postgresql: {
columnName: 'id',
dataType: 'integer',
dataLength: null,
dataPrecision: null,
dataScale: 0,
nullable: 'NO',
},
})
id: Number;
@property({
type: String,
required: true,
length: 30,
postgresql: {
columnName: 'user_name',
dataType: 'character varying',
dataLength: 150,
dataPrecision: null,
dataScale: null,
nullable: 'NO',
},
})
username: String;
@property({
type: String,
required: true,
length: 30,
postgresql: {
columnName: 'password_hash',
dataType: 'character varying',
dataLength: 150,
dataPrecision: null,
dataScale: null,
nullable: 'NO',
},
})
hasswordHash: String;
@property({
type: String,
required: false,
postgresql: {
columnName: 'email',
dataType: 'character varying',
dataLength: 255,
dataPrecision: null,
dataScale: null,
nullable: 'YES',
},
})
email?: String;
@property({
type: Boolean,
required: true,
postgresql: {
columnName: 'active',
dataType: 'boolean',
},
})
active?: Boolean;
@property({
type: Boolean,
required: true,
postgresql: {
columnName: 'enabled',
dataType: 'boolean',
},
})
enabled?: Boolean;
@property({
type: String,
required: true,
postgresql: {
columnName: 'created_at',
dataType: 'timestamptz',
nullable: 'NO',
},
})
createdAt: String;
// Define well-known properties here
// Indexer property to allow additional data
// eslint-disable-next-line @typescript-eslint/no-explicit-any
[prop: string]: any;
constructor(data?: Partial<AdminUser>) {
super(data);
}
}
export interface AdminUserRelations {
// describe navigational properties here
}
export type AdminUserWithRelations = AdminUser & AdminUserRelations;