structure.php
37.5 KB
1
2
3
4
5
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
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
<?php
/**
* 应用的数据表结构文件
* structure.php
* $Author$
*/
return "
CREATE TABLE IF NOT EXISTS `oa_exam_answer` (
`ea_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
`uid` char(32) NOT NULL COMMENT '用户id',
`ep_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '试卷id',
`my_score` decimal(18,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '考生分数',
`my_begin_time` bigint(13) unsigned NOT NULL DEFAULT '0' COMMENT '考生开始考试时间',
`my_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '考生用时',
`my_error_num` mediumint(5) unsigned NOT NULL DEFAULT '0' COMMENT '考生答错的数量',
`my_is_pass` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '考生是否通过(0:否 1:通过)',
`my_score_filed` text NOT NULL COMMENT '语音问答题图片和文字答案',
`paper_info` text NOT NULL COMMENT '试卷信息序列化',
`my_end_time` varchar(13) NOT NULL DEFAULT '' COMMENT '交卷时间',
`marking_uid` varchar(32) NOT NULL DEFAULT '' COMMENT '阅卷人UID',
`marking_user_type` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '阅卷人是否是管理员(0:否,1:是)',
`marking_name` varchar(100) NOT NULL DEFAULT '' COMMENT '阅卷人姓名',
`marking_time` varchar(13) NOT NULL DEFAULT '0' COMMENT '阅卷时间',
`answer_status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '批阅状态(0:初始化,1:待批阅,2:已批阅)',
`businessid` varchar(100) NOT NULL DEFAULT '' COMMENT '积分策略业务ID',
`obj_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '任务、培训ID',
`is_score_top` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '是否(测评考试)最高分:(1:是[默认] 0: 否)',
`is_makeup` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否是补考:(0:否 1: 是)',
`data_type` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '数据类型(1:常规考试 2:任务类,3:线下培训,4:其他类型)',
`domain` varchar(32) NOT NULL DEFAULT '' COMMENT '企业域名',
`status` tinyint(3) unsigned NOT NULL DEFAULT '1' COMMENT '状态, 1=初始化,2=已更新,3=已删除',
`created` bigint(13) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`updated` bigint(13) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
`deleted` bigint(13) unsigned NOT NULL DEFAULT '0' COMMENT '删除时间',
PRIMARY KEY (`ea_id`),
KEY `uid_ep_id` (`uid`,`ep_id`),
KEY `ep_id_answer_status` (`ep_id`,`answer_status`),
KEY `answer_status` (`answer_status`),
KEY `domain_status` (`domain`,`status`),
KEY `uid` (`uid`) USING BTREE,
KEY `ep_id` (`ep_id`,`domain`,`status`,`answer_status`) USING BTREE,
KEY `obj_id` (`obj_id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='试卷 - 答卷表';
CREATE TABLE IF NOT EXISTS `oa_exam_answer_attach` (
`atta_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
`ead_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '答卷详情 ID',
`ea_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '答卷 ID',
`order_id` char(32) NOT NULL DEFAULT '' COMMENT '媒体文件顺序编号',
`media_id` varchar(256) NOT NULL DEFAULT '' COMMENT '微信媒体文件 media_id',
`is_complete` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '是否转换完毕,1=已转换;0=未转换,针对音频文件,其他不需要转换的文件都等于1',
`at_id` char(32) NOT NULL DEFAULT '' COMMENT '本地附件 ID',
`type` enum('voice','image') NOT NULL DEFAULT 'voice' COMMENT '附件类型:voice=音频;image=图片',
`file_info` text NOT NULL COMMENT '文件信息。序列化字符串',
`domain` char(50) NOT NULL DEFAULT '' COMMENT '企业域名',
`status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '数据状态:1=新创建;2=已更新;3=已删除',
`created` bigint(13) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`updated` bigint(13) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
`deleted` bigint(13) unsigned NOT NULL DEFAULT '0' COMMENT '删除时间',
PRIMARY KEY (`atta_id`),
KEY `ead_id` (`ead_id`),
KEY `ea_id` (`ea_id`),
KEY `domain_status` (`domain`,`status`),
KEY `order_id` (`order_id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='试卷 - 答题文件表';
CREATE TABLE IF NOT EXISTS `oa_exam_answer_detail` (
`ead_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
`ea_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '答卷id',
`option_index` varchar(100) NOT NULL DEFAULT '' COMMENT '打乱后的题目选项(逗号分隔)',
`esr_id` int(11) DEFAULT '0' COMMENT '随机题库ID或者oa_exam_snapshot表的主键',
`my_score` decimal(18,2) NOT NULL DEFAULT '0.00' COMMENT '我的分数',
`score` decimal(18,2) NOT NULL DEFAULT '0.00' COMMENT '题目分数',
`is_pass` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '答题状态(0:未作答;1:已通过;2:未通过)',
`my_answer` text NOT NULL COMMENT '我的答案',
`order_num` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '序号',
`et_type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '题目类型(1:单选题 2:判断题 3:问答题 4:多选题,5:语音题)',
`marking_status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '批阅状态(0:待批阅,1已批阅)',
`is_status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '作答状态 0未作答 1已作答',
`ep_id` int(11) NOT NULL DEFAULT '0' COMMENT '试卷ID',
`et_id` int(11) NOT NULL DEFAULT '0' COMMENT '题目ID',
`cron_status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '计划任务状态(0:未处理,1已处理)',
`paper_type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '试卷使用类型(0:测评试卷,1:模拟试卷)',
`domain` varchar(32) NOT NULL DEFAULT '' COMMENT '企业域名',
`status` tinyint(3) unsigned NOT NULL DEFAULT '1' COMMENT '状态, 1=初始化,2=已更新,3=已删除',
`created` bigint(13) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`updated` bigint(13) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
`deleted` bigint(13) unsigned NOT NULL DEFAULT '0' COMMENT '删除时间',
PRIMARY KEY (`ead_id`),
KEY `domain_status` (`domain`,`status`),
KEY `ep_id` (`ep_id`),
KEY `ea_id` (`ea_id`),
KEY `et_id` (`et_id`),
KEY `paper_type` (`paper_type`),
KEY `et_type` (`et_type`),
KEY `esr_id` (`esr_id`),
KEY `is_pass` (`is_pass`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='考试-答卷详情表';
CREATE TABLE IF NOT EXISTS `oa_exam_attr` (
`attr_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键(属性ID)',
`etag_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '所属标签',
`attr_name` varchar(200) NOT NULL DEFAULT '' COMMENT '属性名称',
`domain` varchar(32) NOT NULL DEFAULT '' COMMENT '企业域名',
`status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '状态, 1=初始化,2=已更新,3=已删除',
`created` bigint(13) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`updated` bigint(13) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
`deleted` bigint(13) unsigned NOT NULL DEFAULT '0' COMMENT '删除时间',
PRIMARY KEY (`attr_id`),
KEY `domain_status` (`etag_id`,`domain`,`status`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='考试-属性信息表';
CREATE TABLE IF NOT EXISTS `oa_exam_bank` (
`eb_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
`eb_name` varchar(50) NOT NULL DEFAULT '' COMMENT '题库名称',
`single_count` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '单选题数量',
`multiple_count` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '多选题数量',
`judgment_count` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '判断题数量',
`question_count` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '问答题数量',
`voice_count` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '语音题数量',
`total_count` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '总数',
`domain` varchar(32) NOT NULL DEFAULT '' COMMENT '企业域名',
`status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '状态, 1=初始化,2=已更新,3=已删除',
`created` bigint(13) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`updated` bigint(13) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
`deleted` bigint(13) unsigned NOT NULL DEFAULT '0' COMMENT '删除时间',
PRIMARY KEY (`eb_id`),
KEY `domain_status` (`domain`,`status`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='考试-题库表';
CREATE TABLE IF NOT EXISTS `oa_exam_category` (
`ec_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键(分类ID)',
`parent_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '父级分类ID',
`ec_name` varchar(100) NOT NULL DEFAULT '' COMMENT '分类名称',
`ec_desc` text NOT NULL COMMENT '分类描述',
`order_num` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '序号',
`ec_status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '分类状态(0:禁用,1:开启)',
`is_all` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '权限状态(0:不是全公司,1:全公司)',
`domain` varchar(32) NOT NULL DEFAULT '' COMMENT '企业域名',
`status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '状态, 1=初始化,2=已更新,3=已删除',
`created` bigint(13) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`updated` bigint(13) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
`deleted` bigint(13) unsigned NOT NULL DEFAULT '0' COMMENT '删除时间',
PRIMARY KEY (`ec_id`),
KEY `ec_status` (`ec_status`),
KEY `order_num` (`order_num`),
KEY `domain_status` (`domain`,`status`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='考试-试卷分类表';
CREATE TABLE IF NOT EXISTS `oa_exam_like` (
`like_id` int(10) NOT NULL AUTO_INCREMENT COMMENT '主键',
`uid` char(32) NOT NULL DEFAULT '' COMMENT '点赞人ID',
`ea_id` int(10) NOT NULL DEFAULT '0' COMMENT '答卷表Id',
`domain` varchar(32) NOT NULL DEFAULT '' COMMENT '企业域名',
`status` tinyint(3) unsigned NOT NULL DEFAULT '1' COMMENT '状态, 1=初始化,2=已更新,3=已删除',
`created` bigint(13) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`updated` bigint(13) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
`deleted` bigint(13) unsigned NOT NULL DEFAULT '0' COMMENT '删除时间',
PRIMARY KEY (`like_id`),
KEY `ea_id` (`ea_id`),
KEY `uid` (`uid`),
KEY `domain_status` (`domain`,`status`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='考试-点赞表';
CREATE TABLE IF NOT EXISTS `oa_exam_medal` (
`em_id` int(10) NOT NULL AUTO_INCREMENT COMMENT '主键',
`title` varchar(255) NOT NULL DEFAULT '' COMMENT '激励行为',
`em_desc` text NOT NULL COMMENT '激励描述',
`em_type` int(10) NOT NULL DEFAULT '0' COMMENT '激励类型,0=勋章,1=积分',
`im_id` char(32) NOT NULL DEFAULT '' COMMENT '勋章ID',
`em_integral` int(10) NOT NULL DEFAULT '0' COMMENT '积分',
`icon_type` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '图标来源 (1:用户上传 2: 系统预设)',
`is_all` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '是否全部 (0:否 1:全部)',
`em_rule` text NOT NULL COMMENT '规格数值序列化 ID,name',
`em_number` int(10) NOT NULL DEFAULT '0' COMMENT '次数',
`em_score` int(10) NOT NULL DEFAULT '0' COMMENT '分数',
`domain` varchar(32) NOT NULL DEFAULT '' COMMENT '企业域名',
`status` tinyint(3) unsigned NOT NULL DEFAULT '1' COMMENT '状态, 1=初始化,2=已更新,3=已删除',
`created` bigint(13) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`updated` bigint(13) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
`deleted` bigint(13) unsigned NOT NULL DEFAULT '0' COMMENT '删除时间',
PRIMARY KEY (`em_id`),
KEY `domain_status` (`domain`,`status`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='考试-激励表';
CREATE TABLE IF NOT EXISTS `oa_exam_medal_record` (
`emrid` int(10) NOT NULL AUTO_INCREMENT COMMENT '主键',
`uid` char(32) NOT NULL DEFAULT '' COMMENT '领取人UID',
`em_id` int(10) NOT NULL DEFAULT '0' COMMENT '激励ID',
`domain` varchar(32) NOT NULL DEFAULT '' COMMENT '企业域名',
`status` tinyint(3) unsigned NOT NULL DEFAULT '1' COMMENT '状态, 1=初始化,2=已更新,3=已删除',
`created` bigint(13) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`updated` bigint(13) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
`deleted` bigint(13) unsigned NOT NULL DEFAULT '0' COMMENT '删除时间',
PRIMARY KEY (`emrid`),
KEY `uid` (`uid`),
KEY `domain_status` (`domain`,`status`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='考试-勋章,积分领取表';
CREATE TABLE IF NOT EXISTS `oa_exam_medal_relation` (
`id` int(10) NOT NULL AUTO_INCREMENT COMMENT '主键',
`ep_id` int(10) NOT NULL DEFAULT '0' COMMENT '试卷ID',
`em_id` int(10) NOT NULL DEFAULT '0' COMMENT '激励ID',
`domain` varchar(32) NOT NULL DEFAULT '' COMMENT '企业域名',
`status` tinyint(3) unsigned NOT NULL DEFAULT '1' COMMENT '状态, 1=初始化,2=已更新,3=已删除',
`created` bigint(13) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`updated` bigint(13) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
`deleted` bigint(13) unsigned NOT NULL DEFAULT '0' COMMENT '删除时间',
PRIMARY KEY (`id`),
KEY `em_id` (`em_id`),
KEY `domain_status` (`domain`,`status`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='考试-激励试卷关联表';
CREATE TABLE IF NOT EXISTS `oa_exam_paper` (
`ep_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
`ec_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '所属分类ID',
`exam_type` tinyint(1) NOT NULL DEFAULT '1' COMMENT '试卷类型(1:常规试卷,2:任务类,3:线下培训,4.其他类型)',
`paper_type` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '试卷使用类型(0:测评试卷,1:模拟试卷)',
`bank_data` text NOT NULL COMMENT '题库ID(逗号分隔)',
`tag_data` text NOT NULL COMMENT '属性序列化(序列化)',
`admin_id` char(32) NOT NULL DEFAULT '' COMMENT '发布人ID',
`launch_man` varchar(54) NOT NULL DEFAULT '' COMMENT '发布人',
`ep_type` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '试卷类型(1:自主选题 2:规则抽题 3:随机抽题)',
`search_type` tinyint(3) unsigned NOT NULL DEFAULT '1' COMMENT '标签筛选方式(1:全部满足 2:满足任意一个)',
`bank_topic_data` text NOT NULL COMMENT '题库题目设置序列化(出题规则序列化)',
`rule` text NOT NULL COMMENT '规则抽题模式的规则(序列化)',
`check_topic_data` text NOT NULL COMMENT '选中题目列表(序列化)',
`ep_name` varchar(200) NOT NULL DEFAULT '0' COMMENT '试卷名称',
`topic_count` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT '题目数',
`join_count` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '已参与人数',
`unjoin_count` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '未参与人数',
`is_cover_open` tinyint(3) NOT NULL DEFAULT '2' COMMENT '是否开启封面图片上传(1:开启,2:关闭)',
`cover_id` char(32) NOT NULL DEFAULT '' COMMENT '封面',
`begin_time` bigint(13) unsigned NOT NULL DEFAULT '0' COMMENT '开始时间',
`end_time` bigint(13) unsigned NOT NULL DEFAULT '0' COMMENT '结束时间',
`paper_time` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT '考试时长',
`is_notify` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否通知(0:否 1:是)',
`is_recommend` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '是否开启推荐(0:否 1:是)',
`notify_begin` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '开始前通知时间',
`notify_end` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '结束前通知时间',
`begin_corn` char(32) NOT NULL DEFAULT '' COMMENT '开始前通知cornid',
`end_cron` char(32) NOT NULL DEFAULT '' COMMENT '结束前通知cornid',
`answer_resolve` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '答案解析(1:开启 2:关闭)',
`total_score` decimal(18,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '总分',
`pass_score` decimal(18,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '及格分',
`intro` text NOT NULL COMMENT '考试说明',
`is_all` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '是否全部 (0:否 1:全部)',
`is_pushmsg` tinyint(3) unsigned NOT NULL DEFAULT '1' COMMENT '是否即时发送提醒 (0:不发送 1:发送)',
`flag` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '微信通知标记 (0:未通知 1:已通知)',
`reason` text NOT NULL COMMENT '终止理由',
`reason_user_id` char(32) NOT NULL DEFAULT '' COMMENT '终止人员ID',
`reason_user` varchar(54) NOT NULL DEFAULT '' COMMENT '终止人员名称',
`reason_time` bigint(13) unsigned NOT NULL DEFAULT '0' COMMENT '提前终止时间',
`publish_time` bigint(13) unsigned NOT NULL DEFAULT '0' COMMENT '发布时间',
`exam_status` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '状态,0=初始化 1=草稿,2=已发布 3=终止',
`cate_status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '分类状态,0=禁用,1=已开启',
`corn_stop` char(32) DEFAULT '' COMMENT '定时提前终止cornid',
`corn_exam` char(32) DEFAULT '' COMMENT '试卷定时任务',
`last_time` bigint(13) unsigned NOT NULL DEFAULT '0' COMMENT '最后更新时间',
`marking_type` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '阅卷类型,(1:自动阅卷 ,2:手动阅卷)',
`is_upset_topic` tinyint(1) unsigned NOT NULL DEFAULT '2' COMMENT '是否打乱题目:(1:是 2: 否[默认])',
`is_upset_option` tinyint(1) unsigned NOT NULL DEFAULT '2' COMMENT '是否打乱选项:(1:是 2: 否[默认])',
`is_see_after_submit` tinyint(1) unsigned NOT NULL DEFAULT '3' COMMENT '交卷后可见性设置:(0:全部不可见 1:得分可见,2:对错可见,3:解析可见[默认])',
`is_see_after_over` tinyint(1) unsigned NOT NULL DEFAULT '3' COMMENT '考试结束后可见性设置:(0:全部不可见 1:得分可见,2:对错可见,3:解析可见[默认])',
`is_open_anonymous_marking` tinyint(1) unsigned NOT NULL DEFAULT '2' COMMENT '是否开启匿名阅卷:(1:开启 2:不开启[默认])',
`is_open_makeup` tinyint(1) unsigned NOT NULL DEFAULT '2' COMMENT '是否开启补考功能:(1:开启 2:不开启[默认])',
`makeup_num` tinyint(2) unsigned NOT NULL DEFAULT '1' COMMENT '补考限制次数:默认1',
`makeup_start_time` bigint(13) unsigned NOT NULL DEFAULT '0' COMMENT '补考开始时间',
`makeup_end_time` bigint(13) unsigned NOT NULL DEFAULT '0' COMMENT '补考结束时间',
`is_old` tinyint(1) DEFAULT '1' COMMENT '数据类型 :1旧数据 2新数据',
`corn_create_exam` char(32) NOT NULL DEFAULT '' COMMENT '自动创建考卷的cornid',
`integral_action_type` tinyint(3) NOT NULL DEFAULT '1' COMMENT '积分策略(1:启用默认,2:不启用,3:启用自定义策略)',
`integral_strategyid` varchar(255) NOT NULL DEFAULT '' COMMENT '积分策略ID集合(逗号分隔)',
`credit_action_type` tinyint(3) NOT NULL DEFAULT '1' COMMENT '学分策略(1:启用默认,2:不启用,3:启用自定义策略)',
`credit_strategyid` varchar(255) NOT NULL DEFAULT '' COMMENT '学分策略ID集合(逗号分隔)',
`cron_statistics` char(32) NOT NULL DEFAULT '' COMMENT '考试统计cornid',
`cron_send_msg` char(32) NOT NULL DEFAULT '' COMMENT '考试分批推送消息cornid',
`cron_rank_id` char(32) NOT NULL DEFAULT '' COMMENT '考试排名列表接口定时更新cornid',
`advanced_choose` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '是否高级抽取:(1:是 2: 否)',
`domain` varchar(32) NOT NULL DEFAULT '' COMMENT '企业域名',
`status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '状态, 1=初始化,2=已更新,3=已删除',
`created` bigint(13) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`updated` bigint(13) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
`deleted` bigint(13) unsigned NOT NULL DEFAULT '0' COMMENT '删除时间',
PRIMARY KEY (`ep_id`),
KEY `ec_id` (`ec_id`),
KEY `domain_status` (`domain`,`status`),
KEY `exam_type` (`exam_type`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='试卷表';
CREATE TABLE IF NOT EXISTS `oa_exam_paper_temp` (
`epd_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
`ep_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '试卷id',
`et_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '题目Id',
`score` decimal(18,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '分数',
`order_num` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '序号',
`domain` varchar(32) NOT NULL DEFAULT '' COMMENT '企业域名',
`status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '状态, 1=初始化,2=已更新,3=已删除',
`created` bigint(13) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`updated` bigint(13) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
`deleted` bigint(13) unsigned NOT NULL DEFAULT '0' COMMENT '删除时间',
PRIMARY KEY (`epd_id`),
KEY `domain_status` (`domain`,`status`),
KEY `ep_id` (`ep_id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='试卷临时备选题目储存表';
CREATE TABLE IF NOT EXISTS `oa_exam_right` (
`er_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
`epc_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '试卷ID或者分类ID',
`er_type` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '权限类型(0:试卷权限,1:分类权限,2:激励权限,3:阅卷权限)',
`source_type` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '权限来源(1:选择[默认],2:导入[只有人员会存在导入])',
`uid` char(32) NOT NULL DEFAULT '' COMMENT '人员 ID',
`cd_id` char(32) NOT NULL DEFAULT '' COMMENT '部门 ID',
`tag_id` char(32) NOT NULL DEFAULT '' COMMENT '标签 ID',
`job_id` char(32) NOT NULL DEFAULT '' COMMENT '岗位 ID',
`role_id` char(32) NOT NULL DEFAULT '' COMMENT '角色 ID',
`domain` varchar(32) NOT NULL DEFAULT '' COMMENT '企业域名',
`status` tinyint(3) unsigned NOT NULL DEFAULT '1' COMMENT '状态, 1=初始化,2=已更新,3=已删除',
`created` bigint(13) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`updated` bigint(13) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
`deleted` bigint(13) unsigned NOT NULL DEFAULT '0' COMMENT '删除时间',
PRIMARY KEY (`er_id`),
KEY `epc_id_er_type` (`epc_id`,`er_type`),
KEY `domain_status` (`domain`,`status`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='试卷 - 权限表';
CREATE TABLE IF NOT EXISTS `oa_exam_setting` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增 ID',
`key` varchar(255) NOT NULL DEFAULT '' COMMENT '变量名',
`value` text NOT NULL COMMENT '值',
`type` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '缓存类型, 0:非数组, 1:数组',
`comment` text NOT NULL COMMENT '说明',
`domain` varchar(32) NOT NULL DEFAULT '' COMMENT '企业域名',
`status` tinyint(3) unsigned NOT NULL DEFAULT '1' COMMENT '状态, 1=初始化,2=已更新,3=已删除',
`created` bigint(13) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`updated` bigint(13) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
`deleted` bigint(13) unsigned NOT NULL DEFAULT '0' COMMENT '删除时间',
PRIMARY KEY (`id`),
KEY `domain_status` (`domain`,`status`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='考试设置表';
CREATE TABLE IF NOT EXISTS `oa_exam_snapshot` (
`es_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
`ep_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '试卷id',
`et_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '题目id',
`et_type` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '题目类型(1:单选题 2:判断题 3:问答题 4:多选题,5:语音题)',
`title` text NOT NULL COMMENT '题目名称',
`title_pic` text NOT NULL COMMENT '题目图片(逗号分割)',
`score` decimal(18,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '分数',
`options` text COMMENT '选项(序列化:选项名称,选项值,图片ID)',
`answer` text NOT NULL COMMENT '正确答案(多选用逗号分隔)',
`answer_resolve` text NOT NULL COMMENT '答案解析',
`answer_coverage` varchar(50) NOT NULL DEFAULT '' COMMENT '答案覆盖率(问答题)',
`match_type` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '是否匹配关键字(0:否 1:是)',
`answer_keyword` text NOT NULL COMMENT '答案关键字(序列化:关键字,百分比)',
`order_num` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '序号',
`domain` varchar(32) NOT NULL DEFAULT '' COMMENT '企业域名',
`status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '状态, 1=初始化,2=已更新,3=已删除',
`created` bigint(13) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`updated` bigint(13) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
`deleted` bigint(13) unsigned NOT NULL DEFAULT '0' COMMENT '删除时间',
PRIMARY KEY (`es_id`),
KEY `domain_status` (`domain`,`status`),
KEY `ep_id` (`ep_id`),
KEY `et_id` (`et_id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='考试-试卷快照表';
CREATE TABLE IF NOT EXISTS `oa_exam_syscache` (
`name` varchar(255) NOT NULL COMMENT '缓存文件名',
`domain` varchar(120) NOT NULL DEFAULT '' COMMENT '企业域名',
`type` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '缓存类型, 0:非数组, 1:数组',
`data` mediumblob NOT NULL COMMENT '数据',
`status` tinyint(3) unsigned NOT NULL DEFAULT '1' COMMENT '记录状态, 1初始化,2=已更新, 3=已删除',
`created` bigint(13) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`updated` bigint(13) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
`deleted` bigint(13) unsigned NOT NULL DEFAULT '0' COMMENT '删除时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='考试 - 缓存表';
CREATE TABLE IF NOT EXISTS `oa_exam_tag` (
`etag_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键(标签ID)',
`tag_name` varchar(200) NOT NULL DEFAULT '' COMMENT '标签名称',
`tag_type` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '标签类型(0:手动添加 1:关联导入)',
`domain` varchar(32) NOT NULL DEFAULT '' COMMENT '企业域名',
`status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '状态, 1=初始化,2=已更新,3=已删除',
`created` bigint(13) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`updated` bigint(13) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
`deleted` bigint(13) unsigned NOT NULL DEFAULT '0' COMMENT '删除时间',
PRIMARY KEY (`etag_id`),
KEY `domain_status` (`domain`,`status`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='考试-标签信息表';
CREATE TABLE IF NOT EXISTS `oa_exam_topic` (
`et_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
`eb_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '题库id',
`et_type` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '题目类型(1:单选题 2:判断题 3:问答题 4:多选题 5:语音题)',
`title` text NOT NULL COMMENT '题目名称',
`title_pic` text NOT NULL COMMENT '题目图片(逗号分割)',
`score` decimal(18,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '分数',
`options` text COMMENT '选项(序列化:选项名称,选项值,图片ID)',
`answer` text NOT NULL COMMENT '正确答案(多选用逗号分隔)',
`answer_resolve` text NOT NULL COMMENT '答案解析',
`use_num` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '题目使用次数',
`answer_coverage` varchar(50) NOT NULL DEFAULT '' COMMENT '答案覆盖率(问答题)',
`match_type` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '是否匹配关键字(0:否 1:是)',
`answer_keyword` text NOT NULL COMMENT '答案关键字(序列化:关键字,百分比)',
`order_num` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '序号(越小越靠前)',
`domain` varchar(32) NOT NULL DEFAULT '' COMMENT '企业域名',
`status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '状态, 1=初始化,2=已更新,3=已删除',
`created` bigint(13) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`updated` bigint(13) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
`deleted` bigint(13) unsigned NOT NULL DEFAULT '0' COMMENT '删除时间',
PRIMARY KEY (`et_id`),
KEY `domain_status` (`domain`,`status`),
KEY `eb_id` (`eb_id`),
KEY `et_type` (`et_type`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='考试-题目表';
CREATE TABLE IF NOT EXISTS `oa_exam_topic_attr` (
`eta_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
`etag_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '标签ID',
`attr_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '属性ID',
`eb_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '题目所属题库ID',
`et_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '题目ID',
`domain` varchar(32) NOT NULL DEFAULT '' COMMENT '企业域名',
`status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '状态, 1=初始化,2=已更新,3=已删除',
`created` bigint(13) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`updated` bigint(13) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
`deleted` bigint(13) unsigned NOT NULL DEFAULT '0' COMMENT '删除时间',
PRIMARY KEY (`eta_id`),
KEY `attr_et_id` (`attr_id`,`et_id`),
KEY `domain_status` (`domain`,`status`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='考试-题目属性关联表';
CREATE TABLE IF NOT EXISTS `oa_exam_statistics` (
`es_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '统计主键',
`ep_id` int(10) DEFAULT '0' COMMENT '试卷id',
`paper_type` tinyint(1) DEFAULT '0' COMMENT '试卷使用类型(0:测评试卷,1:模拟试卷)',
`ep_type` tinyint(1) DEFAULT '0' COMMENT '试卷类型(1:自主选题 2:规则抽题 3:随机抽题)',
`esr_id` int(11) DEFAULT '0' COMMENT '随机题库ID或者oa_exam_snapshot表的主键',
`et_type` tinyint(3) DEFAULT '0' COMMENT '题目类型(1:单选题 2:判断题 3:问答题 4:多选题,5:语音题)',
`answer_num` int(11) DEFAULT '0' COMMENT '答题人数',
`answer_total` int(11) DEFAULT '0' COMMENT '题目使用总数',
`options` text COMMENT '答案统计,序列化答案统计数 如:a:2:{s:1:\"A\";i:12;s:1:\"B\";i:13;',
`right_num` int(11) DEFAULT '0' COMMENT '答对题数',
`domain` varchar(32) NOT NULL DEFAULT '' COMMENT '企业域名',
`status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '状态, 1=初始化,2=已更新,3=已删除',
`created` bigint(13) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`updated` bigint(13) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
`deleted` bigint(13) unsigned NOT NULL DEFAULT '0' COMMENT '删除时间',
PRIMARY KEY (`es_id`),
KEY `domain_status` (`domain`,`status`),
KEY `ep_id` (`ep_id`),
KEY `paper_type` (`paper_type`),
KEY `et_type` (`et_type`),
KEY `esr_id` (`esr_id`),
KEY `ep_type` (`ep_type`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='考试分数统计';
CREATE TABLE IF NOT EXISTS `oa_exam_random_snapshot` (
`er_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
`ep_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '试卷id',
`eb_id` int(11) DEFAULT '0' COMMENT '题库ID',
`et_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '题目id',
`et_type` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '题目类型(1:单选题 2:判断题 3:问答题 4:多选题,5:语音题)',
`title` text NOT NULL COMMENT '题目名称',
`title_pic` text NOT NULL COMMENT '题目图片(逗号分割)',
`score` decimal(18,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '分数',
`options` text COMMENT '选项(序列化:选项名称,选项值,图片ID)',
`answer` text NOT NULL COMMENT '正确答案(多选用逗号分隔)',
`answer_resolve` text NOT NULL COMMENT '答案解析',
`answer_coverage` varchar(50) NOT NULL DEFAULT '' COMMENT '答案覆盖率(问答题)',
`match_type` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '是否匹配关键字(0:否 1:是)',
`answer_keyword` text NOT NULL COMMENT '答案关键字(序列化:关键字,百分比)',
`order_num` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '序号',
`domain` varchar(32) NOT NULL DEFAULT '' COMMENT '企业域名',
`status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '状态, 1=初始化,2=已更新,3=已删除',
`created` bigint(13) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`updated` bigint(13) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
`deleted` bigint(13) unsigned NOT NULL DEFAULT '0' COMMENT '删除时间',
PRIMARY KEY (`er_id`),
KEY `domain_status` (`domain`,`status`),
KEY `ep_id` (`ep_id`),
KEY `eb_id` (`eb_id`),
KEY `et_id` (`et_id`),
KEY `et_type` (`et_type`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='考试-随机试卷库快照表';
CREATE TABLE IF NOT EXISTS `oa_exam_answer_temp` (
`eat_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
`ep_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '试卷id',
`domain` varchar(32) NOT NULL DEFAULT '' COMMENT '企业域名',
`status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '状态, 1=初始化,2=已更新,3=已删除',
`created` bigint(13) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`updated` bigint(13) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
`deleted` bigint(13) unsigned NOT NULL DEFAULT '0' COMMENT '删除时间',
PRIMARY KEY (`eat_id`),
KEY `domain_status` (`domain`,`status`),
KEY `ep_id` (`ep_id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='考试-随机答卷临时表';
CREATE TABLE IF NOT EXISTS `oa_exam_answer_detail_temp` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
`eat_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '随机答卷id',
`er_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '随机试卷库快照表id',
`ep_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '试卷id',
`et_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '题目id',
`et_type` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '题目类型(1:单选题 2:判断题 3:问答题 4:多选题,5:语音题)',
`title` text NOT NULL COMMENT '题目名称',
`title_pic` text NOT NULL COMMENT '题目图片(逗号分割)',
`score` decimal(18,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '分数',
`options` text COMMENT '选项(序列化:选项名称,选项值,图片ID)',
`answer` text NOT NULL COMMENT '正确答案(多选用逗号分隔)',
`answer_resolve` text NOT NULL COMMENT '答案解析',
`answer_coverage` varchar(50) NOT NULL DEFAULT '' COMMENT '答案覆盖率(问答题)',
`match_type` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '是否匹配关键字(0:否 1:是)',
`answer_keyword` text NOT NULL COMMENT '答案关键字(序列化:关键字,百分比)',
`order_num` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '序号',
`domain` varchar(32) NOT NULL DEFAULT '' COMMENT '企业域名',
`status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '状态, 1=初始化,2=已更新,3=已删除',
`created` bigint(13) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`updated` bigint(13) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
`deleted` bigint(13) unsigned NOT NULL DEFAULT '0' COMMENT '删除时间',
PRIMARY KEY (`id`),
KEY `domain_status` (`domain`,`status`),
KEY `eat_id` (`eat_id`),
KEY `ep_id` (`ep_id`),
KEY `et_id` (`et_id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='考试-随机答卷详情临时表';
CREATE TABLE IF NOT EXISTS `oa_exam_count` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
`uid` char(32) NOT NULL DEFAULT '' COMMENT '用户ID',
`num` int(10) NOT NULL DEFAULT '0' COMMENT '通过次数',
`paper_type` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '考试类型(0:测评,1:模拟)',
`domain` varchar(32) NOT NULL DEFAULT '' COMMENT '企业域名',
`status` tinyint(3) NOT NULL DEFAULT '1' COMMENT '状态=1.初始化,2.更新,3删除',
`created` bigint(13) NOT NULL DEFAULT '0' COMMENT '创建时间',
`updated` bigint(13) NOT NULL DEFAULT '0' COMMENT '更新时间',
`deleted` bigint(13) NOT NULL DEFAULT '0' COMMENT '删除时间',
PRIMARY KEY (`id`),
KEY `domain_status` (`domain`,`status`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='用户参加考试通过次数统计表';
CREATE TABLE IF NOT EXISTS `oa_exam_answer_detail_extend` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键id',
`ep_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '试卷id',
`et_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '题目id',
`et_option` text COMMENT '选项序列化(选项名称,选项值,图片ID)',
`et_detail` text NOT NULL COMMENT '题目详情序列化',
`domain` varchar(32) NOT NULL DEFAULT '' COMMENT '企业域名',
`status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '状态, 1=初始化,2=已更新,3=已删除',
`created` bigint(13) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`updated` bigint(13) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
`deleted` bigint(13) unsigned NOT NULL DEFAULT '0' COMMENT '删除时间',
PRIMARY KEY (`id`),
KEY `ep_id` (`ep_id`),
KEY `et_id` (`et_id`),
KEY `domain_status` (`domain`,`status`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='考试-答卷详情表题目信息表';
";