@admc-go-th/admc-library 1.0.36 → 1.0.38

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.
@@ -1,13 +1,16 @@
1
1
  import {
2
- Model, Table, Column, DataType, Index, Sequelize, ForeignKey
2
+ Model, Table, Column, DataType, Index, Sequelize, ForeignKey, BelongsTo
3
3
  } from "sequelize-typescript";
4
+ import { mdFaqGroup } from "./mdFaqGroup";
4
5
 
5
6
  export interface mdFaqAttributes {
6
7
  id?: number;
7
8
  uuid?: string;
8
9
  keyName?: string;
10
+ userId?: number;
9
11
  groupId?: number;
10
12
  title?: string;
13
+ description?: string;
11
14
  detail?: string;
12
15
  attachments?: object;
13
16
  sort?: number;
@@ -47,6 +50,14 @@ export class mdFaq extends Model<mdFaqAttributes, mdFaqAttributes> implements md
47
50
  })
48
51
  declare keyName?: string;
49
52
 
53
+ @Column({
54
+ field: "user_id",
55
+ allowNull: true,
56
+ type: DataType.INTEGER
57
+ })
58
+ declare userId?: number;
59
+
60
+ @ForeignKey(() => mdFaqGroup)
50
61
  @Column({
51
62
  field: "group_id",
52
63
  allowNull: true,
@@ -60,6 +71,12 @@ export class mdFaq extends Model<mdFaqAttributes, mdFaqAttributes> implements md
60
71
  })
61
72
  declare title?: string;
62
73
 
74
+ @Column({
75
+ allowNull: true,
76
+ type: DataType.STRING(255)
77
+ })
78
+ declare description?: string;
79
+
63
80
  @Column({
64
81
  allowNull: true,
65
82
  type: DataType.STRING
@@ -133,4 +150,7 @@ export class mdFaq extends Model<mdFaqAttributes, mdFaqAttributes> implements md
133
150
  })
134
151
  declare updatedDate?: Date;
135
152
 
153
+ @BelongsTo(() => mdFaqGroup)
154
+ declare mdFaqGroup?: mdFaqGroup;
155
+
136
156
  }
@@ -1,11 +1,13 @@
1
1
  import {
2
- Model, Table, Column, DataType, Index, Sequelize, ForeignKey
2
+ Model, Table, Column, DataType, Index, Sequelize, ForeignKey, HasMany
3
3
  } from "sequelize-typescript";
4
+ import { mdFaq } from "./mdFaq";
4
5
 
5
6
  export interface mdFaqGroupAttributes {
6
7
  id?: number;
7
8
  uuid?: string;
8
9
  keyName?: string;
10
+ userId?: number;
9
11
  name: string;
10
12
  description?: string;
11
13
  status?: number;
@@ -41,6 +43,13 @@ export class mdFaqGroup extends Model<mdFaqGroupAttributes, mdFaqGroupAttributes
41
43
  })
42
44
  declare keyName?: string;
43
45
 
46
+ @Column({
47
+ field: "user_id",
48
+ allowNull: true,
49
+ type: DataType.INTEGER
50
+ })
51
+ declare userId?: number;
52
+
44
53
  @Column({
45
54
  type: DataType.STRING(255)
46
55
  })
@@ -86,4 +95,9 @@ export class mdFaqGroup extends Model<mdFaqGroupAttributes, mdFaqGroupAttributes
86
95
  })
87
96
  declare updatedDate?: Date;
88
97
 
98
+ @HasMany(() => mdFaq, {
99
+ sourceKey: "id"
100
+ })
101
+ declare mdFaqs?: mdFaq[];
102
+
89
103
  }
@@ -1,243 +1,243 @@
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 { mdQuestionnaire } from "./mdQuestionnaire";
7
- import { usersVerify } from "./usersVerify";
8
-
9
- export interface usersAttributes {
10
- id?: number;
11
- uuid: string;
12
- username: string;
13
- passwordHash?: string;
14
- passwordResetToken?: string;
15
- verificationToken?: string;
16
- email?: string;
17
- authKey?: string;
18
- secretKey?: string;
19
- accessToken?: string;
20
- userLevel?: number;
21
- userAuthen?: string;
22
- userType?: number;
23
- prefix?: string;
24
- firstName?: string;
25
- lastName?: string;
26
- phone?: string;
27
- status?: number;
28
- is_2fa?: number;
29
- createdBy?: string;
30
- createdDate?: Date;
31
- updatedBy?: string;
32
- updatedDate?: Date;
33
- address?: string;
34
- other?: string;
35
- isEmailVerified?: number;
36
- photoUuid?: string;
37
- }
38
-
39
- @Table({
40
- tableName: "users",
41
- timestamps: false
42
- })
43
- export class users extends Model<usersAttributes, usersAttributes> implements usersAttributes {
44
-
45
- @Column({
46
- primaryKey: true,
47
- autoIncrement: true,
48
- type: DataType.INTEGER
49
- })
50
- declare id?: number;
51
-
52
- @Column({
53
- type: DataType.STRING(60)
54
- })
55
- declare uuid: string;
56
-
57
- @Column({
58
- type: DataType.STRING(100)
59
- })
60
- declare username: string;
61
-
62
- @Column({
63
- field: "password_hash",
64
- allowNull: true,
65
- type: DataType.STRING(255)
66
- })
67
- declare passwordHash?: string;
68
-
69
- @Column({
70
- field: "password_reset_token",
71
- allowNull: true,
72
- type: DataType.STRING(255)
73
- })
74
- declare passwordResetToken?: string;
75
-
76
- @Column({
77
- field: "verification_token",
78
- allowNull: true,
79
- type: DataType.STRING(255)
80
- })
81
- declare verificationToken?: string;
82
-
83
- @Column({
84
- allowNull: true,
85
- type: DataType.STRING(255)
86
- })
87
- declare email?: string;
88
-
89
- @Column({
90
- field: "auth_key",
91
- allowNull: true,
92
- type: DataType.STRING(32)
93
- })
94
- declare authKey?: string;
95
-
96
- @Column({
97
- field: "secret_key",
98
- allowNull: true,
99
- type: DataType.STRING(255)
100
- })
101
- declare secretKey?: string;
102
-
103
- @Column({
104
- field: "access_token",
105
- allowNull: true,
106
- type: DataType.STRING
107
- })
108
- declare accessToken?: string;
109
-
110
- @Column({
111
- field: "user_level",
112
- allowNull: true,
113
- type: DataType.INTEGER
114
- })
115
- declare userLevel?: number;
116
-
117
- @Column({
118
- field: "user_authen",
119
- allowNull: true,
120
- type: DataType.STRING(64)
121
- })
122
- declare userAuthen?: string;
123
-
124
- @Column({
125
- field: "user_type",
126
- allowNull: true,
127
- type: DataType.INTEGER
128
- })
129
- declare userType?: number;
130
-
131
- @Column({
132
- allowNull: true,
133
- type: DataType.STRING(10)
134
- })
135
- declare prefix?: string;
136
-
137
- @Column({
138
- field: "first_name",
139
- allowNull: true,
140
- type: DataType.STRING(100)
141
- })
142
- declare firstName?: string;
143
-
144
- @Column({
145
- field: "last_name",
146
- allowNull: true,
147
- type: DataType.STRING(100)
148
- })
149
- declare lastName?: string;
150
-
151
- @Column({
152
- allowNull: true,
153
- type: DataType.STRING(20)
154
- })
155
- declare phone?: string;
156
-
157
- @Column({
158
- allowNull: true,
159
- type: DataType.SMALLINT
160
- })
161
- declare status?: number;
162
-
163
- @Column({
164
- allowNull: true,
165
- type: DataType.INTEGER
166
- })
167
- declare is_2fa?: number;
168
-
169
- @Column({
170
- field: "created_by",
171
- allowNull: true,
172
- type: DataType.STRING(60)
173
- })
174
- declare createdBy?: string;
175
-
176
- @Column({
177
- field: "created_date",
178
- allowNull: true,
179
- type: DataType.DATE
180
- })
181
- declare createdDate?: Date;
182
-
183
- @Column({
184
- field: "updated_by",
185
- allowNull: true,
186
- type: DataType.STRING(60)
187
- })
188
- declare updatedBy?: string;
189
-
190
- @Column({
191
- field: "updated_date",
192
- allowNull: true,
193
- type: DataType.DATE
194
- })
195
- declare updatedDate?: Date;
196
-
197
- @Column({
198
- allowNull: true,
199
- type: DataType.STRING(255)
200
- })
201
- declare address?: string;
202
-
203
- @Column({
204
- allowNull: true,
205
- type: DataType.STRING(255)
206
- })
207
- declare other?: string;
208
-
209
- @Column({
210
- field: "is_email_verified",
211
- allowNull: true,
212
- type: DataType.INTEGER
213
- })
214
- declare isEmailVerified?: number;
215
-
216
- @Column({
217
- field: "photo_uuid",
218
- allowNull: true,
219
- type: DataType.STRING(60)
220
- })
221
- declare photoUuid?: string;
222
-
223
- @HasMany(() => authAssignment, {
224
- sourceKey: "id"
225
- })
226
- declare authAssignments?: authAssignment[];
227
-
228
- @HasMany(() => mdContent, {
229
- sourceKey: "id"
230
- })
231
- declare mdContents?: mdContent[];
232
-
233
- @HasMany(() => mdQuestionnaire, {
234
- sourceKey: "id"
235
- })
236
- declare mdQuestionnaires?: mdQuestionnaire[];
237
-
238
- @HasMany(() => usersVerify, {
239
- sourceKey: "id"
240
- })
241
- declare usersVerifies?: usersVerify[];
242
-
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 { mdQuestionnaire } from "./mdQuestionnaire";
7
+ import { usersVerify } from "./usersVerify";
8
+
9
+ export interface usersAttributes {
10
+ id?: number;
11
+ uuid: string;
12
+ username: string;
13
+ passwordHash?: string;
14
+ passwordResetToken?: string;
15
+ verificationToken?: string;
16
+ email?: string;
17
+ authKey?: string;
18
+ secretKey?: string;
19
+ accessToken?: string;
20
+ userLevel?: number;
21
+ userAuthen?: string;
22
+ userType?: number;
23
+ prefix?: string;
24
+ firstName?: string;
25
+ lastName?: string;
26
+ phone?: string;
27
+ status?: number;
28
+ is_2fa?: number;
29
+ createdBy?: string;
30
+ createdDate?: Date;
31
+ updatedBy?: string;
32
+ updatedDate?: Date;
33
+ address?: string;
34
+ other?: string;
35
+ isEmailVerified?: number;
36
+ photoUuid?: string;
37
+ }
38
+
39
+ @Table({
40
+ tableName: "users",
41
+ timestamps: false
42
+ })
43
+ export class users extends Model<usersAttributes, usersAttributes> implements usersAttributes {
44
+
45
+ @Column({
46
+ primaryKey: true,
47
+ autoIncrement: true,
48
+ type: DataType.INTEGER
49
+ })
50
+ declare id?: number;
51
+
52
+ @Column({
53
+ type: DataType.STRING(60)
54
+ })
55
+ declare uuid: string;
56
+
57
+ @Column({
58
+ type: DataType.STRING(100)
59
+ })
60
+ declare username: string;
61
+
62
+ @Column({
63
+ field: "password_hash",
64
+ allowNull: true,
65
+ type: DataType.STRING(255)
66
+ })
67
+ declare passwordHash?: string;
68
+
69
+ @Column({
70
+ field: "password_reset_token",
71
+ allowNull: true,
72
+ type: DataType.STRING(255)
73
+ })
74
+ declare passwordResetToken?: string;
75
+
76
+ @Column({
77
+ field: "verification_token",
78
+ allowNull: true,
79
+ type: DataType.STRING(255)
80
+ })
81
+ declare verificationToken?: string;
82
+
83
+ @Column({
84
+ allowNull: true,
85
+ type: DataType.STRING(255)
86
+ })
87
+ declare email?: string;
88
+
89
+ @Column({
90
+ field: "auth_key",
91
+ allowNull: true,
92
+ type: DataType.STRING(32)
93
+ })
94
+ declare authKey?: string;
95
+
96
+ @Column({
97
+ field: "secret_key",
98
+ allowNull: true,
99
+ type: DataType.STRING(255)
100
+ })
101
+ declare secretKey?: string;
102
+
103
+ @Column({
104
+ field: "access_token",
105
+ allowNull: true,
106
+ type: DataType.STRING
107
+ })
108
+ declare accessToken?: string;
109
+
110
+ @Column({
111
+ field: "user_level",
112
+ allowNull: true,
113
+ type: DataType.INTEGER
114
+ })
115
+ declare userLevel?: number;
116
+
117
+ @Column({
118
+ field: "user_authen",
119
+ allowNull: true,
120
+ type: DataType.STRING(64)
121
+ })
122
+ declare userAuthen?: string;
123
+
124
+ @Column({
125
+ field: "user_type",
126
+ allowNull: true,
127
+ type: DataType.INTEGER
128
+ })
129
+ declare userType?: number;
130
+
131
+ @Column({
132
+ allowNull: true,
133
+ type: DataType.STRING(10)
134
+ })
135
+ declare prefix?: string;
136
+
137
+ @Column({
138
+ field: "first_name",
139
+ allowNull: true,
140
+ type: DataType.STRING(100)
141
+ })
142
+ declare firstName?: string;
143
+
144
+ @Column({
145
+ field: "last_name",
146
+ allowNull: true,
147
+ type: DataType.STRING(100)
148
+ })
149
+ declare lastName?: string;
150
+
151
+ @Column({
152
+ allowNull: true,
153
+ type: DataType.STRING(20)
154
+ })
155
+ declare phone?: string;
156
+
157
+ @Column({
158
+ allowNull: true,
159
+ type: DataType.SMALLINT
160
+ })
161
+ declare status?: number;
162
+
163
+ @Column({
164
+ allowNull: true,
165
+ type: DataType.INTEGER
166
+ })
167
+ declare is_2fa?: number;
168
+
169
+ @Column({
170
+ field: "created_by",
171
+ allowNull: true,
172
+ type: DataType.STRING(60)
173
+ })
174
+ declare createdBy?: string;
175
+
176
+ @Column({
177
+ field: "created_date",
178
+ allowNull: true,
179
+ type: DataType.DATE
180
+ })
181
+ declare createdDate?: Date;
182
+
183
+ @Column({
184
+ field: "updated_by",
185
+ allowNull: true,
186
+ type: DataType.STRING(60)
187
+ })
188
+ declare updatedBy?: string;
189
+
190
+ @Column({
191
+ field: "updated_date",
192
+ allowNull: true,
193
+ type: DataType.DATE
194
+ })
195
+ declare updatedDate?: Date;
196
+
197
+ @Column({
198
+ allowNull: true,
199
+ type: DataType.STRING(255)
200
+ })
201
+ declare address?: string;
202
+
203
+ @Column({
204
+ allowNull: true,
205
+ type: DataType.STRING(255)
206
+ })
207
+ declare other?: string;
208
+
209
+ @Column({
210
+ field: "is_email_verified",
211
+ allowNull: true,
212
+ type: DataType.INTEGER
213
+ })
214
+ declare isEmailVerified?: number;
215
+
216
+ @Column({
217
+ field: "photo_uuid",
218
+ allowNull: true,
219
+ type: DataType.STRING(60)
220
+ })
221
+ declare photoUuid?: string;
222
+
223
+ @HasMany(() => authAssignment, {
224
+ sourceKey: "id"
225
+ })
226
+ declare authAssignments?: authAssignment[];
227
+
228
+ @HasMany(() => mdContent, {
229
+ sourceKey: "id"
230
+ })
231
+ declare mdContents?: mdContent[];
232
+
233
+ @HasMany(() => mdQuestionnaire, {
234
+ sourceKey: "id"
235
+ })
236
+ declare mdQuestionnaires?: mdQuestionnaire[];
237
+
238
+ @HasMany(() => usersVerify, {
239
+ sourceKey: "id"
240
+ })
241
+ declare usersVerifies?: usersVerify[];
242
+
243
243
  }