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
| CREATE TABLE `edu_article` ( `article_id` int(11) not null auto_increment comment '文章id', `title` varchar(100) default null comment '文章标题', `summary` varchar(200) default null comment '文章摘要', `key_word` varchar(50) default null comment '文章关键字', `image_url` varchar(100) default null comment '文章图片url', `source` varchar(50) default null comment '文章来源', `author` varchar(10) default null comment '文章作者', `create_time` datetime null default null comment '文章创建时间', `publish_time` datetime null default null comment '文章发布时间', `link` varchar(100) default null comment '文章访问链接', `article_type` tinyint(4) default '0' comment '文章类型 2文章', `click_num` int(11) default '0' comment '文章点击量', `praise_count` int(11) default '0' comment '点赞数量', `comment_num` int(11) default '0' comment '评论数', `sort` int(11) default '0' comment '排序值', primary key (`article_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='文章信息表';
CREATE TABLE `edu_article_content` ( `article_id` int(11) default '0' comment '文章id', `content` text comment '文章内容' ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='文章内容表';
CREATE TABLE `edu_comment` ( `comment_id` int(11) not null auto_increment comment '评论表', `user_id` int(11) default '0' comment '用户id', `p_comment_id` int(11) default null comment '父级评论id(为0则是一级评论,不为0则是回复)', `content` varchar(1000) default null comment '评论内容', `addtime` datetime default null comment '创建时间', `other_id` int(11) default null comment '评论的相关id', `praise_count` int(11) default '0' comment '点赞数量', `reply_count` int(11) default '0' comment '回复数量', `type` int(11) default '0' comment '1文章 2课程', primary key (`comment_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ;
CREATE TABLE `edu_course` ( `course_id` int(10) not null auto_increment comment '课程编号', `course_name` varchar(300) not null default '' comment '课程名称', `is_avaliable` int(10) not null default '0' comment '1正常2删除', `subject_id` int(11) default '0' comment '课程专业id', `subject_link` varchar(255) default null comment '课程专业链', `add_time` timestamp null default null comment '添加时间', `source_price` decimal(10,2) not null default '0.00' comment '课程原价格(只显示)', `current_price` decimal(10,2) not null default '0.00' comment '课程销售价格(实际支付价格)设置为0则可免费观看', `title` varchar(200) not null default '' comment '课程简介', `context` longtext not null comment '课程详情', `lession_num` int(11) not null default '0' comment '总课时', `logo` varchar(200) not null default '' comment '图片路径', `update_time` datetime null default null comment '最后更新时间', `page_buycount` int(11) default '0' comment '销售数量', `page_viewcount` int(11) not null default '0' comment '浏览数量', `end_time` timestamp null default null comment '有效结束时间', `losetype` int(2) default '0' comment '有效期类型,0:到期时间,1:按天数', `lose_time` varchar(255) default null comment '有效期:商品订单过期时间点', `sequence` int(1) default '0' comment '序列', `course_gross_income` decimal(10,2) default '0.00' comment '该课程总共卖了多少钱(新加字段暂时没用到)', primary key (`course_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='课程表';
CREATE TABLE `edu_course_favorites` ( `id` int(11) not null auto_increment comment '主键', `course_id` int(11) default '0' comment '课程id', `user_id` int(11) default '0' comment '用户id', `add_time` timestamp null default null comment '创建时间', primary key (`id`), key `user_id` (`user_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='收藏';
CREATE TABLE `edu_course_kpoint` ( `kpoint_id` int(11) unsigned not null auto_increment, `course_id` int(11) default '0' comment '课程id', `name` varchar(300) default null comment '节点名称', `parent_id` int(11) default '0' comment '父级id', `add_time` datetime default null comment '添加时间', `sort` int(11) default '0' comment '显示排序', `play_count` int(11) default '0' comment '播放次数', `is_free` tinyint(1) default '0' comment '是否可以试听1免费2收费', `video_url` varchar(500) default null comment '视频地址', `teacher_id` int(11) default '0' comment '讲师id', `play_time` varchar(100) default '' comment '播放时间', `kpoint_type` int(1) default '0' comment '节点类型 0文件目录 1视频', `video_type` varchar(30) default null comment '视频类型', `file_type` varchar(20) default null comment 'video视频 audio音频 file文档 txt文本 atlas图片集', `content` longtext comment '文本', primary key (`kpoint_id`), key `course_id` (`course_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='知识点的基本信息';
CREATE TABLE `edu_course_note` ( `id` int(11) not null auto_increment comment '主键', `user_id` int(11) default '0' comment '用户id', `course_id` int(11) not null default '0' comment '课程id', `kpoint_id` int(11) not null default '0' comment '节点id', `content` longtext not null comment '笔记信息', `update_time` datetime not null comment '修改时间', `status` tinyint(4) not null default '0' comment '0公开1隐藏', primary key (`id`), key `cus_id` (`kpoint_id`), key `point_id` (`course_id`), key `user_id` (`user_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='笔记信息';
CREATE TABLE `edu_course_studyhistory` ( `id` int(11) not null auto_increment, `user_id` int(11) not null comment '用户id', `course_id` int(11) not null comment '课程id', `kpoint_id` int(11) not null comment '节点id', `playercount` int(11) not null default '0' comment '观看次数,累加', `course_name` varchar(50) default null comment '课程名称', `kpoint_name` varchar(50) default null comment '节点名称', `databack` text comment 'playercount小于20时记录,备注观看的时间,叠加', `update_time` datetime not null comment '最后观看时间', primary key (`id`), key `user_course_id` (`user_id`,`course_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='课程播放记录(学习记录)';
CREATE TABLE `edu_course_subject` ( `id` int(10) unsigned not null auto_increment, `course_id` int(11) not null default '0' comment '课程id', `subject_id` int(11) not null default '0' comment '分类id', primary key (`id`), unique key `course_subject` (`course_id`,`subject_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ;
CREATE TABLE `edu_course_teacher` ( `course_id` int(11) default null comment '课程id', `teacher_id` int(11) default null comment '讲师id', key `course_id` (`course_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='课程讲师关联';
CREATE TABLE `edu_emailsend_history` ( `id` int(10) unsigned not null auto_increment, `email` longtext, `user_id` int(11) default '0', `title` varchar(300) default '' comment '邮箱标题', `content` text comment '邮箱正文', `create_time` datetime default '0000-00-00 00:00:00', `send_time` datetime default '0000-00-00 00:00:00' comment '定时发送时间', `status` tinyint(3) default '1' comment '1 已发送 2 未发送', `type` tinyint(3) default '1' comment '1 普通 2 定时', primary key (`id`), key `type` (`type`), key `status` (`status`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='邮件发送记录';
CREATE TABLE `edu_mobilesend_history` ( `id` int(10) unsigned not null auto_increment, `mobile` text, `user_id` int(11) default null, `content` text, `create_time` datetime default null, `send_time` datetime default null comment '定时发送时间', `status` tinyint(3) default '1' comment '1 已发送 2 未发送', `type` tinyint(3) default '1' comment '1 正常 2 定时', primary key (`id`), key `type` (`type`), key `status` (`status`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='手机短信发送记录';
CREATE TABLE `edu_msg_receive` ( `id` int(11) not null auto_increment comment '主键', `add_time` timestamp null default null comment '添加时间', `cus_id` int(11) default '0' comment '发信人用户id', `update_time` timestamp null default null on update current_timestamp comment '修改时间', `content` text comment '信内容', `type` tinyint(3) default '0' comment '类型1系统通知2站内信', `status` tinyint(3) default '0' comment '0未读1已读2接受3拒绝4黑名单', `receiving_cusid` int(11) default '0' comment '收信人id', `group_id` int(11) default '0' comment '申请加入群同意之后所需要的字段', `showname` varchar(50) not null default '' comment '会员名', primary key (`id`), key `cus_id` (`cus_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='站内信';
CREATE TABLE `edu_msg_system` ( `id` int(11) not null auto_increment comment '主键', `add_time` timestamp null default null comment '添加时间', `update_time` timestamp null default null on update current_timestamp comment '修改时间', `content` text comment '信内容', `status` tinyint(3) default '0' comment '0正常1删除2过期', primary key (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='系统消息';
CREATE TABLE `edu_praise` ( `id` int(11) not null auto_increment comment '主键id', `user_id` int(11) default null comment '用户id', `target_id` int(11) default null comment '点赞的对象id', `type` int(11) default null comment '点赞类型 1问答点赞 2问答评论点赞 3 文章点赞数4 评论点赞', `add_time` datetime default null comment '添加时间', primary key (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='所有的点赞表';
CREATE TABLE `edu_questions` ( `id` int(11) not null auto_increment comment '主键', `cus_id` int(11) default null comment '创建人id', `title` varchar(100) default null comment '问答标题', `content` text comment '问答内容', `type` int(1) default null comment '分类 1课程问答 2 学习分享', `status` int(1) default '0' comment '状态 0可回复1不可回复(采纳最佳答案后改为1 )', `reply_count` int(11) default '0' comment '问答回复数量', `browse_count` int(11) default '0' comment '问答浏览次数', `praise_count` int(11) default '0' comment '问答点赞数量', `add_time` datetime default null comment '添加时间', primary key (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='问答';
CREATE TABLE `edu_questions_comment` ( `id` int(11) not null auto_increment comment '主键id', `cus_id` int(11) default null comment '评论人id', `question_id` int(11) default null comment '问答id', `content` varchar(300) default null comment '评论内容', `is_best` int(1) default null comment '是否最佳答案 0否1是', `reply_count` int(11) default '0' comment '回复数量', `praise_count` int(11) default '0' comment '点赞数', `add_time` datetime default null comment '回复时间', `comment_id` int(11) default '0' comment '父级评论id', primary key (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='问答评论';
CREATE TABLE `edu_questions_tag` ( `questions_tag_id` int(11) not null auto_increment comment '主键id', `questions_tag_name` varchar(45) default null comment '标签名', `status` int(1) default null comment '状态0默认1删除', `create_time` datetime default null comment '创建时间', `parent_id` varchar(45) default null comment '父级id', primary key (`questions_tag_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='问答标签';
CREATE TABLE `edu_questions_tag_relation` ( `id` int(11) not null auto_increment comment 'id', `questions_id` int(11) default null comment '问答id', `questions_tag_id` int(11) default null comment '问答标签id', primary key (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ;
CREATE TABLE `edu_statistics_computer` ( `id` int(11) not null auto_increment, `statistics_time` datetime not null comment '统计日期', `cpu_usage` varchar(20) not null comment 'cpu使用率', `memory_usage` varchar(20) not null comment '内存使用率', `net_usage` varchar(20) not null comment '网络使用率', primary key (`id`), key `statistics_time` (`statistics_time`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='网站统计cpu、磁盘、网络带宽使用率';
CREATE TABLE `edu_statistics_day` ( `id` int(11) not null auto_increment, `statistics_time` datetime not null comment '统计日期', `login_num` int(11) not null default '0' comment '登录人数(活跃人数 )', `create_time` datetime not null comment '生成时间', `registered_num` int(11) not null comment '注册人数', `video_viewing_num` int(11) not null default '0' comment '每日播放视频数', `daily_user_number` int(11) default '0' comment '每日用户数', `daily_course_number` int(11) default '0' comment '每日课程数', primary key (`id`), key `statistics_time` (`statistics_time`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='网站统计日数据';
CREATE TABLE `edu_teacher` ( `id` int(11) unsigned not null auto_increment comment '教师id', `name` varchar(12) not null default '' comment '教师名称', `education` varchar(200) not null default '' comment '教师资历,一句话说明老师', `career` text not null comment '教师简介', `is_star` tinyint(1) not null default '0' comment '头衔 1高级讲师2首席讲师', `pic_path` varchar(200) not null default '' comment '图片路径', `status` tinyint(3) not null default '0' comment '状态:0正常1删除', `create_time` datetime default null comment '创建时间', `update_time` datetime default null comment '更新时间', `subject_id` int(11) default '0' comment '专业id', `sort` int(11) default '0' comment '排序', primary key (`id`), key `name` (`name`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='讲师';
CREATE TABLE `edu_user_login_log` ( `log_id` int(11) not null auto_increment, `login_time` timestamp null default null comment '登录时间', `ip` varchar(20) default null comment '登录ip', `user_id` int(11) default '0' comment '用户id', `os_name` varchar(50) default null comment '操作系统', `user_agent` varchar(50) default null comment '浏览器', primary key (`log_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `edu_website_course` ( `id` int(11) not null auto_increment, `name` varchar(100) default '' comment '推荐模块名称', `link` varchar(255) default '' comment '点击更多链接', `description` varchar(255) default '' comment '说明', `coursenum` int(11) default '0' comment '推荐课程限制数量', primary key (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='网站课程推荐分类';
CREATE TABLE `edu_website_course_detail` ( `id` int(11) not null auto_increment comment '主键', `recommend_id` int(11) default '0' comment '推荐分类的id', `course_id` int(11) default '0' comment '课程id', `order_num` int(11) default '0' comment '课程显示排序', primary key (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='推荐课程表';
CREATE TABLE `edu_website_ehcache` ( `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键', `ehcache_key` varchar(200) NOT NULL DEFAULT '' COMMENT 'ehcache key', `ehcache_desc` varchar(200) NOT NULL DEFAULT '' COMMENT '描述', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `edu_website_images` ( `image_id` int(11) not null auto_increment, `image_url` varchar(200) not null default '' comment '图片地址', `link_address` varchar(255) default null comment '图链接地址', `title` varchar(255) default null comment '图标题', `type_id` int(11) default '0' comment '图片类型', `series_number` int(11) default '0' comment '序列号', `preview_url` varchar(255) default null comment '略缩图片地址', `color` varchar(255) default '' comment '背景色', `describe` varchar(600) default '' comment '图片描述', primary key (`image_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='banner图管理';
CREATE TABLE `edu_website_images_type` ( `type_id` int(11) not null auto_increment comment '类型id', `type_name` varchar(50) default null comment '类型名', primary key (`type_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='图片类型表';
CREATE TABLE `edu_website_navigate` ( `id` int(11) unsigned not null auto_increment comment 'id', `name` varchar(100) not null default '' comment '导航显示名称', `url` varchar(100) not null default '' comment '导航显示位置', `newpage` tinyint(3) not null default '0' comment '是否在新页面打开0是1否', `type` varchar(50) not null default '' comment '类型:index首页、user个人中心、friendlink尾部友链、tab尾部标签', `ordernum` int(11) not null default '0' comment '显示排序', `status` tinyint(3) not null default '0' comment '0正常1冻结', primary key (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='导航表';
CREATE TABLE `edu_website_profile` ( `id` int(10) unsigned not null auto_increment, `type` varchar(20) not null default '' comment '类型', `desciption` text comment '内容json格式', `explain` varchar(50) default '' comment '说明', primary key (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
CREATE TABLE `edu_subject` ( `subject_id` int(11) not null auto_increment comment '主键', `subject_name` varchar(50) not null default '' comment '专业名称', `status` tinyint(1) not null default '0' comment '状态 0:默认 1:删除', `create_time` datetime default null comment '创建时间', `parent_id` int(11) default '0' comment '父id', `sort` int(11) default '0' comment '排序字段', primary key (`subject_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='专业信息';
|