@admc-go-th/admc-library 1.0.21 → 1.0.22

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 (36) hide show
  1. package/{authAssignment-zERupLM6.d.ts → authAssignment-CaUZqlvm.d.ts} +44 -25
  2. package/databases/models/authItem.ts +14 -0
  3. package/databases/models/authRole.ts +9 -0
  4. package/databases/models/index.ts +4 -1
  5. package/databases/models/oauthAccessToken.ts +16 -0
  6. package/databases/models/oauthRefreshToken.ts +16 -0
  7. package/databases/models/users.ts +20 -1
  8. package/databases/schema/authItem.ts +92 -91
  9. package/databases/schema/authItemChild.ts +33 -32
  10. package/databases/schema/authRole.ts +97 -85
  11. package/databases/schema/authRoleChild.ts +43 -36
  12. package/databases/schema/index.ts +12 -10
  13. package/databases/schema/menu.ts +113 -113
  14. package/databases/schema/msModule.ts +72 -72
  15. package/databases/schema/oauthAccessToken.ts +61 -0
  16. package/databases/schema/oauthRefreshToken.ts +61 -0
  17. package/databases/schema/users.ts +207 -185
  18. package/databases/tables/authAssignment.d.ts +1 -1
  19. package/databases/tables/authAssignment.js +209 -139
  20. package/databases/tables/authRole.d.ts +1 -1
  21. package/databases/tables/authRole.js +90 -22
  22. package/databases/tables/authRoleChild.d.ts +2 -14
  23. package/databases/tables/authRoleChild.js +529 -7
  24. package/databases/tables/index.d.ts +3 -2
  25. package/databases/tables/index.js +387 -240
  26. package/databases/tables/mdContent.d.ts +1 -1
  27. package/databases/tables/mdContent.js +211 -141
  28. package/databases/tables/mdContentGroup.d.ts +1 -1
  29. package/databases/tables/mdContentGroup.js +211 -141
  30. package/databases/tables/oauthAccessToken.d.ts +22 -0
  31. package/databases/tables/oauthAccessToken.js +640 -0
  32. package/databases/tables/oauthRefreshToken.d.ts +22 -0
  33. package/databases/tables/oauthRefreshToken.js +640 -0
  34. package/databases/tables/users.d.ts +1 -1
  35. package/databases/tables/users.js +211 -141
  36. package/package.json +1 -1
@@ -1,186 +1,208 @@
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
- accessToken?: string;
17
- userLevel?: number;
18
- userAuthen?: string;
19
- userType?: number;
20
- prefix?: string;
21
- firstName?: string;
22
- lastName?: string;
23
- phone?: string;
24
- status?: number;
25
- createdBy?: string;
26
- createdDate?: Date;
27
- updatedBy?: string;
28
- updatedDate?: Date;
29
- }
30
-
31
- @Table({
32
- tableName: "users",
33
- timestamps: false
34
- })
35
- export class users extends Model<usersAttributes, usersAttributes> implements usersAttributes {
36
-
37
- @Column({
38
- primaryKey: true,
39
- autoIncrement: true,
40
- type: DataType.INTEGER
41
- })
42
- declare id?: number;
43
-
44
- @Column({
45
- type: DataType.STRING(60)
46
- })
47
- declare uuid: string;
48
-
49
- @Column({
50
- type: DataType.STRING(100)
51
- })
52
- declare username: string;
53
-
54
- @Column({
55
- field: "password_hash",
56
- allowNull: true,
57
- type: DataType.STRING(255)
58
- })
59
- declare passwordHash?: string;
60
-
61
- @Column({
62
- field: "password_reset_token",
63
- allowNull: true,
64
- type: DataType.STRING(255)
65
- })
66
- declare passwordResetToken?: string;
67
-
68
- @Column({
69
- field: "verification_token",
70
- allowNull: true,
71
- type: DataType.STRING(255)
72
- })
73
- declare verificationToken?: string;
74
-
75
- @Column({
76
- allowNull: true,
77
- type: DataType.STRING(255)
78
- })
79
- declare email?: string;
80
-
81
- @Column({
82
- field: "auth_key",
83
- allowNull: true,
84
- type: DataType.STRING(32)
85
- })
86
- declare authKey?: string;
87
-
88
- @Column({
89
- field: "access_token",
90
- allowNull: true,
91
- type: DataType.STRING
92
- })
93
- declare accessToken?: string;
94
-
95
- @Column({
96
- field: "user_level",
97
- allowNull: true,
98
- type: DataType.INTEGER
99
- })
100
- declare userLevel?: number;
101
-
102
- @Column({
103
- field: "user_authen",
104
- allowNull: true,
105
- type: DataType.STRING(64)
106
- })
107
- declare userAuthen?: string;
108
-
109
- @Column({
110
- field: "user_type",
111
- allowNull: true,
112
- type: DataType.INTEGER
113
- })
114
- declare userType?: number;
115
-
116
- @Column({
117
- allowNull: true,
118
- type: DataType.STRING(10)
119
- })
120
- declare prefix?: string;
121
-
122
- @Column({
123
- field: "first_name",
124
- allowNull: true,
125
- type: DataType.STRING(100)
126
- })
127
- declare firstName?: string;
128
-
129
- @Column({
130
- field: "last_name",
131
- allowNull: true,
132
- type: DataType.STRING(100)
133
- })
134
- declare lastName?: string;
135
-
136
- @Column({
137
- allowNull: true,
138
- type: DataType.STRING(20)
139
- })
140
- declare phone?: string;
141
-
142
- @Column({
143
- allowNull: true,
144
- type: DataType.SMALLINT
145
- })
146
- declare status?: number;
147
-
148
- @Column({
149
- field: "created_by",
150
- allowNull: true,
151
- type: DataType.STRING(60)
152
- })
153
- declare createdBy?: string;
154
-
155
- @Column({
156
- field: "created_date",
157
- allowNull: true,
158
- type: DataType.DATE
159
- })
160
- declare createdDate?: Date;
161
-
162
- @Column({
163
- field: "updated_by",
164
- allowNull: true,
165
- type: DataType.STRING(60)
166
- })
167
- declare updatedBy?: string;
168
-
169
- @Column({
170
- field: "updated_date",
171
- allowNull: true,
172
- type: DataType.DATE
173
- })
174
- declare updatedDate?: Date;
175
-
176
- @HasMany(() => authAssignment, {
177
- sourceKey: "id"
178
- })
179
- declare authAssignments?: authAssignment[];
180
-
181
- @HasMany(() => mdContent, {
182
- sourceKey: "id"
183
- })
184
- declare mdContents?: mdContent[];
185
-
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
+ import { authRole } from "./authRole";
7
+
8
+ export interface usersAttributes {
9
+ id?: number;
10
+ uuid: string;
11
+ username: string;
12
+ passwordHash?: string;
13
+ passwordResetToken?: string;
14
+ verificationToken?: string;
15
+ email?: string;
16
+ authKey?: 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
+ createdBy?: string;
27
+ createdDate?: Date;
28
+ updatedBy?: string;
29
+ updatedDate?: Date;
30
+ secretKey?: string;
31
+ is2fa?: number;
32
+ }
33
+
34
+ @Table({
35
+ tableName: "users",
36
+ timestamps: false
37
+ })
38
+ export class users extends Model<usersAttributes, usersAttributes> implements usersAttributes {
39
+
40
+ @Column({
41
+ primaryKey: true,
42
+ autoIncrement: true,
43
+ type: DataType.INTEGER
44
+ })
45
+ declare id?: number;
46
+
47
+ @Column({
48
+ type: DataType.STRING(60)
49
+ })
50
+ declare uuid: string;
51
+
52
+ @Column({
53
+ type: DataType.STRING(100)
54
+ })
55
+ declare username: string;
56
+
57
+ @Column({
58
+ field: "password_hash",
59
+ allowNull: true,
60
+ type: DataType.STRING(255)
61
+ })
62
+ declare passwordHash?: string;
63
+
64
+ @Column({
65
+ field: "password_reset_token",
66
+ allowNull: true,
67
+ type: DataType.STRING(255)
68
+ })
69
+ declare passwordResetToken?: string;
70
+
71
+ @Column({
72
+ field: "verification_token",
73
+ allowNull: true,
74
+ type: DataType.STRING(255)
75
+ })
76
+ declare verificationToken?: string;
77
+
78
+ @Column({
79
+ allowNull: true,
80
+ type: DataType.STRING(255)
81
+ })
82
+ declare email?: string;
83
+
84
+ @Column({
85
+ field: "auth_key",
86
+ allowNull: true,
87
+ type: DataType.STRING(32)
88
+ })
89
+ declare authKey?: string;
90
+
91
+ @Column({
92
+ field: "secret_key",
93
+ allowNull: true,
94
+ type: DataType.STRING(255)
95
+ })
96
+ declare secretKey: string;
97
+
98
+ @Column({
99
+ field: "access_token",
100
+ allowNull: true,
101
+ type: DataType.STRING
102
+ })
103
+ declare accessToken?: string;
104
+
105
+ @Column({
106
+ field: "user_level",
107
+ allowNull: true,
108
+ type: DataType.INTEGER
109
+ })
110
+ declare userLevel?: number;
111
+
112
+ @Column({
113
+ field: "user_authen",
114
+ allowNull: true,
115
+ type: DataType.STRING(64)
116
+ })
117
+ declare userAuthen?: string;
118
+
119
+ @Column({
120
+ field: "user_type",
121
+ allowNull: true,
122
+ type: DataType.INTEGER
123
+ })
124
+ declare userType?: number;
125
+
126
+ @Column({
127
+ allowNull: true,
128
+ type: DataType.STRING(10)
129
+ })
130
+ declare prefix?: string;
131
+
132
+ @Column({
133
+ field: "first_name",
134
+ allowNull: true,
135
+ type: DataType.STRING(100)
136
+ })
137
+ declare firstName?: string;
138
+
139
+ @Column({
140
+ field: "last_name",
141
+ allowNull: true,
142
+ type: DataType.STRING(100)
143
+ })
144
+ declare lastName?: string;
145
+
146
+ @Column({
147
+ allowNull: true,
148
+ type: DataType.STRING(20)
149
+ })
150
+ declare phone?: string;
151
+
152
+ @Column({
153
+ allowNull: true,
154
+ type: DataType.SMALLINT
155
+ })
156
+ declare status?: number;
157
+
158
+ @Column({
159
+ field: "is_2fa",
160
+ allowNull: true,
161
+ type: DataType.INTEGER
162
+ })
163
+ declare is2fa: 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
+ @HasMany(() => authAssignment, {
194
+ sourceKey: "id"
195
+ })
196
+ declare authAssignments?: authAssignment[];
197
+
198
+ @HasMany(() => mdContent, {
199
+ sourceKey: "id"
200
+ })
201
+ declare mdContents?: mdContent[];
202
+
203
+ @HasMany(() => authRole, {
204
+ sourceKey: "uuid",
205
+ foreignKey: "created_by"
206
+ })
207
+ declare authRoles?: authRole[];
186
208
  }
@@ -1,2 +1,2 @@
1
1
  import 'sequelize-typescript';
2
- export { b as authAssignment, a as authAssignmentAttributes } from '../../authAssignment-zERupLM6.js';
2
+ export { b as authAssignment, a as authAssignmentAttributes } from '../../authAssignment-CaUZqlvm.js';