@admc-go-th/admc-library 1.0.13 → 1.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/authAssignment-B6rhOsb-.d.ts +146 -0
- package/authItem-23raYvdO.d.ts +39 -0
- package/databases/models/authAssignment.d.ts +2 -20
- package/databases/models/authAssignment.js +422 -11
- package/databases/models/authItem.d.ts +3 -26
- package/databases/models/authItem.js +194 -19
- package/databases/models/authItemChild.d.ts +3 -12
- package/databases/models/authItemChild.js +228 -5
- package/databases/models/authRole.d.ts +2 -20
- package/databases/models/authRole.js +422 -7
- package/databases/models/index.d.ts +3 -9
- package/databases/models/index.js +413 -341
- package/databases/models/mdContent.d.ts +2 -38
- package/databases/models/mdContent.js +383 -30
- package/databases/models/mdContentGroup.d.ts +2 -22
- package/databases/models/mdContentGroup.js +422 -13
- package/databases/models/menu.d.ts +2 -26
- package/databases/models/menu.js +81 -17
- package/databases/models/msModule.d.ts +2 -20
- package/databases/models/msModule.js +91 -7
- package/databases/models/users.d.ts +2 -50
- package/databases/models/users.js +355 -41
- package/databases/schema/authAssignment.ts +72 -0
- package/databases/schema/authItem.ts +93 -0
- package/databases/schema/authItemChild.ts +34 -0
- package/databases/schema/authRole.ts +66 -0
- package/databases/schema/authRoleChild.ts +37 -0
- package/databases/schema/index.ts +10 -0
- package/databases/schema/mdContent.ts +139 -0
- package/databases/schema/mdContentGroup.ts +73 -0
- package/databases/schema/menu.ts +93 -0
- package/databases/schema/msModule.ts +66 -0
- package/databases/schema/users.ts +186 -0
- package/menu-7H-HhIig.d.ts +45 -0
- package/package.json +4 -2
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import { Model } from 'sequelize-typescript';
|
|
2
|
+
|
|
3
|
+
interface mdContentGroupAttributes {
|
|
4
|
+
id?: number;
|
|
5
|
+
name: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
createdBy?: string;
|
|
8
|
+
createdDate?: Date;
|
|
9
|
+
updatedBy?: string;
|
|
10
|
+
updatedDate?: Date;
|
|
11
|
+
}
|
|
12
|
+
declare class mdContentGroup extends Model<mdContentGroupAttributes, mdContentGroupAttributes> implements mdContentGroupAttributes {
|
|
13
|
+
id?: number;
|
|
14
|
+
name: string;
|
|
15
|
+
description?: string;
|
|
16
|
+
createdBy?: string;
|
|
17
|
+
createdDate?: Date;
|
|
18
|
+
updatedBy?: string;
|
|
19
|
+
updatedDate?: Date;
|
|
20
|
+
mdContents?: mdContent[];
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
interface mdContentAttributes {
|
|
24
|
+
id?: number;
|
|
25
|
+
uuid: number;
|
|
26
|
+
groupId?: number;
|
|
27
|
+
userId: number;
|
|
28
|
+
title?: string;
|
|
29
|
+
detail?: string;
|
|
30
|
+
metaTitle?: string;
|
|
31
|
+
metaKeyword?: string;
|
|
32
|
+
metaDescription?: string;
|
|
33
|
+
imageCover?: string;
|
|
34
|
+
imageGallery?: string;
|
|
35
|
+
createdBy?: string;
|
|
36
|
+
createdDate?: Date;
|
|
37
|
+
updatedBy?: string;
|
|
38
|
+
updatedDate?: Date;
|
|
39
|
+
}
|
|
40
|
+
declare class mdContent extends Model<mdContentAttributes, mdContentAttributes> implements mdContentAttributes {
|
|
41
|
+
id?: number;
|
|
42
|
+
uuid: number;
|
|
43
|
+
groupId?: number;
|
|
44
|
+
userId: number;
|
|
45
|
+
title?: string;
|
|
46
|
+
detail?: string;
|
|
47
|
+
metaTitle?: string;
|
|
48
|
+
metaKeyword?: string;
|
|
49
|
+
metaDescription?: string;
|
|
50
|
+
imageCover?: string;
|
|
51
|
+
imageGallery?: string;
|
|
52
|
+
createdBy?: string;
|
|
53
|
+
createdDate?: Date;
|
|
54
|
+
updatedBy?: string;
|
|
55
|
+
updatedDate?: Date;
|
|
56
|
+
user?: users;
|
|
57
|
+
mdContentGroup?: mdContentGroup;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
interface usersAttributes {
|
|
61
|
+
id?: number;
|
|
62
|
+
uuid: string;
|
|
63
|
+
username: string;
|
|
64
|
+
passwordHash?: string;
|
|
65
|
+
passwordResetToken?: string;
|
|
66
|
+
verificationToken?: string;
|
|
67
|
+
email?: string;
|
|
68
|
+
authKey?: string;
|
|
69
|
+
accessToken?: string;
|
|
70
|
+
userLevel?: number;
|
|
71
|
+
userAuthen?: string;
|
|
72
|
+
userType?: number;
|
|
73
|
+
prefix?: string;
|
|
74
|
+
firstName?: string;
|
|
75
|
+
lastName?: string;
|
|
76
|
+
phone?: string;
|
|
77
|
+
status?: number;
|
|
78
|
+
createdBy?: string;
|
|
79
|
+
createdDate?: Date;
|
|
80
|
+
updatedBy?: string;
|
|
81
|
+
updatedDate?: Date;
|
|
82
|
+
}
|
|
83
|
+
declare class users extends Model<usersAttributes, usersAttributes> implements usersAttributes {
|
|
84
|
+
id?: number;
|
|
85
|
+
uuid: string;
|
|
86
|
+
username: string;
|
|
87
|
+
passwordHash?: string;
|
|
88
|
+
passwordResetToken?: string;
|
|
89
|
+
verificationToken?: string;
|
|
90
|
+
email?: string;
|
|
91
|
+
authKey?: string;
|
|
92
|
+
accessToken?: string;
|
|
93
|
+
userLevel?: number;
|
|
94
|
+
userAuthen?: string;
|
|
95
|
+
userType?: number;
|
|
96
|
+
prefix?: string;
|
|
97
|
+
firstName?: string;
|
|
98
|
+
lastName?: string;
|
|
99
|
+
phone?: string;
|
|
100
|
+
status?: number;
|
|
101
|
+
createdBy?: string;
|
|
102
|
+
createdDate?: Date;
|
|
103
|
+
updatedBy?: string;
|
|
104
|
+
updatedDate?: Date;
|
|
105
|
+
authAssignments?: authAssignment[];
|
|
106
|
+
mdContents?: mdContent[];
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
interface authRoleAttributes {
|
|
110
|
+
id?: number;
|
|
111
|
+
name: string;
|
|
112
|
+
createdBy?: string;
|
|
113
|
+
createdDate?: Date;
|
|
114
|
+
updatedBy?: string;
|
|
115
|
+
updatedDate?: Date;
|
|
116
|
+
}
|
|
117
|
+
declare class authRole extends Model<authRoleAttributes, authRoleAttributes> implements authRoleAttributes {
|
|
118
|
+
id?: number;
|
|
119
|
+
name: string;
|
|
120
|
+
createdBy?: string;
|
|
121
|
+
createdDate?: Date;
|
|
122
|
+
updatedBy?: string;
|
|
123
|
+
updatedDate?: Date;
|
|
124
|
+
authAssignments?: authAssignment[];
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
interface authAssignmentAttributes {
|
|
128
|
+
roleId: number;
|
|
129
|
+
userId: number;
|
|
130
|
+
createdBy?: string;
|
|
131
|
+
createdDate?: Date;
|
|
132
|
+
updatedBy?: string;
|
|
133
|
+
updatedDate?: Date;
|
|
134
|
+
}
|
|
135
|
+
declare class authAssignment extends Model<authAssignmentAttributes, authAssignmentAttributes> implements authAssignmentAttributes {
|
|
136
|
+
roleId: number;
|
|
137
|
+
userId: number;
|
|
138
|
+
createdBy?: string;
|
|
139
|
+
createdDate?: Date;
|
|
140
|
+
updatedBy?: string;
|
|
141
|
+
updatedDate?: Date;
|
|
142
|
+
user?: users;
|
|
143
|
+
authRole?: authRole;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
export { type authAssignmentAttributes as a, authAssignment as b, type authRoleAttributes as c, authRole as d, mdContent as e, type mdContentGroupAttributes as f, mdContentGroup as g, users as h, type mdContentAttributes as m, type usersAttributes as u };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Model } from 'sequelize-typescript';
|
|
2
|
+
import { a as menu } from './menu-7H-HhIig.js';
|
|
3
|
+
|
|
4
|
+
interface authItemChildAttributes {
|
|
5
|
+
parent: string;
|
|
6
|
+
child: string;
|
|
7
|
+
}
|
|
8
|
+
declare class authItemChild extends Model<authItemChildAttributes, authItemChildAttributes> implements authItemChildAttributes {
|
|
9
|
+
parent: string;
|
|
10
|
+
child: string;
|
|
11
|
+
authItem?: authItem;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
interface authItemAttributes {
|
|
15
|
+
keyName: string;
|
|
16
|
+
type: number;
|
|
17
|
+
display: string;
|
|
18
|
+
description?: string;
|
|
19
|
+
status?: number;
|
|
20
|
+
createdBy?: string;
|
|
21
|
+
createdDate?: Date;
|
|
22
|
+
updatedBy?: string;
|
|
23
|
+
updatedDate?: Date;
|
|
24
|
+
}
|
|
25
|
+
declare class authItem extends Model<authItemAttributes, authItemAttributes> implements authItemAttributes {
|
|
26
|
+
keyName: string;
|
|
27
|
+
type: number;
|
|
28
|
+
display: string;
|
|
29
|
+
description?: string;
|
|
30
|
+
status?: number;
|
|
31
|
+
createdBy?: string;
|
|
32
|
+
createdDate?: Date;
|
|
33
|
+
updatedBy?: string;
|
|
34
|
+
updatedDate?: Date;
|
|
35
|
+
menus?: menu[];
|
|
36
|
+
authItemChildren?: authItemChild[];
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export { type authItemAttributes as a, authItem as b, type authItemChildAttributes as c, authItemChild as d };
|
|
@@ -1,20 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
interface authAssignmentAttributes {
|
|
4
|
-
roleId: number;
|
|
5
|
-
userId: number;
|
|
6
|
-
createdBy?: string;
|
|
7
|
-
createdDate?: Date;
|
|
8
|
-
updatedBy?: string;
|
|
9
|
-
updatedDate?: Date;
|
|
10
|
-
}
|
|
11
|
-
declare class authAssignment extends Model<authAssignmentAttributes, authAssignmentAttributes> implements authAssignmentAttributes {
|
|
12
|
-
roleId: number;
|
|
13
|
-
userId: number;
|
|
14
|
-
createdBy?: string;
|
|
15
|
-
createdDate?: Date;
|
|
16
|
-
updatedBy?: string;
|
|
17
|
-
updatedDate?: Date;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export { authAssignment, type authAssignmentAttributes };
|
|
1
|
+
import 'sequelize-typescript';
|
|
2
|
+
export { b as authAssignment, a as authAssignmentAttributes } from '../../authAssignment-B6rhOsb-.js';
|
|
@@ -31,53 +31,464 @@ __export(authAssignment_exports, {
|
|
|
31
31
|
authAssignment: () => authAssignment
|
|
32
32
|
});
|
|
33
33
|
module.exports = __toCommonJS(authAssignment_exports);
|
|
34
|
+
var import_sequelize_typescript5 = require("sequelize-typescript");
|
|
35
|
+
|
|
36
|
+
// src/databases/models/users.ts
|
|
37
|
+
var import_sequelize_typescript3 = require("sequelize-typescript");
|
|
38
|
+
|
|
39
|
+
// src/databases/models/mdContent.ts
|
|
40
|
+
var import_sequelize_typescript2 = require("sequelize-typescript");
|
|
41
|
+
|
|
42
|
+
// src/databases/models/mdContentGroup.ts
|
|
34
43
|
var import_sequelize_typescript = require("sequelize-typescript");
|
|
35
|
-
var
|
|
44
|
+
var mdContentGroup = class extends import_sequelize_typescript.Model {
|
|
36
45
|
};
|
|
37
46
|
__decorateClass([
|
|
38
47
|
(0, import_sequelize_typescript.Column)({
|
|
39
|
-
field: "role_id",
|
|
40
48
|
primaryKey: true,
|
|
49
|
+
autoIncrement: true,
|
|
41
50
|
type: import_sequelize_typescript.DataType.INTEGER
|
|
42
51
|
})
|
|
43
|
-
],
|
|
52
|
+
], mdContentGroup.prototype, "id", 2);
|
|
44
53
|
__decorateClass([
|
|
45
54
|
(0, import_sequelize_typescript.Column)({
|
|
46
|
-
|
|
47
|
-
primaryKey: true,
|
|
48
|
-
type: import_sequelize_typescript.DataType.INTEGER
|
|
55
|
+
type: import_sequelize_typescript.DataType.STRING(255)
|
|
49
56
|
})
|
|
50
|
-
],
|
|
57
|
+
], mdContentGroup.prototype, "name", 2);
|
|
58
|
+
__decorateClass([
|
|
59
|
+
(0, import_sequelize_typescript.Column)({
|
|
60
|
+
allowNull: true,
|
|
61
|
+
type: import_sequelize_typescript.DataType.STRING(255)
|
|
62
|
+
})
|
|
63
|
+
], mdContentGroup.prototype, "description", 2);
|
|
51
64
|
__decorateClass([
|
|
52
65
|
(0, import_sequelize_typescript.Column)({
|
|
53
66
|
field: "created_by",
|
|
54
67
|
allowNull: true,
|
|
55
68
|
type: import_sequelize_typescript.DataType.STRING(60)
|
|
56
69
|
})
|
|
57
|
-
],
|
|
70
|
+
], mdContentGroup.prototype, "createdBy", 2);
|
|
58
71
|
__decorateClass([
|
|
59
72
|
(0, import_sequelize_typescript.Column)({
|
|
60
73
|
field: "created_date",
|
|
61
74
|
allowNull: true,
|
|
62
75
|
type: import_sequelize_typescript.DataType.DATE
|
|
63
76
|
})
|
|
64
|
-
],
|
|
77
|
+
], mdContentGroup.prototype, "createdDate", 2);
|
|
65
78
|
__decorateClass([
|
|
66
79
|
(0, import_sequelize_typescript.Column)({
|
|
67
80
|
field: "updated_by",
|
|
68
81
|
allowNull: true,
|
|
69
82
|
type: import_sequelize_typescript.DataType.STRING(60)
|
|
70
83
|
})
|
|
71
|
-
],
|
|
84
|
+
], mdContentGroup.prototype, "updatedBy", 2);
|
|
72
85
|
__decorateClass([
|
|
73
86
|
(0, import_sequelize_typescript.Column)({
|
|
74
87
|
field: "updated_date",
|
|
75
88
|
allowNull: true,
|
|
76
89
|
type: import_sequelize_typescript.DataType.DATE
|
|
77
90
|
})
|
|
91
|
+
], mdContentGroup.prototype, "updatedDate", 2);
|
|
92
|
+
__decorateClass([
|
|
93
|
+
(0, import_sequelize_typescript.HasMany)(() => mdContent, {
|
|
94
|
+
sourceKey: "id"
|
|
95
|
+
})
|
|
96
|
+
], mdContentGroup.prototype, "mdContents", 2);
|
|
97
|
+
mdContentGroup = __decorateClass([
|
|
98
|
+
(0, import_sequelize_typescript.Table)({
|
|
99
|
+
tableName: "md_content_group",
|
|
100
|
+
timestamps: false
|
|
101
|
+
})
|
|
102
|
+
], mdContentGroup);
|
|
103
|
+
|
|
104
|
+
// src/databases/models/mdContent.ts
|
|
105
|
+
var mdContent = class extends import_sequelize_typescript2.Model {
|
|
106
|
+
};
|
|
107
|
+
__decorateClass([
|
|
108
|
+
(0, import_sequelize_typescript2.Column)({
|
|
109
|
+
primaryKey: true,
|
|
110
|
+
autoIncrement: true,
|
|
111
|
+
type: import_sequelize_typescript2.DataType.INTEGER
|
|
112
|
+
})
|
|
113
|
+
], mdContent.prototype, "id", 2);
|
|
114
|
+
__decorateClass([
|
|
115
|
+
(0, import_sequelize_typescript2.Column)({
|
|
116
|
+
type: import_sequelize_typescript2.DataType.INTEGER
|
|
117
|
+
})
|
|
118
|
+
], mdContent.prototype, "uuid", 2);
|
|
119
|
+
__decorateClass([
|
|
120
|
+
(0, import_sequelize_typescript2.ForeignKey)(() => mdContentGroup),
|
|
121
|
+
(0, import_sequelize_typescript2.Column)({
|
|
122
|
+
field: "group_id",
|
|
123
|
+
allowNull: true,
|
|
124
|
+
type: import_sequelize_typescript2.DataType.INTEGER
|
|
125
|
+
})
|
|
126
|
+
], mdContent.prototype, "groupId", 2);
|
|
127
|
+
__decorateClass([
|
|
128
|
+
(0, import_sequelize_typescript2.ForeignKey)(() => users),
|
|
129
|
+
(0, import_sequelize_typescript2.Column)({
|
|
130
|
+
field: "user_id",
|
|
131
|
+
type: import_sequelize_typescript2.DataType.INTEGER
|
|
132
|
+
})
|
|
133
|
+
], mdContent.prototype, "userId", 2);
|
|
134
|
+
__decorateClass([
|
|
135
|
+
(0, import_sequelize_typescript2.Column)({
|
|
136
|
+
allowNull: true,
|
|
137
|
+
type: import_sequelize_typescript2.DataType.STRING(255)
|
|
138
|
+
})
|
|
139
|
+
], mdContent.prototype, "title", 2);
|
|
140
|
+
__decorateClass([
|
|
141
|
+
(0, import_sequelize_typescript2.Column)({
|
|
142
|
+
allowNull: true,
|
|
143
|
+
type: import_sequelize_typescript2.DataType.STRING
|
|
144
|
+
})
|
|
145
|
+
], mdContent.prototype, "detail", 2);
|
|
146
|
+
__decorateClass([
|
|
147
|
+
(0, import_sequelize_typescript2.Column)({
|
|
148
|
+
field: "meta_title",
|
|
149
|
+
allowNull: true,
|
|
150
|
+
type: import_sequelize_typescript2.DataType.STRING(255)
|
|
151
|
+
})
|
|
152
|
+
], mdContent.prototype, "metaTitle", 2);
|
|
153
|
+
__decorateClass([
|
|
154
|
+
(0, import_sequelize_typescript2.Column)({
|
|
155
|
+
field: "meta_keyword",
|
|
156
|
+
allowNull: true,
|
|
157
|
+
type: import_sequelize_typescript2.DataType.STRING(255)
|
|
158
|
+
})
|
|
159
|
+
], mdContent.prototype, "metaKeyword", 2);
|
|
160
|
+
__decorateClass([
|
|
161
|
+
(0, import_sequelize_typescript2.Column)({
|
|
162
|
+
field: "meta_description",
|
|
163
|
+
allowNull: true,
|
|
164
|
+
type: import_sequelize_typescript2.DataType.STRING(255)
|
|
165
|
+
})
|
|
166
|
+
], mdContent.prototype, "metaDescription", 2);
|
|
167
|
+
__decorateClass([
|
|
168
|
+
(0, import_sequelize_typescript2.Column)({
|
|
169
|
+
field: "image_cover",
|
|
170
|
+
allowNull: true,
|
|
171
|
+
type: import_sequelize_typescript2.DataType.STRING(255)
|
|
172
|
+
})
|
|
173
|
+
], mdContent.prototype, "imageCover", 2);
|
|
174
|
+
__decorateClass([
|
|
175
|
+
(0, import_sequelize_typescript2.Column)({
|
|
176
|
+
field: "image_gallery",
|
|
177
|
+
allowNull: true,
|
|
178
|
+
type: import_sequelize_typescript2.DataType.STRING
|
|
179
|
+
})
|
|
180
|
+
], mdContent.prototype, "imageGallery", 2);
|
|
181
|
+
__decorateClass([
|
|
182
|
+
(0, import_sequelize_typescript2.Column)({
|
|
183
|
+
field: "created_by",
|
|
184
|
+
allowNull: true,
|
|
185
|
+
type: import_sequelize_typescript2.DataType.STRING(60)
|
|
186
|
+
})
|
|
187
|
+
], mdContent.prototype, "createdBy", 2);
|
|
188
|
+
__decorateClass([
|
|
189
|
+
(0, import_sequelize_typescript2.Column)({
|
|
190
|
+
field: "created_date",
|
|
191
|
+
allowNull: true,
|
|
192
|
+
type: import_sequelize_typescript2.DataType.DATE
|
|
193
|
+
})
|
|
194
|
+
], mdContent.prototype, "createdDate", 2);
|
|
195
|
+
__decorateClass([
|
|
196
|
+
(0, import_sequelize_typescript2.Column)({
|
|
197
|
+
field: "updated_by",
|
|
198
|
+
allowNull: true,
|
|
199
|
+
type: import_sequelize_typescript2.DataType.STRING(60)
|
|
200
|
+
})
|
|
201
|
+
], mdContent.prototype, "updatedBy", 2);
|
|
202
|
+
__decorateClass([
|
|
203
|
+
(0, import_sequelize_typescript2.Column)({
|
|
204
|
+
field: "updated_date",
|
|
205
|
+
allowNull: true,
|
|
206
|
+
type: import_sequelize_typescript2.DataType.DATE
|
|
207
|
+
})
|
|
208
|
+
], mdContent.prototype, "updatedDate", 2);
|
|
209
|
+
__decorateClass([
|
|
210
|
+
(0, import_sequelize_typescript2.BelongsTo)(() => users)
|
|
211
|
+
], mdContent.prototype, "user", 2);
|
|
212
|
+
__decorateClass([
|
|
213
|
+
(0, import_sequelize_typescript2.BelongsTo)(() => mdContentGroup)
|
|
214
|
+
], mdContent.prototype, "mdContentGroup", 2);
|
|
215
|
+
mdContent = __decorateClass([
|
|
216
|
+
(0, import_sequelize_typescript2.Table)({
|
|
217
|
+
tableName: "md_content",
|
|
218
|
+
timestamps: false
|
|
219
|
+
})
|
|
220
|
+
], mdContent);
|
|
221
|
+
|
|
222
|
+
// src/databases/models/users.ts
|
|
223
|
+
var users = class extends import_sequelize_typescript3.Model {
|
|
224
|
+
};
|
|
225
|
+
__decorateClass([
|
|
226
|
+
(0, import_sequelize_typescript3.Column)({
|
|
227
|
+
primaryKey: true,
|
|
228
|
+
autoIncrement: true,
|
|
229
|
+
type: import_sequelize_typescript3.DataType.INTEGER
|
|
230
|
+
})
|
|
231
|
+
], users.prototype, "id", 2);
|
|
232
|
+
__decorateClass([
|
|
233
|
+
(0, import_sequelize_typescript3.Column)({
|
|
234
|
+
type: import_sequelize_typescript3.DataType.STRING(60)
|
|
235
|
+
})
|
|
236
|
+
], users.prototype, "uuid", 2);
|
|
237
|
+
__decorateClass([
|
|
238
|
+
(0, import_sequelize_typescript3.Column)({
|
|
239
|
+
type: import_sequelize_typescript3.DataType.STRING(100)
|
|
240
|
+
})
|
|
241
|
+
], users.prototype, "username", 2);
|
|
242
|
+
__decorateClass([
|
|
243
|
+
(0, import_sequelize_typescript3.Column)({
|
|
244
|
+
field: "password_hash",
|
|
245
|
+
allowNull: true,
|
|
246
|
+
type: import_sequelize_typescript3.DataType.STRING(255)
|
|
247
|
+
})
|
|
248
|
+
], users.prototype, "passwordHash", 2);
|
|
249
|
+
__decorateClass([
|
|
250
|
+
(0, import_sequelize_typescript3.Column)({
|
|
251
|
+
field: "password_reset_token",
|
|
252
|
+
allowNull: true,
|
|
253
|
+
type: import_sequelize_typescript3.DataType.STRING(255)
|
|
254
|
+
})
|
|
255
|
+
], users.prototype, "passwordResetToken", 2);
|
|
256
|
+
__decorateClass([
|
|
257
|
+
(0, import_sequelize_typescript3.Column)({
|
|
258
|
+
field: "verification_token",
|
|
259
|
+
allowNull: true,
|
|
260
|
+
type: import_sequelize_typescript3.DataType.STRING(255)
|
|
261
|
+
})
|
|
262
|
+
], users.prototype, "verificationToken", 2);
|
|
263
|
+
__decorateClass([
|
|
264
|
+
(0, import_sequelize_typescript3.Column)({
|
|
265
|
+
allowNull: true,
|
|
266
|
+
type: import_sequelize_typescript3.DataType.STRING(255)
|
|
267
|
+
})
|
|
268
|
+
], users.prototype, "email", 2);
|
|
269
|
+
__decorateClass([
|
|
270
|
+
(0, import_sequelize_typescript3.Column)({
|
|
271
|
+
field: "auth_key",
|
|
272
|
+
allowNull: true,
|
|
273
|
+
type: import_sequelize_typescript3.DataType.STRING(32)
|
|
274
|
+
})
|
|
275
|
+
], users.prototype, "authKey", 2);
|
|
276
|
+
__decorateClass([
|
|
277
|
+
(0, import_sequelize_typescript3.Column)({
|
|
278
|
+
field: "access_token",
|
|
279
|
+
allowNull: true,
|
|
280
|
+
type: import_sequelize_typescript3.DataType.STRING
|
|
281
|
+
})
|
|
282
|
+
], users.prototype, "accessToken", 2);
|
|
283
|
+
__decorateClass([
|
|
284
|
+
(0, import_sequelize_typescript3.Column)({
|
|
285
|
+
field: "user_level",
|
|
286
|
+
allowNull: true,
|
|
287
|
+
type: import_sequelize_typescript3.DataType.INTEGER
|
|
288
|
+
})
|
|
289
|
+
], users.prototype, "userLevel", 2);
|
|
290
|
+
__decorateClass([
|
|
291
|
+
(0, import_sequelize_typescript3.Column)({
|
|
292
|
+
field: "user_authen",
|
|
293
|
+
allowNull: true,
|
|
294
|
+
type: import_sequelize_typescript3.DataType.STRING(64)
|
|
295
|
+
})
|
|
296
|
+
], users.prototype, "userAuthen", 2);
|
|
297
|
+
__decorateClass([
|
|
298
|
+
(0, import_sequelize_typescript3.Column)({
|
|
299
|
+
field: "user_type",
|
|
300
|
+
allowNull: true,
|
|
301
|
+
type: import_sequelize_typescript3.DataType.INTEGER
|
|
302
|
+
})
|
|
303
|
+
], users.prototype, "userType", 2);
|
|
304
|
+
__decorateClass([
|
|
305
|
+
(0, import_sequelize_typescript3.Column)({
|
|
306
|
+
allowNull: true,
|
|
307
|
+
type: import_sequelize_typescript3.DataType.STRING(10)
|
|
308
|
+
})
|
|
309
|
+
], users.prototype, "prefix", 2);
|
|
310
|
+
__decorateClass([
|
|
311
|
+
(0, import_sequelize_typescript3.Column)({
|
|
312
|
+
field: "first_name",
|
|
313
|
+
allowNull: true,
|
|
314
|
+
type: import_sequelize_typescript3.DataType.STRING(100)
|
|
315
|
+
})
|
|
316
|
+
], users.prototype, "firstName", 2);
|
|
317
|
+
__decorateClass([
|
|
318
|
+
(0, import_sequelize_typescript3.Column)({
|
|
319
|
+
field: "last_name",
|
|
320
|
+
allowNull: true,
|
|
321
|
+
type: import_sequelize_typescript3.DataType.STRING(100)
|
|
322
|
+
})
|
|
323
|
+
], users.prototype, "lastName", 2);
|
|
324
|
+
__decorateClass([
|
|
325
|
+
(0, import_sequelize_typescript3.Column)({
|
|
326
|
+
allowNull: true,
|
|
327
|
+
type: import_sequelize_typescript3.DataType.STRING(20)
|
|
328
|
+
})
|
|
329
|
+
], users.prototype, "phone", 2);
|
|
330
|
+
__decorateClass([
|
|
331
|
+
(0, import_sequelize_typescript3.Column)({
|
|
332
|
+
allowNull: true,
|
|
333
|
+
type: import_sequelize_typescript3.DataType.SMALLINT
|
|
334
|
+
})
|
|
335
|
+
], users.prototype, "status", 2);
|
|
336
|
+
__decorateClass([
|
|
337
|
+
(0, import_sequelize_typescript3.Column)({
|
|
338
|
+
field: "created_by",
|
|
339
|
+
allowNull: true,
|
|
340
|
+
type: import_sequelize_typescript3.DataType.STRING(60)
|
|
341
|
+
})
|
|
342
|
+
], users.prototype, "createdBy", 2);
|
|
343
|
+
__decorateClass([
|
|
344
|
+
(0, import_sequelize_typescript3.Column)({
|
|
345
|
+
field: "created_date",
|
|
346
|
+
allowNull: true,
|
|
347
|
+
type: import_sequelize_typescript3.DataType.DATE
|
|
348
|
+
})
|
|
349
|
+
], users.prototype, "createdDate", 2);
|
|
350
|
+
__decorateClass([
|
|
351
|
+
(0, import_sequelize_typescript3.Column)({
|
|
352
|
+
field: "updated_by",
|
|
353
|
+
allowNull: true,
|
|
354
|
+
type: import_sequelize_typescript3.DataType.STRING(60)
|
|
355
|
+
})
|
|
356
|
+
], users.prototype, "updatedBy", 2);
|
|
357
|
+
__decorateClass([
|
|
358
|
+
(0, import_sequelize_typescript3.Column)({
|
|
359
|
+
field: "updated_date",
|
|
360
|
+
allowNull: true,
|
|
361
|
+
type: import_sequelize_typescript3.DataType.DATE
|
|
362
|
+
})
|
|
363
|
+
], users.prototype, "updatedDate", 2);
|
|
364
|
+
__decorateClass([
|
|
365
|
+
(0, import_sequelize_typescript3.HasMany)(() => authAssignment, {
|
|
366
|
+
sourceKey: "id"
|
|
367
|
+
})
|
|
368
|
+
], users.prototype, "authAssignments", 2);
|
|
369
|
+
__decorateClass([
|
|
370
|
+
(0, import_sequelize_typescript3.HasMany)(() => mdContent, {
|
|
371
|
+
sourceKey: "id"
|
|
372
|
+
})
|
|
373
|
+
], users.prototype, "mdContents", 2);
|
|
374
|
+
users = __decorateClass([
|
|
375
|
+
(0, import_sequelize_typescript3.Table)({
|
|
376
|
+
tableName: "users",
|
|
377
|
+
timestamps: false
|
|
378
|
+
})
|
|
379
|
+
], users);
|
|
380
|
+
|
|
381
|
+
// src/databases/models/authRole.ts
|
|
382
|
+
var import_sequelize_typescript4 = require("sequelize-typescript");
|
|
383
|
+
var authRole = class extends import_sequelize_typescript4.Model {
|
|
384
|
+
};
|
|
385
|
+
__decorateClass([
|
|
386
|
+
(0, import_sequelize_typescript4.Column)({
|
|
387
|
+
primaryKey: true,
|
|
388
|
+
autoIncrement: true,
|
|
389
|
+
type: import_sequelize_typescript4.DataType.INTEGER
|
|
390
|
+
})
|
|
391
|
+
], authRole.prototype, "id", 2);
|
|
392
|
+
__decorateClass([
|
|
393
|
+
(0, import_sequelize_typescript4.Column)({
|
|
394
|
+
type: import_sequelize_typescript4.DataType.STRING(255)
|
|
395
|
+
})
|
|
396
|
+
], authRole.prototype, "name", 2);
|
|
397
|
+
__decorateClass([
|
|
398
|
+
(0, import_sequelize_typescript4.Column)({
|
|
399
|
+
field: "created_by",
|
|
400
|
+
allowNull: true,
|
|
401
|
+
type: import_sequelize_typescript4.DataType.STRING(60)
|
|
402
|
+
})
|
|
403
|
+
], authRole.prototype, "createdBy", 2);
|
|
404
|
+
__decorateClass([
|
|
405
|
+
(0, import_sequelize_typescript4.Column)({
|
|
406
|
+
field: "created_date",
|
|
407
|
+
allowNull: true,
|
|
408
|
+
type: import_sequelize_typescript4.DataType.DATE
|
|
409
|
+
})
|
|
410
|
+
], authRole.prototype, "createdDate", 2);
|
|
411
|
+
__decorateClass([
|
|
412
|
+
(0, import_sequelize_typescript4.Column)({
|
|
413
|
+
field: "updated_by",
|
|
414
|
+
allowNull: true,
|
|
415
|
+
type: import_sequelize_typescript4.DataType.STRING(60)
|
|
416
|
+
})
|
|
417
|
+
], authRole.prototype, "updatedBy", 2);
|
|
418
|
+
__decorateClass([
|
|
419
|
+
(0, import_sequelize_typescript4.Column)({
|
|
420
|
+
field: "updated_date",
|
|
421
|
+
allowNull: true,
|
|
422
|
+
type: import_sequelize_typescript4.DataType.DATE
|
|
423
|
+
})
|
|
424
|
+
], authRole.prototype, "updatedDate", 2);
|
|
425
|
+
__decorateClass([
|
|
426
|
+
(0, import_sequelize_typescript4.HasMany)(() => authAssignment, {
|
|
427
|
+
sourceKey: "id"
|
|
428
|
+
})
|
|
429
|
+
], authRole.prototype, "authAssignments", 2);
|
|
430
|
+
authRole = __decorateClass([
|
|
431
|
+
(0, import_sequelize_typescript4.Table)({
|
|
432
|
+
tableName: "auth_role",
|
|
433
|
+
timestamps: false
|
|
434
|
+
})
|
|
435
|
+
], authRole);
|
|
436
|
+
|
|
437
|
+
// src/databases/models/authAssignment.ts
|
|
438
|
+
var authAssignment = class extends import_sequelize_typescript5.Model {
|
|
439
|
+
};
|
|
440
|
+
__decorateClass([
|
|
441
|
+
(0, import_sequelize_typescript5.ForeignKey)(() => authRole),
|
|
442
|
+
(0, import_sequelize_typescript5.Column)({
|
|
443
|
+
field: "role_id",
|
|
444
|
+
primaryKey: true,
|
|
445
|
+
type: import_sequelize_typescript5.DataType.INTEGER
|
|
446
|
+
})
|
|
447
|
+
], authAssignment.prototype, "roleId", 2);
|
|
448
|
+
__decorateClass([
|
|
449
|
+
(0, import_sequelize_typescript5.ForeignKey)(() => users),
|
|
450
|
+
(0, import_sequelize_typescript5.Column)({
|
|
451
|
+
field: "user_id",
|
|
452
|
+
primaryKey: true,
|
|
453
|
+
type: import_sequelize_typescript5.DataType.INTEGER
|
|
454
|
+
})
|
|
455
|
+
], authAssignment.prototype, "userId", 2);
|
|
456
|
+
__decorateClass([
|
|
457
|
+
(0, import_sequelize_typescript5.Column)({
|
|
458
|
+
field: "created_by",
|
|
459
|
+
allowNull: true,
|
|
460
|
+
type: import_sequelize_typescript5.DataType.STRING(60)
|
|
461
|
+
})
|
|
462
|
+
], authAssignment.prototype, "createdBy", 2);
|
|
463
|
+
__decorateClass([
|
|
464
|
+
(0, import_sequelize_typescript5.Column)({
|
|
465
|
+
field: "created_date",
|
|
466
|
+
allowNull: true,
|
|
467
|
+
type: import_sequelize_typescript5.DataType.DATE
|
|
468
|
+
})
|
|
469
|
+
], authAssignment.prototype, "createdDate", 2);
|
|
470
|
+
__decorateClass([
|
|
471
|
+
(0, import_sequelize_typescript5.Column)({
|
|
472
|
+
field: "updated_by",
|
|
473
|
+
allowNull: true,
|
|
474
|
+
type: import_sequelize_typescript5.DataType.STRING(60)
|
|
475
|
+
})
|
|
476
|
+
], authAssignment.prototype, "updatedBy", 2);
|
|
477
|
+
__decorateClass([
|
|
478
|
+
(0, import_sequelize_typescript5.Column)({
|
|
479
|
+
field: "updated_date",
|
|
480
|
+
allowNull: true,
|
|
481
|
+
type: import_sequelize_typescript5.DataType.DATE
|
|
482
|
+
})
|
|
78
483
|
], authAssignment.prototype, "updatedDate", 2);
|
|
484
|
+
__decorateClass([
|
|
485
|
+
(0, import_sequelize_typescript5.BelongsTo)(() => users)
|
|
486
|
+
], authAssignment.prototype, "user", 2);
|
|
487
|
+
__decorateClass([
|
|
488
|
+
(0, import_sequelize_typescript5.BelongsTo)(() => authRole)
|
|
489
|
+
], authAssignment.prototype, "authRole", 2);
|
|
79
490
|
authAssignment = __decorateClass([
|
|
80
|
-
(0,
|
|
491
|
+
(0, import_sequelize_typescript5.Table)({
|
|
81
492
|
tableName: "auth_assignment",
|
|
82
493
|
timestamps: false
|
|
83
494
|
})
|