@admc-go-th/admc-library 1.0.17 → 1.0.19

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 (35) hide show
  1. package/{authAssignment-DSQ-klvX.d.ts → authAssignment-zERupLM6.d.ts} +2 -0
  2. package/{authItem-DzYA8ziY.d.ts → authItem-Daiko8gP.d.ts} +7 -1
  3. package/databases/models/authRole.ts +14 -0
  4. package/databases/models/authRoleChlid.ts +23 -0
  5. package/databases/models/index.ts +4 -2
  6. package/databases/schema/authItem.ts +3 -4
  7. package/databases/schema/authItemChild.ts +0 -1
  8. package/databases/schema/authRole.ts +6 -0
  9. package/databases/schema/menu.ts +14 -0
  10. package/databases/schema/msModule.ts +7 -0
  11. package/databases/tables/authAssignment.d.ts +1 -1
  12. package/databases/tables/authAssignment.js +5 -0
  13. package/databases/tables/authItem.d.ts +1 -1
  14. package/databases/tables/authItem.js +20 -2
  15. package/databases/tables/authItemChild.d.ts +1 -1
  16. package/databases/tables/authItemChild.js +20 -2
  17. package/databases/tables/authRole.d.ts +1 -1
  18. package/databases/tables/authRole.js +5 -0
  19. package/databases/tables/index.d.ts +2 -2
  20. package/databases/tables/index.js +25 -2
  21. package/databases/tables/mdContent.d.ts +1 -1
  22. package/databases/tables/mdContent.js +5 -0
  23. package/databases/tables/mdContentGroup.d.ts +1 -1
  24. package/databases/tables/mdContentGroup.js +5 -0
  25. package/databases/tables/menu.d.ts +1 -1
  26. package/databases/tables/menu.js +20 -2
  27. package/databases/tables/msModule.d.ts +1 -1
  28. package/databases/tables/msModule.js +20 -2
  29. package/databases/tables/users.d.ts +1 -1
  30. package/databases/tables/users.js +5 -0
  31. package/package.json +1 -1
  32. package/types/jwt/enum/status.d.ts +7 -0
  33. package/types/jwt/enum/status.js +35 -0
  34. package/types/jwt/enum/user-role.d.ts +6 -0
  35. package/types/jwt/enum/user-role.js +34 -0
@@ -108,6 +108,7 @@ declare class users extends Model<usersAttributes, usersAttributes> implements u
108
108
 
109
109
  interface authRoleAttributes {
110
110
  id?: number;
111
+ uuid: string;
111
112
  name: string;
112
113
  display?: string;
113
114
  status?: number;
@@ -118,6 +119,7 @@ interface authRoleAttributes {
118
119
  }
119
120
  declare class authRole extends Model<authRoleAttributes, authRoleAttributes> implements authRoleAttributes {
120
121
  id?: number;
122
+ uuid: string;
121
123
  name: string;
122
124
  display?: string;
123
125
  status?: number;
@@ -3,6 +3,7 @@ import { Model } from 'sequelize-typescript';
3
3
  interface msModuleAttributes {
4
4
  id?: number;
5
5
  name: string;
6
+ status?: number;
6
7
  createdBy?: string;
7
8
  createdDate?: Date;
8
9
  updatedBy?: string;
@@ -11,6 +12,7 @@ interface msModuleAttributes {
11
12
  declare class msModule extends Model<msModuleAttributes, msModuleAttributes> implements msModuleAttributes {
12
13
  id?: number;
13
14
  name: string;
15
+ status?: number;
14
16
  createdBy?: string;
15
17
  createdDate?: Date;
16
18
  updatedBy?: string;
@@ -22,9 +24,11 @@ interface menuAttributes {
22
24
  id?: number;
23
25
  uuid: string;
24
26
  keyName?: string;
27
+ icon?: string;
25
28
  display?: string;
26
29
  description?: string;
27
30
  moduleId?: number;
31
+ status?: number;
28
32
  createdBy?: string;
29
33
  createdDate?: Date;
30
34
  updatedBy?: string;
@@ -34,9 +38,11 @@ declare class menu extends Model<menuAttributes, menuAttributes> implements menu
34
38
  id?: number;
35
39
  uuid: string;
36
40
  keyName?: string;
41
+ icon?: string;
37
42
  display?: string;
38
43
  description?: string;
39
44
  moduleId?: number;
45
+ status?: number;
40
46
  createdBy?: string;
41
47
  createdDate?: Date;
42
48
  updatedBy?: string;
@@ -76,7 +82,7 @@ declare class authItem extends Model<authItemAttributes, authItemAttributes> imp
76
82
  createdDate?: Date;
77
83
  updatedBy?: string;
78
84
  updatedDate?: Date;
79
- menus?: menu[];
85
+ menu?: menu;
80
86
  authItemChildren?: authItemChild[];
81
87
  }
82
88
 
@@ -0,0 +1,14 @@
1
+ import { FindOptions } from "sequelize/types/model";
2
+ import { authRole as AuthRole } from "../tables";
3
+
4
+ export class authRole extends AuthRole {
5
+ static async findByUUID(
6
+ uuid: string,
7
+ options?: Omit<FindOptions, 'where'>
8
+ ): Promise<AuthRole | null> {
9
+ return await this.findOne({
10
+ where: { uuid },
11
+ ...options,
12
+ });
13
+ }
14
+ }
@@ -0,0 +1,23 @@
1
+ import { FindOptions } from "sequelize/types/model";
2
+ import { authRoleChild as AuthRoleChild } from "../tables";
3
+
4
+ export class authRoleChild extends AuthRoleChild {
5
+ static async findByRoleId(
6
+ roleId: number,
7
+ options?: Omit<FindOptions, 'where'>
8
+ ): Promise<AuthRoleChild[]> {
9
+ return await this.findAll({
10
+ where: { roleId },
11
+ ...options,
12
+ });
13
+ }
14
+ static async findByKeyName(
15
+ keyName: string,
16
+ options?: Omit<FindOptions, 'where'>
17
+ ): Promise<AuthRoleChild[]> {
18
+ return await this.findAll({
19
+ where: { keyName },
20
+ ...options,
21
+ });
22
+ }
23
+ }
@@ -1,2 +1,4 @@
1
- export * from "./menu";
2
- export * from "./users";
1
+ export * from "./menu";
2
+ export * from "./users";
3
+ export * from "./authRole";
4
+ export * from "./authRoleChlid";
@@ -1,5 +1,5 @@
1
1
  import {
2
- Model, Table, Column, DataType, Index, Sequelize, ForeignKey, HasMany
2
+ Model, Table, Column, DataType, Index, Sequelize, ForeignKey, HasOne, HasMany
3
3
  } from "sequelize-typescript";
4
4
  import { menu } from "./menu";
5
5
  import { authItemChild } from "./authItemChild";
@@ -80,14 +80,13 @@ export class authItem extends Model<authItemAttributes, authItemAttributes> impl
80
80
  })
81
81
  declare updatedDate?: Date;
82
82
 
83
- @HasMany(() => menu, {
83
+ @HasOne(() => menu, {
84
84
  sourceKey: "keyName"
85
85
  })
86
- declare menus?: menu[];
86
+ declare menu?: menu;
87
87
 
88
88
  @HasMany(() => authItemChild, {
89
89
  sourceKey: "keyName"
90
90
  })
91
91
  declare authItemChildren?: authItemChild[];
92
-
93
92
  }
@@ -30,5 +30,4 @@ export class authItemChild extends Model<authItemChildAttributes, authItemChildA
30
30
 
31
31
  @BelongsTo(() => authItem)
32
32
  declare authItem?: authItem;
33
-
34
33
  }
@@ -5,6 +5,7 @@ import { authAssignment } from "./authAssignment";
5
5
 
6
6
  export interface authRoleAttributes {
7
7
  id?: number;
8
+ uuid: string;
8
9
  name: string;
9
10
  display?: string;
10
11
  status?: number;
@@ -27,6 +28,11 @@ export class authRole extends Model<authRoleAttributes, authRoleAttributes> impl
27
28
  })
28
29
  declare id?: number;
29
30
 
31
+ @Column({
32
+ type: DataType.STRING(60)
33
+ })
34
+ declare uuid: string;
35
+
30
36
  @Column({
31
37
  type: DataType.STRING(100)
32
38
  })
@@ -8,9 +8,11 @@ export interface menuAttributes {
8
8
  id?: number;
9
9
  uuid: string;
10
10
  keyName?: string;
11
+ icon?: string;
11
12
  display?: string;
12
13
  description?: string;
13
14
  moduleId?: number;
15
+ status?: number;
14
16
  createdBy?: string;
15
17
  createdDate?: Date;
16
18
  updatedBy?: string;
@@ -43,6 +45,12 @@ export class menu extends Model<menuAttributes, menuAttributes> implements menuA
43
45
  })
44
46
  declare keyName?: string;
45
47
 
48
+ @Column({
49
+ allowNull: true,
50
+ type: DataType.STRING(255)
51
+ })
52
+ declare icon?: string;
53
+
46
54
  @Column({
47
55
  allowNull: true,
48
56
  type: DataType.STRING(255)
@@ -63,6 +71,12 @@ export class menu extends Model<menuAttributes, menuAttributes> implements menuA
63
71
  })
64
72
  declare moduleId?: number;
65
73
 
74
+ @Column({
75
+ allowNull: true,
76
+ type: DataType.INTEGER
77
+ })
78
+ declare status?: number;
79
+
66
80
  @Column({
67
81
  field: "created_by",
68
82
  allowNull: true,
@@ -6,6 +6,7 @@ import { menu } from "./menu";
6
6
  export interface msModuleAttributes {
7
7
  id?: number;
8
8
  name: string;
9
+ status?: number;
9
10
  createdBy?: string;
10
11
  createdDate?: Date;
11
12
  updatedBy?: string;
@@ -30,6 +31,12 @@ export class msModule extends Model<msModuleAttributes, msModuleAttributes> impl
30
31
  })
31
32
  declare name: string;
32
33
 
34
+ @Column({
35
+ allowNull: true,
36
+ type: DataType.INTEGER
37
+ })
38
+ declare status?: number;
39
+
33
40
  @Column({
34
41
  field: "created_by",
35
42
  allowNull: true,
@@ -1,2 +1,2 @@
1
1
  import 'sequelize-typescript';
2
- export { b as authAssignment, a as authAssignmentAttributes } from '../../authAssignment-DSQ-klvX.js';
2
+ export { b as authAssignment, a as authAssignmentAttributes } from '../../authAssignment-zERupLM6.js';
@@ -389,6 +389,11 @@ __decorateClass([
389
389
  type: import_sequelize_typescript4.DataType.INTEGER
390
390
  })
391
391
  ], authRole.prototype, "id", 2);
392
+ __decorateClass([
393
+ (0, import_sequelize_typescript4.Column)({
394
+ type: import_sequelize_typescript4.DataType.STRING(60)
395
+ })
396
+ ], authRole.prototype, "uuid", 2);
392
397
  __decorateClass([
393
398
  (0, import_sequelize_typescript4.Column)({
394
399
  type: import_sequelize_typescript4.DataType.STRING(100)
@@ -1,2 +1,2 @@
1
1
  import 'sequelize-typescript';
2
- export { b as authItem, a as authItemAttributes } from '../../authItem-DzYA8ziY.js';
2
+ export { b as authItem, a as authItemAttributes } from '../../authItem-Daiko8gP.js';
@@ -52,6 +52,12 @@ __decorateClass([
52
52
  type: import_sequelize_typescript.DataType.STRING(100)
53
53
  })
54
54
  ], msModule.prototype, "name", 2);
55
+ __decorateClass([
56
+ (0, import_sequelize_typescript.Column)({
57
+ allowNull: true,
58
+ type: import_sequelize_typescript.DataType.INTEGER
59
+ })
60
+ ], msModule.prototype, "status", 2);
55
61
  __decorateClass([
56
62
  (0, import_sequelize_typescript.Column)({
57
63
  field: "created_by",
@@ -115,6 +121,12 @@ __decorateClass([
115
121
  type: import_sequelize_typescript2.DataType.STRING(100)
116
122
  })
117
123
  ], menu.prototype, "keyName", 2);
124
+ __decorateClass([
125
+ (0, import_sequelize_typescript2.Column)({
126
+ allowNull: true,
127
+ type: import_sequelize_typescript2.DataType.STRING(255)
128
+ })
129
+ ], menu.prototype, "icon", 2);
118
130
  __decorateClass([
119
131
  (0, import_sequelize_typescript2.Column)({
120
132
  allowNull: true,
@@ -135,6 +147,12 @@ __decorateClass([
135
147
  type: import_sequelize_typescript2.DataType.INTEGER
136
148
  })
137
149
  ], menu.prototype, "moduleId", 2);
150
+ __decorateClass([
151
+ (0, import_sequelize_typescript2.Column)({
152
+ allowNull: true,
153
+ type: import_sequelize_typescript2.DataType.INTEGER
154
+ })
155
+ ], menu.prototype, "status", 2);
138
156
  __decorateClass([
139
157
  (0, import_sequelize_typescript2.Column)({
140
158
  field: "created_by",
@@ -266,10 +284,10 @@ __decorateClass([
266
284
  })
267
285
  ], authItem.prototype, "updatedDate", 2);
268
286
  __decorateClass([
269
- (0, import_sequelize_typescript4.HasMany)(() => menu, {
287
+ (0, import_sequelize_typescript4.HasOne)(() => menu, {
270
288
  sourceKey: "keyName"
271
289
  })
272
- ], authItem.prototype, "menus", 2);
290
+ ], authItem.prototype, "menu", 2);
273
291
  __decorateClass([
274
292
  (0, import_sequelize_typescript4.HasMany)(() => authItemChild, {
275
293
  sourceKey: "keyName"
@@ -1,2 +1,2 @@
1
1
  import 'sequelize-typescript';
2
- export { d as authItemChild, c as authItemChildAttributes } from '../../authItem-DzYA8ziY.js';
2
+ export { d as authItemChild, c as authItemChildAttributes } from '../../authItem-Daiko8gP.js';
@@ -55,6 +55,12 @@ __decorateClass([
55
55
  type: import_sequelize_typescript.DataType.STRING(100)
56
56
  })
57
57
  ], msModule.prototype, "name", 2);
58
+ __decorateClass([
59
+ (0, import_sequelize_typescript.Column)({
60
+ allowNull: true,
61
+ type: import_sequelize_typescript.DataType.INTEGER
62
+ })
63
+ ], msModule.prototype, "status", 2);
58
64
  __decorateClass([
59
65
  (0, import_sequelize_typescript.Column)({
60
66
  field: "created_by",
@@ -118,6 +124,12 @@ __decorateClass([
118
124
  type: import_sequelize_typescript2.DataType.STRING(100)
119
125
  })
120
126
  ], menu.prototype, "keyName", 2);
127
+ __decorateClass([
128
+ (0, import_sequelize_typescript2.Column)({
129
+ allowNull: true,
130
+ type: import_sequelize_typescript2.DataType.STRING(255)
131
+ })
132
+ ], menu.prototype, "icon", 2);
121
133
  __decorateClass([
122
134
  (0, import_sequelize_typescript2.Column)({
123
135
  allowNull: true,
@@ -138,6 +150,12 @@ __decorateClass([
138
150
  type: import_sequelize_typescript2.DataType.INTEGER
139
151
  })
140
152
  ], menu.prototype, "moduleId", 2);
153
+ __decorateClass([
154
+ (0, import_sequelize_typescript2.Column)({
155
+ allowNull: true,
156
+ type: import_sequelize_typescript2.DataType.INTEGER
157
+ })
158
+ ], menu.prototype, "status", 2);
141
159
  __decorateClass([
142
160
  (0, import_sequelize_typescript2.Column)({
143
161
  field: "created_by",
@@ -241,10 +259,10 @@ __decorateClass([
241
259
  })
242
260
  ], authItem.prototype, "updatedDate", 2);
243
261
  __decorateClass([
244
- (0, import_sequelize_typescript3.HasMany)(() => menu, {
262
+ (0, import_sequelize_typescript3.HasOne)(() => menu, {
245
263
  sourceKey: "keyName"
246
264
  })
247
- ], authItem.prototype, "menus", 2);
265
+ ], authItem.prototype, "menu", 2);
248
266
  __decorateClass([
249
267
  (0, import_sequelize_typescript3.HasMany)(() => authItemChild, {
250
268
  sourceKey: "keyName"
@@ -1,2 +1,2 @@
1
1
  import 'sequelize-typescript';
2
- export { d as authRole, c as authRoleAttributes } from '../../authAssignment-DSQ-klvX.js';
2
+ export { d as authRole, c as authRoleAttributes } from '../../authAssignment-zERupLM6.js';
@@ -451,6 +451,11 @@ __decorateClass([
451
451
  type: import_sequelize_typescript5.DataType.INTEGER
452
452
  })
453
453
  ], authRole.prototype, "id", 2);
454
+ __decorateClass([
455
+ (0, import_sequelize_typescript5.Column)({
456
+ type: import_sequelize_typescript5.DataType.STRING(60)
457
+ })
458
+ ], authRole.prototype, "uuid", 2);
454
459
  __decorateClass([
455
460
  (0, import_sequelize_typescript5.Column)({
456
461
  type: import_sequelize_typescript5.DataType.STRING(100)
@@ -1,4 +1,4 @@
1
- export { b as authAssignment, a as authAssignmentAttributes, d as authRole, c as authRoleAttributes, e as mdContent, m as mdContentAttributes, g as mdContentGroup, f as mdContentGroupAttributes, h as users, u as usersAttributes } from '../../authAssignment-DSQ-klvX.js';
2
- export { b as authItem, a as authItemAttributes, d as authItemChild, c as authItemChildAttributes, e as menu, m as menuAttributes, g as msModule, f as msModuleAttributes } from '../../authItem-DzYA8ziY.js';
1
+ export { b as authAssignment, a as authAssignmentAttributes, d as authRole, c as authRoleAttributes, e as mdContent, m as mdContentAttributes, g as mdContentGroup, f as mdContentGroupAttributes, h as users, u as usersAttributes } from '../../authAssignment-zERupLM6.js';
2
+ export { b as authItem, a as authItemAttributes, d as authItemChild, c as authItemChildAttributes, e as menu, m as menuAttributes, g as msModule, f as msModuleAttributes } from '../../authItem-Daiko8gP.js';
3
3
  export { authRoleChild, authRoleChildAttributes } from './authRoleChild.js';
4
4
  import 'sequelize-typescript';
@@ -400,6 +400,11 @@ __decorateClass([
400
400
  type: import_sequelize_typescript4.DataType.INTEGER
401
401
  })
402
402
  ], authRole.prototype, "id", 2);
403
+ __decorateClass([
404
+ (0, import_sequelize_typescript4.Column)({
405
+ type: import_sequelize_typescript4.DataType.STRING(60)
406
+ })
407
+ ], authRole.prototype, "uuid", 2);
403
408
  __decorateClass([
404
409
  (0, import_sequelize_typescript4.Column)({
405
410
  type: import_sequelize_typescript4.DataType.STRING(100)
@@ -539,6 +544,12 @@ __decorateClass([
539
544
  type: import_sequelize_typescript6.DataType.STRING(100)
540
545
  })
541
546
  ], msModule.prototype, "name", 2);
547
+ __decorateClass([
548
+ (0, import_sequelize_typescript6.Column)({
549
+ allowNull: true,
550
+ type: import_sequelize_typescript6.DataType.INTEGER
551
+ })
552
+ ], msModule.prototype, "status", 2);
542
553
  __decorateClass([
543
554
  (0, import_sequelize_typescript6.Column)({
544
555
  field: "created_by",
@@ -602,6 +613,12 @@ __decorateClass([
602
613
  type: import_sequelize_typescript7.DataType.STRING(100)
603
614
  })
604
615
  ], menu.prototype, "keyName", 2);
616
+ __decorateClass([
617
+ (0, import_sequelize_typescript7.Column)({
618
+ allowNull: true,
619
+ type: import_sequelize_typescript7.DataType.STRING(255)
620
+ })
621
+ ], menu.prototype, "icon", 2);
605
622
  __decorateClass([
606
623
  (0, import_sequelize_typescript7.Column)({
607
624
  allowNull: true,
@@ -622,6 +639,12 @@ __decorateClass([
622
639
  type: import_sequelize_typescript7.DataType.INTEGER
623
640
  })
624
641
  ], menu.prototype, "moduleId", 2);
642
+ __decorateClass([
643
+ (0, import_sequelize_typescript7.Column)({
644
+ allowNull: true,
645
+ type: import_sequelize_typescript7.DataType.INTEGER
646
+ })
647
+ ], menu.prototype, "status", 2);
625
648
  __decorateClass([
626
649
  (0, import_sequelize_typescript7.Column)({
627
650
  field: "created_by",
@@ -753,10 +776,10 @@ __decorateClass([
753
776
  })
754
777
  ], authItem.prototype, "updatedDate", 2);
755
778
  __decorateClass([
756
- (0, import_sequelize_typescript9.HasMany)(() => menu, {
779
+ (0, import_sequelize_typescript9.HasOne)(() => menu, {
757
780
  sourceKey: "keyName"
758
781
  })
759
- ], authItem.prototype, "menus", 2);
782
+ ], authItem.prototype, "menu", 2);
760
783
  __decorateClass([
761
784
  (0, import_sequelize_typescript9.HasMany)(() => authItemChild, {
762
785
  sourceKey: "keyName"
@@ -1,2 +1,2 @@
1
1
  import 'sequelize-typescript';
2
- export { e as mdContent, m as mdContentAttributes } from '../../authAssignment-DSQ-klvX.js';
2
+ export { e as mdContent, m as mdContentAttributes } from '../../authAssignment-zERupLM6.js';
@@ -50,6 +50,11 @@ __decorateClass([
50
50
  type: import_sequelize_typescript.DataType.INTEGER
51
51
  })
52
52
  ], authRole.prototype, "id", 2);
53
+ __decorateClass([
54
+ (0, import_sequelize_typescript.Column)({
55
+ type: import_sequelize_typescript.DataType.STRING(60)
56
+ })
57
+ ], authRole.prototype, "uuid", 2);
53
58
  __decorateClass([
54
59
  (0, import_sequelize_typescript.Column)({
55
60
  type: import_sequelize_typescript.DataType.STRING(100)
@@ -1,2 +1,2 @@
1
1
  import 'sequelize-typescript';
2
- export { g as mdContentGroup, f as mdContentGroupAttributes } from '../../authAssignment-DSQ-klvX.js';
2
+ export { g as mdContentGroup, f as mdContentGroupAttributes } from '../../authAssignment-zERupLM6.js';
@@ -53,6 +53,11 @@ __decorateClass([
53
53
  type: import_sequelize_typescript.DataType.INTEGER
54
54
  })
55
55
  ], authRole.prototype, "id", 2);
56
+ __decorateClass([
57
+ (0, import_sequelize_typescript.Column)({
58
+ type: import_sequelize_typescript.DataType.STRING(60)
59
+ })
60
+ ], authRole.prototype, "uuid", 2);
56
61
  __decorateClass([
57
62
  (0, import_sequelize_typescript.Column)({
58
63
  type: import_sequelize_typescript.DataType.STRING(100)
@@ -1,2 +1,2 @@
1
1
  import 'sequelize-typescript';
2
- export { e as menu, m as menuAttributes } from '../../authItem-DzYA8ziY.js';
2
+ export { e as menu, m as menuAttributes } from '../../authItem-Daiko8gP.js';
@@ -49,6 +49,12 @@ __decorateClass([
49
49
  type: import_sequelize_typescript.DataType.STRING(100)
50
50
  })
51
51
  ], msModule.prototype, "name", 2);
52
+ __decorateClass([
53
+ (0, import_sequelize_typescript.Column)({
54
+ allowNull: true,
55
+ type: import_sequelize_typescript.DataType.INTEGER
56
+ })
57
+ ], msModule.prototype, "status", 2);
52
58
  __decorateClass([
53
59
  (0, import_sequelize_typescript.Column)({
54
60
  field: "created_by",
@@ -182,10 +188,10 @@ __decorateClass([
182
188
  })
183
189
  ], authItem.prototype, "updatedDate", 2);
184
190
  __decorateClass([
185
- (0, import_sequelize_typescript3.HasMany)(() => menu, {
191
+ (0, import_sequelize_typescript3.HasOne)(() => menu, {
186
192
  sourceKey: "keyName"
187
193
  })
188
- ], authItem.prototype, "menus", 2);
194
+ ], authItem.prototype, "menu", 2);
189
195
  __decorateClass([
190
196
  (0, import_sequelize_typescript3.HasMany)(() => authItemChild, {
191
197
  sourceKey: "keyName"
@@ -221,6 +227,12 @@ __decorateClass([
221
227
  type: import_sequelize_typescript4.DataType.STRING(100)
222
228
  })
223
229
  ], menu.prototype, "keyName", 2);
230
+ __decorateClass([
231
+ (0, import_sequelize_typescript4.Column)({
232
+ allowNull: true,
233
+ type: import_sequelize_typescript4.DataType.STRING(255)
234
+ })
235
+ ], menu.prototype, "icon", 2);
224
236
  __decorateClass([
225
237
  (0, import_sequelize_typescript4.Column)({
226
238
  allowNull: true,
@@ -241,6 +253,12 @@ __decorateClass([
241
253
  type: import_sequelize_typescript4.DataType.INTEGER
242
254
  })
243
255
  ], menu.prototype, "moduleId", 2);
256
+ __decorateClass([
257
+ (0, import_sequelize_typescript4.Column)({
258
+ allowNull: true,
259
+ type: import_sequelize_typescript4.DataType.INTEGER
260
+ })
261
+ ], menu.prototype, "status", 2);
244
262
  __decorateClass([
245
263
  (0, import_sequelize_typescript4.Column)({
246
264
  field: "created_by",
@@ -1,2 +1,2 @@
1
1
  import 'sequelize-typescript';
2
- export { g as msModule, f as msModuleAttributes } from '../../authItem-DzYA8ziY.js';
2
+ export { g as msModule, f as msModuleAttributes } from '../../authItem-Daiko8gP.js';
@@ -129,10 +129,10 @@ __decorateClass([
129
129
  })
130
130
  ], authItem.prototype, "updatedDate", 2);
131
131
  __decorateClass([
132
- (0, import_sequelize_typescript2.HasMany)(() => menu, {
132
+ (0, import_sequelize_typescript2.HasOne)(() => menu, {
133
133
  sourceKey: "keyName"
134
134
  })
135
- ], authItem.prototype, "menus", 2);
135
+ ], authItem.prototype, "menu", 2);
136
136
  __decorateClass([
137
137
  (0, import_sequelize_typescript2.HasMany)(() => authItemChild, {
138
138
  sourceKey: "keyName"
@@ -168,6 +168,12 @@ __decorateClass([
168
168
  type: import_sequelize_typescript3.DataType.STRING(100)
169
169
  })
170
170
  ], menu.prototype, "keyName", 2);
171
+ __decorateClass([
172
+ (0, import_sequelize_typescript3.Column)({
173
+ allowNull: true,
174
+ type: import_sequelize_typescript3.DataType.STRING(255)
175
+ })
176
+ ], menu.prototype, "icon", 2);
171
177
  __decorateClass([
172
178
  (0, import_sequelize_typescript3.Column)({
173
179
  allowNull: true,
@@ -188,6 +194,12 @@ __decorateClass([
188
194
  type: import_sequelize_typescript3.DataType.INTEGER
189
195
  })
190
196
  ], menu.prototype, "moduleId", 2);
197
+ __decorateClass([
198
+ (0, import_sequelize_typescript3.Column)({
199
+ allowNull: true,
200
+ type: import_sequelize_typescript3.DataType.INTEGER
201
+ })
202
+ ], menu.prototype, "status", 2);
191
203
  __decorateClass([
192
204
  (0, import_sequelize_typescript3.Column)({
193
205
  field: "created_by",
@@ -244,6 +256,12 @@ __decorateClass([
244
256
  type: import_sequelize_typescript4.DataType.STRING(100)
245
257
  })
246
258
  ], msModule.prototype, "name", 2);
259
+ __decorateClass([
260
+ (0, import_sequelize_typescript4.Column)({
261
+ allowNull: true,
262
+ type: import_sequelize_typescript4.DataType.INTEGER
263
+ })
264
+ ], msModule.prototype, "status", 2);
247
265
  __decorateClass([
248
266
  (0, import_sequelize_typescript4.Column)({
249
267
  field: "created_by",
@@ -1,2 +1,2 @@
1
1
  import 'sequelize-typescript';
2
- export { h as users, u as usersAttributes } from '../../authAssignment-DSQ-klvX.js';
2
+ export { h as users, u as usersAttributes } from '../../authAssignment-zERupLM6.js';
@@ -47,6 +47,11 @@ __decorateClass([
47
47
  type: import_sequelize_typescript.DataType.INTEGER
48
48
  })
49
49
  ], authRole.prototype, "id", 2);
50
+ __decorateClass([
51
+ (0, import_sequelize_typescript.Column)({
52
+ type: import_sequelize_typescript.DataType.STRING(60)
53
+ })
54
+ ], authRole.prototype, "uuid", 2);
50
55
  __decorateClass([
51
56
  (0, import_sequelize_typescript.Column)({
52
57
  type: import_sequelize_typescript.DataType.STRING(100)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@admc-go-th/admc-library",
3
- "version": "1.0.17",
3
+ "version": "1.0.19",
4
4
  "description": "",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",
@@ -0,0 +1,7 @@
1
+ declare enum EStatus {
2
+ ACTIVE = 1,
3
+ INACTIVE = 2,
4
+ REMOVED = 9
5
+ }
6
+
7
+ export { EStatus };
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/types/jwt/enum/status.ts
21
+ var status_exports = {};
22
+ __export(status_exports, {
23
+ EStatus: () => EStatus
24
+ });
25
+ module.exports = __toCommonJS(status_exports);
26
+ var EStatus = /* @__PURE__ */ ((EStatus2) => {
27
+ EStatus2[EStatus2["ACTIVE"] = 1] = "ACTIVE";
28
+ EStatus2[EStatus2["INACTIVE"] = 2] = "INACTIVE";
29
+ EStatus2[EStatus2["REMOVED"] = 9] = "REMOVED";
30
+ return EStatus2;
31
+ })(EStatus || {});
32
+ // Annotate the CommonJS export names for ESM import in node:
33
+ 0 && (module.exports = {
34
+ EStatus
35
+ });
@@ -0,0 +1,6 @@
1
+ declare enum EUserRoles {
2
+ ADMIN = 2,
3
+ USER = 1
4
+ }
5
+
6
+ export { EUserRoles };
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/types/jwt/enum/user-role.ts
21
+ var user_role_exports = {};
22
+ __export(user_role_exports, {
23
+ EUserRoles: () => EUserRoles
24
+ });
25
+ module.exports = __toCommonJS(user_role_exports);
26
+ var EUserRoles = /* @__PURE__ */ ((EUserRoles2) => {
27
+ EUserRoles2[EUserRoles2["ADMIN"] = 2] = "ADMIN";
28
+ EUserRoles2[EUserRoles2["USER"] = 1] = "USER";
29
+ return EUserRoles2;
30
+ })(EUserRoles || {});
31
+ // Annotate the CommonJS export names for ESM import in node:
32
+ 0 && (module.exports = {
33
+ EUserRoles
34
+ });