structure.php
5.83 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
<?php
/**
* 应用的数据表结构文件
* structure.php
* $Author$
*/
return "
CREATE TABLE IF NOT EXISTS `oa_teacher_syscache` (
`syscache_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键自增id',
`name` varchar(255) NOT NULL DEFAULT '' COMMENT '缓存文件名',
`type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '缓存类型:0=非数组,1=数组',
`data` mediumblob NOT NULL COMMENT '数据',
`domain` char(32) NOT NULL DEFAULT '' COMMENT '企业域名',
`status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '数据状态(1=新创建;2=已更新;3=已删除)',
`created` bigint(20) NOT NULL DEFAULT '0' COMMENT '创建时间',
`updated` bigint(20) NOT NULL DEFAULT '0' COMMENT '更新时间',
`deleted` bigint(20) NOT NULL DEFAULT '0' COMMENT '删除时间',
PRIMARY KEY (`syscache_id`),
KEY `name` (`name`) USING BTREE,
KEY `domain` (`domain`) USING BTREE,
KEY `status` (`status`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='系统缓存';
CREATE TABLE IF NOT EXISTS `oa_teacher_setting` (
`setting_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`key` varchar(255) NOT NULL DEFAULT '' COMMENT '变量名',
`value` text NOT NULL COMMENT '变量值',
`type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '缓存类型:0=非数组; 1=数组',
`comment` text NOT NULL COMMENT '说明',
`domain` char(32) NOT NULL DEFAULT '' COMMENT '企业域名',
`status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '数据状态(1=新创建;2=已更新;3=已删除)',
`created` bigint(20) NOT NULL DEFAULT '0' COMMENT '创建时间',
`updated` bigint(20) NOT NULL DEFAULT '0' COMMENT '更新时间',
`deleted` bigint(20) NOT NULL DEFAULT '0' COMMENT '删除时间',
PRIMARY KEY (`setting_id`),
KEY `key` (`key`) USING BTREE,
KEY `domain` (`domain`) USING BTREE,
KEY `status` (`status`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='系统配置表';
CREATE TABLE IF NOT EXISTS `oa_teacher_teacher` (
`teacher_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`teacher_type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '讲师类型(1=内部讲师;2=外部讲师)',
`uid` char(32) NOT NULL DEFAULT '' COMMENT '内部讲师UID',
`teacher_name` varchar(64) NOT NULL DEFAULT '' COMMENT '讲师姓名',
`face_id` char(32) NOT NULL DEFAULT '' COMMENT '头像ID',
`face_url` varchar(500) NOT NULL DEFAULT '' COMMENT '头像url',
`title_id` int(10) NOT NULL DEFAULT '0' COMMENT '头衔ID',
`tags` varchar(50) NOT NULL DEFAULT '' COMMENT '讲师标签',
`source` varchar(64) NOT NULL DEFAULT '' COMMENT '讲师来源',
`remark` text NOT NULL COMMENT '讲师介绍',
`teacher_status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '讲师状态(1=正常;2=禁用)',
`domain` char(32) NOT NULL DEFAULT '' COMMENT '企业域名',
`status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '数据状态(1=新创建;2=已更新;3=已删除)',
`created` bigint(20) NOT NULL DEFAULT '0' COMMENT '创建时间',
`updated` bigint(20) NOT NULL DEFAULT '0' COMMENT '更新时间',
`deleted` bigint(20) NOT NULL DEFAULT '0' COMMENT '删除时间',
PRIMARY KEY (`teacher_id`),
KEY `domain` (`domain`) USING BTREE,
KEY `status` (`status`) USING BTREE,
KEY `title_id` (`title_id`) USING BTREE,
KEY `uid` (`uid`) USING BTREE,
KEY `teacher_type` (`teacher_type`) USING BTREE,
KEY `teacher_status` (`teacher_status`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='讲师主表';
CREATE TABLE IF NOT EXISTS `oa_teacher_task` (
`task_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`teacher_id` int(10) NOT NULL DEFAULT '0' COMMENT '讲师ID',
`task_name` varchar(64) NOT NULL DEFAULT '' COMMENT '任务名称',
`task_type_id` int(10) NOT NULL DEFAULT '0' COMMENT '任务类型ID',
`start_time` bigint(20) NOT NULL DEFAULT '0' COMMENT '任务开始时间',
`end_time` bigint(20) NOT NULL DEFAULT '0' COMMENT '任务结束时间',
`target` float NOT NULL DEFAULT '0' COMMENT '授课指标(课时)',
`domain` char(32) NOT NULL DEFAULT '' COMMENT '企业域名',
`status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '数据状态(1=新创建;2=已更新;3=已删除)',
`created` bigint(20) NOT NULL DEFAULT '0' COMMENT '创建时间',
`updated` bigint(20) NOT NULL DEFAULT '0' COMMENT '更新时间',
`deleted` bigint(20) NOT NULL DEFAULT '0' COMMENT '删除时间',
PRIMARY KEY (`task_id`),
KEY `domain` (`domain`) USING BTREE,
KEY `status` (`status`) USING BTREE,
KEY `teacher_id` (`teacher_id`) USING BTREE,
KEY `task_type_id` (`task_type_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='授课任务表';
CREATE TABLE IF NOT EXISTS `oa_teacher_content` (
`content_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`app` varchar(20) NOT NULL COMMENT '应用',
`data_type` tinyint(4) NOT NULL COMMENT '数据类型(1=线上课程;2=线下课程)',
`app_data_id` int(11) NOT NULL COMMENT '应用数据ID',
`title` varchar(100) NOT NULL COMMENT '标题',
`cover_url` varchar(500) NOT NULL COMMENT '封面图片URL',
`class_hour` float NOT NULL COMMENT '讲师授课课时',
`teacher_id` int(11) NOT NULL COMMENT '讲师ID',
`teacher_task_id` int(11) NOT NULL COMMENT '讲师授课任务ID',
`domain` char(32) NOT NULL COMMENT '企业域名',
`status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '数据状态(1=新创建;2=已更新;3=已删除)',
`created` bigint(20) NOT NULL DEFAULT '0' COMMENT '创建时间',
`updated` bigint(20) NOT NULL DEFAULT '0' COMMENT '更新时间',
`deleted` bigint(20) NOT NULL DEFAULT '0' COMMENT '删除时间',
PRIMARY KEY (`content_id`),
KEY `app` (`app`),
KEY `app_data_id` (`app_data_id`),
KEY `domain` (`domain`),
KEY `created` (`created`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='讲师授课内容表';
";