@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.
- package/{authAssignment-zERupLM6.d.ts → authAssignment-CaUZqlvm.d.ts} +44 -25
- package/databases/models/authItem.ts +14 -0
- package/databases/models/authRole.ts +9 -0
- package/databases/models/index.ts +4 -1
- package/databases/models/oauthAccessToken.ts +16 -0
- package/databases/models/oauthRefreshToken.ts +16 -0
- package/databases/models/users.ts +20 -1
- package/databases/schema/authItem.ts +92 -91
- package/databases/schema/authItemChild.ts +33 -32
- package/databases/schema/authRole.ts +97 -85
- package/databases/schema/authRoleChild.ts +43 -36
- package/databases/schema/index.ts +12 -10
- package/databases/schema/menu.ts +113 -113
- package/databases/schema/msModule.ts +72 -72
- package/databases/schema/oauthAccessToken.ts +61 -0
- package/databases/schema/oauthRefreshToken.ts +61 -0
- package/databases/schema/users.ts +207 -185
- package/databases/tables/authAssignment.d.ts +1 -1
- package/databases/tables/authAssignment.js +209 -139
- package/databases/tables/authRole.d.ts +1 -1
- package/databases/tables/authRole.js +90 -22
- package/databases/tables/authRoleChild.d.ts +2 -14
- package/databases/tables/authRoleChild.js +529 -7
- package/databases/tables/index.d.ts +3 -2
- package/databases/tables/index.js +387 -240
- package/databases/tables/mdContent.d.ts +1 -1
- package/databases/tables/mdContent.js +211 -141
- package/databases/tables/mdContentGroup.d.ts +1 -1
- package/databases/tables/mdContentGroup.js +211 -141
- package/databases/tables/oauthAccessToken.d.ts +22 -0
- package/databases/tables/oauthAccessToken.js +640 -0
- package/databases/tables/oauthRefreshToken.d.ts +22 -0
- package/databases/tables/oauthRefreshToken.js +640 -0
- package/databases/tables/users.d.ts +1 -1
- package/databases/tables/users.js +211 -141
- 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
|
-
|
|
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
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
})
|
|
184
|
-
declare
|
|
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-
|
|
2
|
+
export { b as authAssignment, a as authAssignmentAttributes } from '../../authAssignment-CaUZqlvm.js';
|