@admc-go-th/admc-library 1.0.26 → 1.0.28

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.
Files changed (53) hide show
  1. package/{authAssignment-C26INzWS.d.ts → authAssignment-BUrX9fXX.d.ts} +14 -5
  2. package/{authItem-Da_KN9rn.d.ts → authItem-CLwL7pX_.d.ts} +3 -1
  3. package/databases/schema/authItem.ts +92 -92
  4. package/databases/schema/authItemChild.ts +33 -33
  5. package/databases/schema/files.ts +18 -2
  6. package/databases/schema/index.ts +22 -17
  7. package/databases/schema/mdBanner.ts +104 -0
  8. package/databases/schema/mdContent.ts +21 -6
  9. package/databases/schema/mdContentGroup.ts +22 -0
  10. package/databases/schema/mdDocumentPdf.ts +112 -0
  11. package/databases/schema/mdDownload.ts +112 -0
  12. package/databases/schema/mdFaq.ts +104 -0
  13. package/databases/schema/mdFaqGroup.ts +89 -0
  14. package/databases/schema/mdSetting.ts +97 -0
  15. package/databases/schema/menu.ts +120 -120
  16. package/databases/schema/msModule.ts +79 -72
  17. package/databases/schema/users.ts +214 -217
  18. package/databases/schema/usersRoleV.ts +1 -1
  19. package/databases/tables/authAssignment.d.ts +1 -1
  20. package/databases/tables/authAssignment.js +34 -4
  21. package/databases/tables/authItem.d.ts +1 -1
  22. package/databases/tables/authItem.js +8 -2
  23. package/databases/tables/authItemChild.d.ts +1 -1
  24. package/databases/tables/authItemChild.js +8 -2
  25. package/databases/tables/authRole.d.ts +1 -1
  26. package/databases/tables/authRole.js +34 -4
  27. package/databases/tables/files.d.ts +6 -2
  28. package/databases/tables/files.js +14 -0
  29. package/databases/tables/index.d.ts +8 -3
  30. package/databases/tables/index.js +734 -185
  31. package/databases/tables/mdBanner.d.ts +32 -0
  32. package/databases/tables/mdBanner.js +124 -0
  33. package/databases/tables/mdContent.d.ts +1 -1
  34. package/databases/tables/mdContent.js +34 -4
  35. package/databases/tables/mdContentGroup.d.ts +1 -1
  36. package/databases/tables/mdContentGroup.js +34 -4
  37. package/databases/tables/mdDocumentPdf.d.ts +34 -0
  38. package/databases/tables/mdDocumentPdf.js +131 -0
  39. package/databases/tables/mdDownload.d.ts +34 -0
  40. package/databases/tables/mdDownload.js +131 -0
  41. package/databases/tables/mdFaq.d.ts +32 -0
  42. package/databases/tables/mdFaq.js +124 -0
  43. package/databases/tables/mdFaqGroup.d.ts +28 -0
  44. package/databases/tables/mdFaqGroup.js +111 -0
  45. package/databases/tables/mdSetting.d.ts +30 -0
  46. package/databases/tables/mdSetting.js +118 -0
  47. package/databases/tables/menu.d.ts +1 -1
  48. package/databases/tables/menu.js +8 -2
  49. package/databases/tables/msModule.d.ts +1 -1
  50. package/databases/tables/msModule.js +8 -2
  51. package/databases/tables/users.d.ts +1 -1
  52. package/databases/tables/users.js +34 -4
  53. package/package.json +1 -1
@@ -1,218 +1,215 @@
1
- import {
2
- Model, Table, Column, DataType, Index, Sequelize, ForeignKey, HasMany
3
- } from "sequelize-typescript";
4
- import { authAssignment } from "./authAssignment";
5
- import { mdContent } from "./mdContent";
6
-
7
- export interface usersAttributes {
8
- id?: number;
9
- uuid: string;
10
- username: string;
11
- passwordHash?: string;
12
- passwordResetToken?: string;
13
- verificationToken?: string;
14
- email?: string;
15
- authKey?: string;
16
- secretKey?: string;
17
- accessToken?: string;
18
- userLevel?: number;
19
- userAuthen?: string;
20
- userType?: number;
21
- prefix?: string;
22
- firstName?: string;
23
- lastName?: string;
24
- phone?: string;
25
- status?: number;
26
- is_2fa?: number;
27
- createdBy?: string;
28
- createdDate?: Date;
29
- updatedBy?: string;
30
- updatedDate?: Date;
31
- address?: string;
32
- other?: string;
33
- roleSite?: string[];
34
- }
35
-
36
- @Table({
37
- tableName: "users",
38
- timestamps: false
39
- })
40
- export class users extends Model<usersAttributes, usersAttributes> implements usersAttributes {
41
-
42
- @Column({
43
- primaryKey: true,
44
- autoIncrement: true,
45
- type: DataType.INTEGER
46
- })
47
- declare id?: number;
48
-
49
- @Column({
50
- type: DataType.STRING(60)
51
- })
52
- declare uuid: string;
53
-
54
- @Column({
55
- type: DataType.STRING(100)
56
- })
57
- declare username: string;
58
-
59
- @Column({
60
- field: "password_hash",
61
- allowNull: true,
62
- type: DataType.STRING(255)
63
- })
64
- declare passwordHash?: string;
65
-
66
- @Column({
67
- field: "password_reset_token",
68
- allowNull: true,
69
- type: DataType.STRING(255)
70
- })
71
- declare passwordResetToken?: string;
72
-
73
- @Column({
74
- field: "verification_token",
75
- allowNull: true,
76
- type: DataType.STRING(255)
77
- })
78
- declare verificationToken?: string;
79
-
80
- @Column({
81
- allowNull: true,
82
- type: DataType.STRING(255)
83
- })
84
- declare email?: string;
85
-
86
- @Column({
87
- field: "auth_key",
88
- allowNull: true,
89
- type: DataType.STRING(32)
90
- })
91
- declare authKey?: string;
92
-
93
- @Column({
94
- field: "secret_key",
95
- allowNull: true,
96
- type: DataType.STRING(255)
97
- })
98
- declare secretKey?: string;
99
-
100
- @Column({
101
- field: "access_token",
102
- allowNull: true,
103
- type: DataType.STRING
104
- })
105
- declare accessToken?: string;
106
-
107
- @Column({
108
- field: "user_level",
109
- allowNull: true,
110
- type: DataType.INTEGER
111
- })
112
- declare userLevel?: number;
113
-
114
- @Column({
115
- field: "user_authen",
116
- allowNull: true,
117
- type: DataType.STRING(64)
118
- })
119
- declare userAuthen?: string;
120
-
121
- @Column({
122
- field: "user_type",
123
- allowNull: true,
124
- type: DataType.INTEGER
125
- })
126
- declare userType?: number;
127
-
128
- @Column({
129
- allowNull: true,
130
- type: DataType.STRING(10)
131
- })
132
- declare prefix?: string;
133
-
134
- @Column({
135
- field: "first_name",
136
- allowNull: true,
137
- type: DataType.STRING(100)
138
- })
139
- declare firstName?: string;
140
-
141
- @Column({
142
- field: "last_name",
143
- allowNull: true,
144
- type: DataType.STRING(100)
145
- })
146
- declare lastName?: string;
147
-
148
- @Column({
149
- allowNull: true,
150
- type: DataType.STRING(20)
151
- })
152
- declare phone?: string;
153
-
154
- @Column({
155
- allowNull: true,
156
- type: DataType.SMALLINT
157
- })
158
- declare status?: number;
159
-
160
- @Column({
161
- allowNull: true,
162
- type: DataType.INTEGER
163
- })
164
- declare is_2fa?: number;
165
-
166
- @Column({
167
- field: "created_by",
168
- allowNull: true,
169
- type: DataType.STRING(60)
170
- })
171
- declare createdBy?: string;
172
-
173
- @Column({
174
- field: "created_date",
175
- allowNull: true,
176
- type: DataType.DATE
177
- })
178
- declare createdDate?: Date;
179
-
180
- @Column({
181
- field: "updated_by",
182
- allowNull: true,
183
- type: DataType.STRING(60)
184
- })
185
- declare updatedBy?: string;
186
-
187
- @Column({
188
- field: "updated_date",
189
- allowNull: true,
190
- type: DataType.DATE
191
- })
192
- declare updatedDate?: Date;
193
-
194
- @Column({
195
- field: "address",
196
- allowNull: true,
197
- type: DataType.STRING(255)
198
- })
199
- declare address?: string;
200
-
201
- @Column({
202
- field: "other",
203
- allowNull: true,
204
- type: DataType.STRING(255)
205
- })
206
- declare other?: string;
207
-
208
- @HasMany(() => authAssignment, {
209
- sourceKey: "id"
210
- })
211
- declare authAssignments?: authAssignment[];
212
-
213
- @HasMany(() => mdContent, {
214
- sourceKey: "id"
215
- })
216
- declare mdContents?: mdContent[];
217
-
1
+ import {
2
+ Model, Table, Column, DataType, Index, Sequelize, ForeignKey, HasMany
3
+ } from "sequelize-typescript";
4
+ import { authAssignment } from "./authAssignment";
5
+ import { mdContent } from "./mdContent";
6
+
7
+ export interface usersAttributes {
8
+ id?: number;
9
+ uuid: string;
10
+ username: string;
11
+ passwordHash?: string;
12
+ passwordResetToken?: string;
13
+ verificationToken?: string;
14
+ email?: string;
15
+ authKey?: string;
16
+ secretKey?: string;
17
+ accessToken?: string;
18
+ userLevel?: number;
19
+ userAuthen?: string;
20
+ userType?: number;
21
+ prefix?: string;
22
+ firstName?: string;
23
+ lastName?: string;
24
+ phone?: string;
25
+ status?: number;
26
+ is_2fa?: number;
27
+ createdBy?: string;
28
+ createdDate?: Date;
29
+ updatedBy?: string;
30
+ updatedDate?: Date;
31
+ address?: string;
32
+ other?: string;
33
+ }
34
+
35
+ @Table({
36
+ tableName: "users",
37
+ timestamps: false
38
+ })
39
+ export class users extends Model<usersAttributes, usersAttributes> implements usersAttributes {
40
+
41
+ @Column({
42
+ primaryKey: true,
43
+ autoIncrement: true,
44
+ type: DataType.INTEGER
45
+ })
46
+ declare id?: number;
47
+
48
+ @Column({
49
+ type: DataType.STRING(60)
50
+ })
51
+ declare uuid: string;
52
+
53
+ @Column({
54
+ type: DataType.STRING(100)
55
+ })
56
+ declare username: string;
57
+
58
+ @Column({
59
+ field: "password_hash",
60
+ allowNull: true,
61
+ type: DataType.STRING(255)
62
+ })
63
+ declare passwordHash?: string;
64
+
65
+ @Column({
66
+ field: "password_reset_token",
67
+ allowNull: true,
68
+ type: DataType.STRING(255)
69
+ })
70
+ declare passwordResetToken?: string;
71
+
72
+ @Column({
73
+ field: "verification_token",
74
+ allowNull: true,
75
+ type: DataType.STRING(255)
76
+ })
77
+ declare verificationToken?: string;
78
+
79
+ @Column({
80
+ allowNull: true,
81
+ type: DataType.STRING(255)
82
+ })
83
+ declare email?: string;
84
+
85
+ @Column({
86
+ field: "auth_key",
87
+ allowNull: true,
88
+ type: DataType.STRING(32)
89
+ })
90
+ declare authKey?: string;
91
+
92
+ @Column({
93
+ field: "secret_key",
94
+ allowNull: true,
95
+ type: DataType.STRING(255)
96
+ })
97
+ declare secretKey?: string;
98
+
99
+ @Column({
100
+ field: "access_token",
101
+ allowNull: true,
102
+ type: DataType.STRING
103
+ })
104
+ declare accessToken?: string;
105
+
106
+ @Column({
107
+ field: "user_level",
108
+ allowNull: true,
109
+ type: DataType.INTEGER
110
+ })
111
+ declare userLevel?: number;
112
+
113
+ @Column({
114
+ field: "user_authen",
115
+ allowNull: true,
116
+ type: DataType.STRING(64)
117
+ })
118
+ declare userAuthen?: string;
119
+
120
+ @Column({
121
+ field: "user_type",
122
+ allowNull: true,
123
+ type: DataType.INTEGER
124
+ })
125
+ declare userType?: number;
126
+
127
+ @Column({
128
+ allowNull: true,
129
+ type: DataType.STRING(10)
130
+ })
131
+ declare prefix?: string;
132
+
133
+ @Column({
134
+ field: "first_name",
135
+ allowNull: true,
136
+ type: DataType.STRING(100)
137
+ })
138
+ declare firstName?: string;
139
+
140
+ @Column({
141
+ field: "last_name",
142
+ allowNull: true,
143
+ type: DataType.STRING(100)
144
+ })
145
+ declare lastName?: string;
146
+
147
+ @Column({
148
+ allowNull: true,
149
+ type: DataType.STRING(20)
150
+ })
151
+ declare phone?: string;
152
+
153
+ @Column({
154
+ allowNull: true,
155
+ type: DataType.SMALLINT
156
+ })
157
+ declare status?: number;
158
+
159
+ @Column({
160
+ allowNull: true,
161
+ type: DataType.INTEGER
162
+ })
163
+ declare is_2fa?: number;
164
+
165
+ @Column({
166
+ field: "created_by",
167
+ allowNull: true,
168
+ type: DataType.STRING(60)
169
+ })
170
+ declare createdBy?: string;
171
+
172
+ @Column({
173
+ field: "created_date",
174
+ allowNull: true,
175
+ type: DataType.DATE
176
+ })
177
+ declare createdDate?: Date;
178
+
179
+ @Column({
180
+ field: "updated_by",
181
+ allowNull: true,
182
+ type: DataType.STRING(60)
183
+ })
184
+ declare updatedBy?: string;
185
+
186
+ @Column({
187
+ field: "updated_date",
188
+ allowNull: true,
189
+ type: DataType.DATE
190
+ })
191
+ declare updatedDate?: Date;
192
+
193
+ @Column({
194
+ allowNull: true,
195
+ type: DataType.STRING(255)
196
+ })
197
+ declare address?: string;
198
+
199
+ @Column({
200
+ allowNull: true,
201
+ type: DataType.STRING(255)
202
+ })
203
+ declare other?: string;
204
+
205
+ @HasMany(() => authAssignment, {
206
+ sourceKey: "id"
207
+ })
208
+ declare authAssignments?: authAssignment[];
209
+
210
+ @HasMany(() => mdContent, {
211
+ sourceKey: "id"
212
+ })
213
+ declare mdContents?: mdContent[];
214
+
218
215
  }
@@ -44,5 +44,5 @@ export class usersRoleV extends Model<usersRoleVAttributes, usersRoleVAttributes
44
44
  allowNull: true,
45
45
  })
46
46
  declare websiteFr: string;
47
-
47
+
48
48
  }
@@ -1,2 +1,2 @@
1
1
  import 'sequelize-typescript';
2
- export { b as authAssignment, a as authAssignmentAttributes } from '../../authAssignment-C26INzWS.js';
2
+ export { b as authAssignment, a as authAssignmentAttributes } from '../../authAssignment-BUrX9fXX.js';
@@ -50,6 +50,19 @@ __decorateClass([
50
50
  type: import_sequelize_typescript.DataType.INTEGER
51
51
  })
52
52
  ], mdContentGroup.prototype, "id", 2);
53
+ __decorateClass([
54
+ (0, import_sequelize_typescript.Column)({
55
+ allowNull: true,
56
+ type: import_sequelize_typescript.DataType.STRING(60)
57
+ })
58
+ ], mdContentGroup.prototype, "uuid", 2);
59
+ __decorateClass([
60
+ (0, import_sequelize_typescript.Column)({
61
+ field: "key_name",
62
+ allowNull: true,
63
+ type: import_sequelize_typescript.DataType.STRING(100)
64
+ })
65
+ ], mdContentGroup.prototype, "keyName", 2);
53
66
  __decorateClass([
54
67
  (0, import_sequelize_typescript.Column)({
55
68
  type: import_sequelize_typescript.DataType.STRING(255)
@@ -61,6 +74,12 @@ __decorateClass([
61
74
  type: import_sequelize_typescript.DataType.STRING(255)
62
75
  })
63
76
  ], mdContentGroup.prototype, "description", 2);
77
+ __decorateClass([
78
+ (0, import_sequelize_typescript.Column)({
79
+ allowNull: true,
80
+ type: import_sequelize_typescript.DataType.INTEGER
81
+ })
82
+ ], mdContentGroup.prototype, "status", 2);
64
83
  __decorateClass([
65
84
  (0, import_sequelize_typescript.Column)({
66
85
  field: "created_by",
@@ -113,9 +132,16 @@ __decorateClass([
113
132
  ], mdContent.prototype, "id", 2);
114
133
  __decorateClass([
115
134
  (0, import_sequelize_typescript2.Column)({
116
- type: import_sequelize_typescript2.DataType.INTEGER
135
+ type: import_sequelize_typescript2.DataType.STRING(60)
117
136
  })
118
137
  ], mdContent.prototype, "uuid", 2);
138
+ __decorateClass([
139
+ (0, import_sequelize_typescript2.Column)({
140
+ field: "key_name",
141
+ allowNull: true,
142
+ type: import_sequelize_typescript2.DataType.STRING(100)
143
+ })
144
+ ], mdContent.prototype, "keyName", 2);
119
145
  __decorateClass([
120
146
  (0, import_sequelize_typescript2.ForeignKey)(() => mdContentGroup),
121
147
  (0, import_sequelize_typescript2.Column)({
@@ -168,7 +194,7 @@ __decorateClass([
168
194
  (0, import_sequelize_typescript2.Column)({
169
195
  field: "image_cover",
170
196
  allowNull: true,
171
- type: import_sequelize_typescript2.DataType.STRING(255)
197
+ type: import_sequelize_typescript2.DataType.JSON
172
198
  })
173
199
  ], mdContent.prototype, "imageCover", 2);
174
200
  __decorateClass([
@@ -178,6 +204,12 @@ __decorateClass([
178
204
  type: import_sequelize_typescript2.DataType.JSON
179
205
  })
180
206
  ], mdContent.prototype, "imageGallery", 2);
207
+ __decorateClass([
208
+ (0, import_sequelize_typescript2.Column)({
209
+ allowNull: true,
210
+ type: import_sequelize_typescript2.DataType.INTEGER
211
+ })
212
+ ], mdContent.prototype, "sort", 2);
181
213
  __decorateClass([
182
214
  (0, import_sequelize_typescript2.Column)({
183
215
  allowNull: true,
@@ -382,14 +414,12 @@ __decorateClass([
382
414
  ], users.prototype, "updatedDate", 2);
383
415
  __decorateClass([
384
416
  (0, import_sequelize_typescript3.Column)({
385
- field: "address",
386
417
  allowNull: true,
387
418
  type: import_sequelize_typescript3.DataType.STRING(255)
388
419
  })
389
420
  ], users.prototype, "address", 2);
390
421
  __decorateClass([
391
422
  (0, import_sequelize_typescript3.Column)({
392
- field: "other",
393
423
  allowNull: true,
394
424
  type: import_sequelize_typescript3.DataType.STRING(255)
395
425
  })
@@ -1,2 +1,2 @@
1
1
  import 'sequelize-typescript';
2
- export { b as authItem, a as authItemAttributes } from '../../authItem-Da_KN9rn.js';
2
+ export { b as authItem, a as authItemAttributes } from '../../authItem-CLwL7pX_.js';
@@ -47,6 +47,12 @@ __decorateClass([
47
47
  type: import_sequelize_typescript.DataType.INTEGER
48
48
  })
49
49
  ], msModule.prototype, "id", 2);
50
+ __decorateClass([
51
+ (0, import_sequelize_typescript.Column)({
52
+ allowNull: true,
53
+ type: import_sequelize_typescript.DataType.STRING(100)
54
+ })
55
+ ], msModule.prototype, "key", 2);
50
56
  __decorateClass([
51
57
  (0, import_sequelize_typescript.Column)({
52
58
  type: import_sequelize_typescript.DataType.STRING(100)
@@ -152,13 +158,13 @@ __decorateClass([
152
158
  allowNull: true,
153
159
  type: import_sequelize_typescript2.DataType.INTEGER
154
160
  })
155
- ], menu.prototype, "status", 2);
161
+ ], menu.prototype, "sort", 2);
156
162
  __decorateClass([
157
163
  (0, import_sequelize_typescript2.Column)({
158
164
  allowNull: true,
159
165
  type: import_sequelize_typescript2.DataType.INTEGER
160
166
  })
161
- ], menu.prototype, "sort", 2);
167
+ ], menu.prototype, "status", 2);
162
168
  __decorateClass([
163
169
  (0, import_sequelize_typescript2.Column)({
164
170
  field: "created_by",
@@ -1,2 +1,2 @@
1
1
  import 'sequelize-typescript';
2
- export { d as authItemChild, c as authItemChildAttributes } from '../../authItem-Da_KN9rn.js';
2
+ export { d as authItemChild, c as authItemChildAttributes } from '../../authItem-CLwL7pX_.js';
@@ -50,6 +50,12 @@ __decorateClass([
50
50
  type: import_sequelize_typescript.DataType.INTEGER
51
51
  })
52
52
  ], msModule.prototype, "id", 2);
53
+ __decorateClass([
54
+ (0, import_sequelize_typescript.Column)({
55
+ allowNull: true,
56
+ type: import_sequelize_typescript.DataType.STRING(100)
57
+ })
58
+ ], msModule.prototype, "key", 2);
53
59
  __decorateClass([
54
60
  (0, import_sequelize_typescript.Column)({
55
61
  type: import_sequelize_typescript.DataType.STRING(100)
@@ -155,13 +161,13 @@ __decorateClass([
155
161
  allowNull: true,
156
162
  type: import_sequelize_typescript2.DataType.INTEGER
157
163
  })
158
- ], menu.prototype, "status", 2);
164
+ ], menu.prototype, "sort", 2);
159
165
  __decorateClass([
160
166
  (0, import_sequelize_typescript2.Column)({
161
167
  allowNull: true,
162
168
  type: import_sequelize_typescript2.DataType.INTEGER
163
169
  })
164
- ], menu.prototype, "sort", 2);
170
+ ], menu.prototype, "status", 2);
165
171
  __decorateClass([
166
172
  (0, import_sequelize_typescript2.Column)({
167
173
  field: "created_by",
@@ -1,2 +1,2 @@
1
1
  import 'sequelize-typescript';
2
- export { d as authRole, c as authRoleAttributes } from '../../authAssignment-C26INzWS.js';
2
+ export { d as authRole, c as authRoleAttributes } from '../../authAssignment-BUrX9fXX.js';