数据结构
12120表总览
通用表
- _user
- _user_session
- _role
- _page
- _resource
- _group
- _user_group_role
- _user_group_role_page
- _user_group_role_resource
- _constant
- _constant_ui
- _record
- _record_history
- _cache
- _file
- _view01_user
业务表
_ui
- ui 施工方案
CREATE TABLE `_ui` (`id` int(11) NOT NULL AUTO_INCREMENT,`pageId` varchar(255) DEFAULT NULL COMMENT 'page id; E.g: index',`uiActionType` varchar(255) DEFAULT NULL COMMENT 'ui 动作类型,如:fetchData, postData, changeUi',`uiActionId` varchar(255) DEFAULT NULL COMMENT 'action id; E.g: selectXXXByXXX',`desc` varchar(255) DEFAULT NULL COMMENT '描述',`uiActionConfig` text COMMENT 'ui 动作数据',`appDataSchema` text COMMENT 'ui 校验数据',`operation` varchar(255) DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',`operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者userId',`operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者用户名',`operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00 ',PRIMARY KEY (`id`) USING BTREE) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COMMENT = 'ui 施工方案'
article
CREATE TABLE `article` (`id` int(11) NOT NULL AUTO_INCREMENT,`articleId` bigint(20) DEFAULT NULL COMMENT '文章id, 10000 ++',`categoryId` varchar(255) DEFAULT NULL,`categoryName` varchar(255) DEFAULT NULL,`articleCategoryId` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '分类id',`courseId` varchar(255) DEFAULT NULL COMMENT '课程id',`courseBatchId` varchar(255) DEFAULT NULL,`articleGroupName` varchar(255) CHARACTER SET utf8mb4 DEFAULT '' COMMENT '文章所属分组名',`articleTagList` text CHARACTER SET utf8mb4 COMMENT '标签; 用, 拼接',`articlePublishStatus` varchar(255) CHARACTER SET utf8mb4 DEFAULT '' COMMENT '文章类型(状态):public, login, draft, deleted',`articlePublishTime` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '文章发布时间',`articleTitle` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '标题',`articleShortName` varchar(255) DEFAULT NULL COMMENT '标题简称',`articleConfig` text COMMENT '课件配置:是否考试、时长等',`articleCoverImage` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '封面',`articleContent` longtext CHARACTER SET utf8mb4 COMMENT '内容; 文章内容、考试题目/答案、作业题目/答案、新闻内容',`articleContentForSeo` longtext CHARACTER SET utf8mb4 COMMENT 'HTML 用于渲染',`articleType` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '文章分类:article=文章/exam=考试/assignment=作业/material=资料/news=新闻',`articleAudioUrl` varchar(1023) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '默认音频URL唯一的',`articleVideoUrl` varchar(1023) CHARACTER SET utf8mb4 DEFAULT '' COMMENT '默认视频URL',`articleCreateTime` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '创建时间',`articleCreateUserId` varchar(255) CHARACTER SET utf8mb4 DEFAULT '' COMMENT '创建者用户ID',`articleCreateUsername` varchar(255) CHARACTER SET utf8mb4 DEFAULT '' COMMENT '创建者用户名',`articleUpdateTime` varchar(255) CHARACTER SET utf8mb4 DEFAULT '' COMMENT '更新时间',`articleUpdateUserId` varchar(255) CHARACTER SET utf8mb4 DEFAULT '' COMMENT '更新者用户ID',`articleUpdateUsername` varchar(255) CHARACTER SET utf8mb4 DEFAULT '' COMMENT '更新者用户名',`articlePrice` int(11) DEFAULT '0' COMMENT '价格;',`visitCount` int(11) DEFAULT '0' COMMENT '访问量',`operation` varchar(255) CHARACTER SET utf8mb4 DEFAULT '' COMMENT '操作: insert, update, jhInsert, jhUpdate, jhDelete jhRestore',`operationByUserId` varchar(255) CHARACTER SET utf8mb4 DEFAULT '' COMMENT '操作者userId',`operationByUser` varchar(255) CHARACTER SET utf8mb4 DEFAULT '' COMMENT '操作者用户名',`operationAt` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00',`auditStatus` varchar(255) DEFAULT 'pending' COMMENT '审核状态; pending=未审核,approve=审核通过,reject=审核不通过',`auditByUserId` varchar(255) DEFAULT '' COMMENT '审核人userId;',`auditComment` varchar(255) DEFAULT '' COMMENT '审核意见;',`auditAt` varchar(255) DEFAULT '' COMMENT '审核时间;',`ownerUserId` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '所有者userId',`ownerUserName` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '所有者',PRIMARY KEY (`id`) USING BTREE,UNIQUE KEY `article_unique` (`articleId`) USING BTREE,KEY `categoryId_index` (`articleCategoryId`) USING BTREE,KEY `articlePublishTime` (`articlePublishTime`) USING BTREE) ENGINE = InnoDB AUTO_INCREMENT = 2 DEFAULT CHARSET = utf8
article_history
CREATE TABLE `article_history` (`id` int(11) NOT NULL AUTO_INCREMENT,`articleId` bigint(20) DEFAULT NULL COMMENT '文章id, 10000 ++',`categoryId` varchar(255) DEFAULT NULL COMMENT '分类ID',`categoryName` varchar(255) DEFAULT NULL COMMENT '分类名称',`articleCategoryId` varchar(255) DEFAULT NULL,`courseId` varchar(255) DEFAULT NULL COMMENT '课程id',`courseBatchId` varchar(255) DEFAULT NULL COMMENT '课程id',`articleGroupName` varchar(255) DEFAULT NULL COMMENT '文章所属分组名',`articleTagList` varchar(255) DEFAULT NULL COMMENT '标签; 用, 拼接',`articlePublishStatus` varchar(255) DEFAULT 'login' COMMENT '文章类型(状态):public, login, draft, deleted',`articlePublishTime` varchar(255) DEFAULT NULL COMMENT '文章发布时间',`articleApproveStatus` varchar(255) DEFAULT NULL,`articleTitle` varchar(255) DEFAULT NULL COMMENT '标题',`articleShortName` varchar(255) DEFAULT NULL COMMENT '标题简称',`articleConfig` text,`articleCoverImage` varchar(255) DEFAULT NULL COMMENT '封面',`articleContent` longtext COMMENT '编辑的内容',`articleContentForSeo` longtext COMMENT 'HTML 用于渲染',`articleAssignment` text COMMENT '文章作业 [{ }]',`articleAssignmentWithAnswer` text COMMENT '文章作业答案 [{ }]',`articleAudioUrl` varchar(255) DEFAULT NULL COMMENT '默认音频URL唯一的',`articleVideoUrl` varchar(255) DEFAULT NULL COMMENT '默认视频URL',`articleCreateTime` varchar(255) DEFAULT NULL COMMENT '创建时间',`articleCreateUserId` varchar(255) DEFAULT NULL COMMENT '创建者用户ID',`articleCreateUsername` varchar(255) DEFAULT NULL COMMENT '创建者用户名',`articleUpdateTime` varchar(255) DEFAULT NULL COMMENT '更新时间',`articleUpdateUserId` varchar(255) DEFAULT NULL COMMENT '更新者用户ID',`articlePrice` int(11) DEFAULT NULL COMMENT '文章价格',`articleType` varchar(255) DEFAULT NULL COMMENT '文章类型',`articleUpdateUsername` varchar(255) DEFAULT NULL COMMENT '更新者用户名',`operation` varchar(255) DEFAULT 'insert' COMMENT '操作: insert, update, jhInsert, jhUpdate, jhDelete jhRestore',`operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者userId',`operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者用户名',`operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00',`articleAssignmentPublishStatus` varchar(255) DEFAULT NULL COMMENT '文章作业发布状态; publish;',`ownerUserId` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '所有者userId',`ownerUserName` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '所有者',PRIMARY KEY (`id`) USING BTREE) ENGINE = InnoDB AUTO_INCREMENT = 2 DEFAULT CHARSET = utf8mb4
article_student_response
- 学生文章回复表
CREATE TABLE `article_student_response` (`id` int(11) NOT NULL AUTO_INCREMENT,`responseId` varchar(30) DEFAULT NULL COMMENT '回答ID',`courseId` varchar(30) DEFAULT NULL COMMENT '课程ID',`classId` varchar(50) DEFAULT NULL COMMENT '班级ID',`articleTitle` varchar(255) DEFAULT NULL COMMENT '标题',`articleId` varchar(30) DEFAULT NULL COMMENT '文章ID',`articleType` varchar(255) DEFAULT NULL COMMENT '文章分类:article=文章/exam=考试/assignment=作业/news=新闻',`userId` varchar(50) DEFAULT NULL COMMENT '用户ID',`fullMark` int(11) DEFAULT NULL COMMENT '满分数',`totalMark` int(11) DEFAULT NULL COMMENT '实际分数',`responseNote` varchar(255) DEFAULT NULL COMMENT '备注',`responseSubmitStatus` varchar(255) DEFAULT NULL COMMENT '提交状态; publish',`responseSubmitAt` varchar(255) DEFAULT NULL COMMENT '提交时间',`responseContent` text COMMENT '用户提交内容+标准答案',`responseRetryNumber` int(11) DEFAULT NULL COMMENT '重新回复的次数',`teacherId` varchar(255) DEFAULT NULL COMMENT '批改老师ID',`teacherReview` text COMMENT '批改老师评语',`teacherReviewStatus` varchar(255) DEFAULT '' COMMENT '批改状态; publish',`teacherReviewAt` varchar(255) DEFAULT NULL COMMENT '批改时间',`operation` varchar(255) DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',`operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者用户ID; userId',`operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者;',`operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00',`responsePercent` int(3) DEFAULT '0' COMMENT '回答进度百分比;',PRIMARY KEY (`id`) USING BTREE) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COMMENT = '学生文章回复表'
attendance
CREATE TABLE `attendance` (`id` int(11) NOT NULL AUTO_INCREMENT,`classId` varchar(255) DEFAULT NULL,`courseId` varchar(255) DEFAULT NULL,`userId` varchar(255) DEFAULT NULL COMMENT '学生用户id;',`lessonNumber` int(11) DEFAULT NULL COMMENT '第几课;',`attendanceDate` varchar(255) DEFAULT NULL COMMENT '出勤时间;',`attendance` varchar(255) DEFAULT NULL COMMENT '出勤类型;出勤,缺勤,迟到,早退',`articleId` varchar(255) DEFAULT NULL COMMENT '文章ID',`articleTitle` varchar(255) DEFAULT NULL COMMENT '文章题目',`markedAt` varchar(255) DEFAULT NULL COMMENT '创建时间',`markedByUser` varchar(255) DEFAULT NULL COMMENT '创建人',`markedByUserId` varchar(255) DEFAULT NULL COMMENT '创建人Id;',`remarks` varchar(255) DEFAULT NULL COMMENT '备注;缺勤情况说明',`operation` varchar(255) CHARACTER SET utf8mb4 DEFAULT '',`operationAt` varchar(255) CHARACTER SET utf8mb4 DEFAULT '',`operationByUserId` varchar(255) CHARACTER SET utf8mb4 DEFAULT '',`operationByUser` varchar(255) CHARACTER SET utf8mb4 DEFAULT '',`courseBatchId` varchar(255) DEFAULT NULL,PRIMARY KEY (`id`) USING BTREE,KEY `id` (`id`) USING BTREE,KEY `classId` (`classId`) USING BTREE,KEY `studentId` (`userId`) USING BTREE) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin
course
- 课程
CREATE TABLE `course` (`id` int(11) NOT NULL AUTO_INCREMENT,`courseId` varchar(255) DEFAULT NULL COMMENT '课程id;',`categoryId` varchar(255) DEFAULT NULL COMMENT '课程分类id;',`courseTitle` varchar(255) DEFAULT '' COMMENT '标题;',`courseType` varchar(255) DEFAULT '6' COMMENT '课程类型;article=图文专题;audio=音频专题;video=视频专题;live=直播专题;column=专栏;other=其他专题',`courseContent` longtext COMMENT '内容;',`courseImage` varchar(255) DEFAULT '' COMMENT '封面图;',`courseTag` varchar(1000) DEFAULT '' COMMENT '标签;',`coursePrice` decimal(8, 2) DEFAULT NULL COMMENT '金额;',`banner` varchar(2000) DEFAULT '' COMMENT 'banner图;',`posterImage` varchar(255) DEFAULT '' COMMENT '海报;',`serviceCode` varchar(255) DEFAULT '' COMMENT '客服二维码;',`freeAritleIdList` varchar(255) DEFAULT NULL COMMENT '免费文章id列表;',`isDel` varchar(255) DEFAULT 'false' COMMENT '是否删除;',`isFree` varchar(255) DEFAULT 'true' COMMENT '是否免费;',`freeMemberPrivilegeLevel` varchar(255) DEFAULT NULL COMMENT '免费最低会员等级;',`sort` int(11) DEFAULT '0' COMMENT '排序;',`sales` varchar(255) DEFAULT '0' COMMENT '实际销量;',`userCount` int(11) DEFAULT '0' COMMENT '用户人数;',`operation` varchar(255) DEFAULT '' COMMENT '操作: insert, update, jhInsert, jhUpdate, jhDelete jhRestore',`operationByUserId` varchar(255) DEFAULT '' COMMENT '操作者userId',`operationByUser` varchar(255) DEFAULT '' COMMENT '操作者用户名',`operationAt` varchar(255) DEFAULT '' COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00',`auditStatus` varchar(255) DEFAULT 'pending' COMMENT '审核状态',`auditByUserId` varchar(255) DEFAULT '' COMMENT '审核人userId;',`auditComment` varchar(255) DEFAULT '' COMMENT '审核意见;',`auditAt` varchar(255) DEFAULT '' COMMENT '审核时间;',`ownerUserId` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '所有者userId',`ownerUserName` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '所有者',`helperUserIdList` varchar(255) DEFAULT NULL COMMENT '助手用户ID列表;',`helperUserNameList` varchar(255) DEFAULT NULL COMMENT '助手用户名列表;',PRIMARY KEY (`id`) USING BTREE) ENGINE = InnoDB AUTO_INCREMENT = 2 DEFAULT CHARSET = utf8mb4 COMMENT = '课程'
course_article
- 课程文章表
CREATE TABLE `course_article` (`id` int(11) NOT NULL AUTO_INCREMENT,`courseId` varchar(255) DEFAULT NULL COMMENT '课程id;',`articleId` varchar(255) DEFAULT NULL COMMENT '文章id;',`albumId` varchar(255) DEFAULT NULL COMMENT '教材id;',`lessonNumber` int(11) DEFAULT NULL COMMENT '课时编号;',`albumTitle` varchar(255) DEFAULT NULL COMMENT '教材标题;',`articleType` varchar(255) DEFAULT NULL COMMENT '文章分类:article=文章/exam=考试/assignment=作业/news=新闻',`articleTagList` text COMMENT '标签; 用, 拼接',`articlePublishStatus` varchar(255) DEFAULT '' COMMENT '文章类型(状态);public, login, draft, deleted',`articlePublishTime` varchar(255) DEFAULT NULL COMMENT '文章发布时间;',`articleTitle` varchar(255) DEFAULT NULL COMMENT '标题;',`articleDesignStatus` varchar(255) DEFAULT 'firstDraft' COMMENT '稿件状态;firstDraft | secondDraft | thirdDraft',`articleCoverImage` varchar(255) DEFAULT NULL COMMENT '封面;',`isFree` varchar(255) DEFAULT 'true' COMMENT '是否免费; true=是,false=否',`price` int(11) DEFAULT NULL COMMENT '价格;',`visitCount` int(11) DEFAULT '0' COMMENT '访问量; 资料的下载量',`questionCount` int(11) DEFAULT '0' COMMENT '题目数量;',`responseCount` int(11) DEFAULT '0' COMMENT '回复量;',`operation` varchar(255) DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',`operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者用户ID; userId',`operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者;',`operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00',PRIMARY KEY (`id`) USING BTREE) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COMMENT = '课程文章表'
course_category
- 课程分类列表
CREATE TABLE `course_category` (`id` int(11) NOT NULL AUTO_INCREMENT,`categoryId` varchar(255) NOT NULL COMMENT '分类id;',`categoryName` varchar(255) NOT NULL DEFAULT '' COMMENT '分类名称;',`icon` varchar(255) DEFAULT '' COMMENT '分类图标;',`sort` int(11) NOT NULL DEFAULT '0' COMMENT '排序;',`isShown` varchar(255) DEFAULT 'true' COMMENT '是否显示;true=显示, false=隐藏',`isDel` varchar(255) DEFAULT 'false' COMMENT '是否删除;false未删除, true已删除',`operation` varchar(255) DEFAULT '' COMMENT '操作: insert, update, jhInsert, jhUpdate, jhDelete jhRestore',`operationByUserId` varchar(255) DEFAULT '' COMMENT '操作者userId',`operationByUser` varchar(255) DEFAULT '' COMMENT '操作者用户名',`operationAt` varchar(255) DEFAULT '' COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00',PRIMARY KEY (`id`) USING BTREE) ENGINE = InnoDB AUTO_INCREMENT = 129 DEFAULT CHARSET = utf8mb4 COMMENT = '课程分类列表'
course_gift
- 课程赠送表
CREATE TABLE `course_gift` (`id` int(11) NOT NULL AUTO_INCREMENT,`giftId` varchar(255) NOT NULL DEFAULT '0' COMMENT '赠送ID,git_随机数',`courseId` varchar(255) NOT NULL DEFAULT '' COMMENT '课程ID',`courseName` varchar(255) DEFAULT NULL COMMENT '课程名称',`courseImage` varchar(255) DEFAULT NULL COMMENT '封面图;',`coursePrice` decimal(8, 2) DEFAULT NULL COMMENT '金额;',`userId` varchar(255) NOT NULL DEFAULT '' COMMENT '用户ID',`userName` varchar(255) DEFAULT '0' COMMENT '用户名',`userAvatar` varchar(255) DEFAULT NULL COMMENT '用户头像',`receiveUserId` varchar(255) DEFAULT '' COMMENT '领取人ID',`receiveUserName` varchar(255) DEFAULT '' COMMENT '领取人',`receiveTime` varchar(255) DEFAULT '' COMMENT '领取时间',`receiveStatus` varchar(255) NOT NULL DEFAULT 'waitReceive' COMMENT '领取状态; waitReceive=未领取; received=已领取;',`operation` varchar(255) CHARACTER SET utf8mb4 DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',`operationByUserId` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '操作者userId',`operationByUser` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '操作者用户名',`operationAt` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00 ',PRIMARY KEY (`id`) USING BTREE) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COMMENT = '课程赠送表'
course_user
- 课程用户表
CREATE TABLE `course_user` (`id` int(11) NOT NULL AUTO_INCREMENT,`courseId` varchar(255) NOT NULL DEFAULT '' COMMENT '课程id; ',`courseTitle` varchar(255) DEFAULT '' COMMENT '标题;',`courseType` varchar(255) DEFAULT 'article' COMMENT '课程类型; article=图文,audio=音频,video=视频课程,live=直播课程,column=专栏,other=其他课程',`courseTag` varchar(1000) DEFAULT '' COMMENT '标签;',`courseImage` varchar(255) DEFAULT '' COMMENT '封面图;',`userId` varchar(255) NOT NULL DEFAULT '' COMMENT '用户id; ',`userName` varchar(255) DEFAULT '' COMMENT '用户名; ',`userAvatar` varchar(255) DEFAULT '' COMMENT '用户头像; ',`classId` varchar(255) DEFAULT NULL COMMENT '分配班级id; ',`orderId` varchar(255) DEFAULT NULL COMMENT '订单ID',`isDel` varchar(255) NOT NULL DEFAULT 'false' COMMENT '是否删除; true=已删除,false=未删除',`isPay` varchar(255) DEFAULT NULL COMMENT '是否付费',`operation` varchar(255) DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',`operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者userId',`operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者用户名',`operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00 ',PRIMARY KEY (`id`) USING BTREE) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COMMENT = '课程用户表'
home_recommend
- 首页推荐
CREATE TABLE `home_recommend` (`id` int(11) NOT NULL AUTO_INCREMENT,`title` varchar(255) DEFAULT '' COMMENT '标题;',`type` varchar(255) DEFAULT '' COMMENT '类型; banner=轮播图,navIcon=跳转图标,news=新闻,activity=活动,ad=广告,live=直播,course=课程,link=自定义跳转,goods=商品,hotLive=热门直播,teacher=讲师,groupBooking=拼团,menu=菜单,material=素材',`link` varchar(255) DEFAULT '' COMMENT '自定义跳转路径;',`icon` varchar(255) DEFAULT '' COMMENT '图标;',`image` varchar(255) DEFAULT '' COMMENT '封面图;',`contentList` text COMMENT '内容列表JSON;',`contentListOfDemo` text COMMENT '内容列表JSON(示例);',`contentDisplay` varchar(255) DEFAULT '' COMMENT '内容显示类型; big=大图,grid=宫图,small=小图,img=纯图,fixed=固定',`sort` int(11) DEFAULT '0' COMMENT '排序;',`isShown` varchar(255) DEFAULT 'true' COMMENT '是否显示; true=是,false=否',`isBuildin` varchar(255) DEFAULT 'false' COMMENT '是否内置; true=是,false=否',`operation` varchar(255) NOT NULL DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',`rowStatus` varchar(255) DEFAULT 'true' COMMENT '数据状态:true==正常,false==回收站',`operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者userId',`operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者用户名',`operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00 ',PRIMARY KEY (`id`, `operation`) USING BTREE) ENGINE = InnoDB AUTO_INCREMENT = 19 DEFAULT CHARSET = utf8mb4 COMMENT = '首页推荐'
order
- 订单表
CREATE TABLE `order` (`id` int(11) NOT NULL AUTO_INCREMENT,`orderId` varchar(255) NOT NULL DEFAULT '' COMMENT '订单号;',`orderType` varchar(255) NOT NULL DEFAULT 'course' COMMENT '订单类别; course=课程订单,product=商品订单,exam=考试订单,material=资料,member=会员订单',`orderStatus` varchar(255) NOT NULL DEFAULT 'waitpay' COMMENT '订单状态; waitpay=待支付,paid=已支付,waitSend=待发货,waitReceive=待收货,waitComment=待评价,commented=已评价,refunded=已退款,cancel=已取消',`userName` varchar(255) NOT NULL DEFAULT '' COMMENT '用户姓名',`userId` varchar(255) NOT NULL DEFAULT '' COMMENT '用户id',`userPhone` varchar(255) NOT NULL DEFAULT '' COMMENT '用户电话',`userAddress` varchar(255) NOT NULL DEFAULT '' COMMENT '详细地址',`courseId` varchar(255) DEFAULT NULL COMMENT '购买课程ID',`memberId` varchar(255) DEFAULT NULL COMMENT '购买会员类型ID',`articleId` varchar(255) DEFAULT NULL COMMENT '购买的文章id;考试和资料',`productId` varchar(255) DEFAULT NULL COMMENT '商品id;',`totalNum` int(11) NOT NULL DEFAULT '1' COMMENT '订单商品总数;',`totalPrice` decimal(14, 2) unsigned NOT NULL DEFAULT '0.00' COMMENT '订单总价;',`totalPostage` decimal(14, 2) unsigned NOT NULL DEFAULT '0.00' COMMENT '邮费;',`payPrice` decimal(14, 2) unsigned NOT NULL DEFAULT '0.00' COMMENT '实际支付金额;',`payPostage` decimal(14, 2) unsigned NOT NULL DEFAULT '0.00' COMMENT '支付邮费',`payType` varchar(255) NOT NULL DEFAULT 'wechat' COMMENT '支付方式; wechat=微信支付; alipay=支付宝; offline=线下支付',`payTradeNo` varchar(255) NOT NULL DEFAULT '' COMMENT '微信/支付宝交易订单号',`payTime` varchar(255) DEFAULT NULL COMMENT '支付时间;',`merchantId` varchar(255) DEFAULT NULL COMMENT '支付商户ID',`payStatus` varchar(255) NOT NULL DEFAULT 'unpaid' COMMENT '支付状态; unpaid=未支付; paid=已支付; refunding=退款中; refunded=已退款;cancel=取消;received=已收货',`deductionPrice` decimal(14, 2) unsigned NOT NULL DEFAULT '0.00' COMMENT '抵扣金额',`couponId` varchar(255) DEFAULT NULL COMMENT '优惠券id',`couponPrice` decimal(14, 2) unsigned DEFAULT '0.00' COMMENT '优惠券金额',`deliveryName` varchar(255) DEFAULT NULL COMMENT '快递公司',`deliveryType` varchar(255) DEFAULT NULL COMMENT '物流类型',`deliveryNumber` varchar(64) DEFAULT NULL COMMENT '快递单号',`refundStatus` varchar(255) NOT NULL DEFAULT 'unrefund' COMMENT '退款状态: unrefund=未退款,applying=申请中,refunded=已退款',`refundReason` varchar(255) DEFAULT NULL COMMENT '退款原因',`refundReasonPicList` text COMMENT '退款原因图片列表',`refundRejectReason` varchar(255) DEFAULT NULL COMMENT '退款拒绝原因;',`refundApplyTime` varchar(255) DEFAULT NULL COMMENT '退款申请时间',`refundTime` varchar(255) DEFAULT NULL COMMENT '退款时间',`refundPrice` decimal(14, 2) unsigned NOT NULL DEFAULT '0.00' COMMENT '退款金额',`mark` varchar(512) DEFAULT NULL COMMENT '备注',`isDel` varchar(255) NOT NULL DEFAULT 'false' COMMENT '是否删除; true=已删除; false=未删除;',`isGift` varchar(255) NOT NULL DEFAULT 'false' COMMENT '是否赠送订单;',`remark` varchar(512) DEFAULT NULL COMMENT '管理员备注',`spreadUserId` varchar(255) DEFAULT NULL COMMENT '推广人id',`operation` varchar(255) DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',`operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者userId',`operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者用户名',`operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00 ',PRIMARY KEY (`id`) USING BTREE,UNIQUE KEY `orderId` (`orderId`) USING BTREE,KEY `userId` (`userId`) USING BTREE,KEY `orderType` (`orderType`) USING BTREE,KEY `orderStatus` (`orderStatus`) USING BTREE) ENGINE = InnoDB AUTO_INCREMENT = 2 DEFAULT CHARSET = utf8mb4 COMMENT = '订单表'
store_category
- 商品分类表
CREATE TABLE `store_category` (`id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',`categoryId` varchar(255) NOT NULL DEFAULT '' COMMENT '分类ID;',`categoryName` varchar(255) NOT NULL DEFAULT '' COMMENT '分类名称;',`sort` int(11) NOT NULL DEFAULT '0' COMMENT '排序;',`icon` varchar(255) NOT NULL DEFAULT '' COMMENT '图标;',`isDel` varchar(255) NOT NULL DEFAULT 'false' COMMENT '是否删除; false=未删除,true=已删除',`isShown` varchar(255) NOT NULL DEFAULT 'false' COMMENT '是否推荐; false=未推荐,true=已推荐',`operation` varchar(255) DEFAULT NULL,`operationByUserId` varchar(255) DEFAULT NULL,`operationByUser` varchar(255) DEFAULT NULL,`operationAt` varchar(255) DEFAULT NULL,PRIMARY KEY (`id`) USING BTREE) ENGINE = InnoDB AUTO_INCREMENT = 3 DEFAULT CHARSET = utf8mb4 COMMENT = '商品分类表'
store_product
- 商品表
CREATE TABLE `store_product` (`id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',`productId` varchar(255) NOT NULL DEFAULT '' COMMENT '商品ID;',`productName` varchar(255) NOT NULL DEFAULT '' COMMENT '商品名称;',`productDesc` varchar(255) DEFAULT '' COMMENT '商品简介;',`productImage` varchar(255) DEFAULT '' COMMENT '商品图片;',`banner` varchar(255) DEFAULT '' COMMENT '轮播图;',`keyword` varchar(255) DEFAULT '' COMMENT '关键字;',`categoryId` varchar(255) DEFAULT '' COMMENT '分类id;',`price` decimal(14, 2) unsigned DEFAULT NULL COMMENT '商品价格;',`marketPrice` decimal(14, 2) unsigned DEFAULT NULL COMMENT '市场价(划线价格);',`unitName` varchar(255) DEFAULT '' COMMENT '单位名;',`sort` int(11) DEFAULT '0' COMMENT '排序;',`sales` int(11) unsigned DEFAULT '0' COMMENT '销量;',`salesVitual` int(11) DEFAULT '0' COMMENT '虚拟销量;',`stock` int(11) unsigned DEFAULT '0' COMMENT '库存;',`isRecommend` varchar(255) DEFAULT 'false' COMMENT '是否推荐; false=未推荐,true=已推荐',`isShown` varchar(255) DEFAULT 'false' COMMENT '状态; false=未上架,true=已上架;',`isDel` varchar(255) DEFAULT 'false' COMMENT '是否删除; false=未删除,true=已删除',`cost` decimal(14, 2) unsigned DEFAULT NULL COMMENT '成本价',`browse` int(11) DEFAULT '0' COMMENT '浏览量;',`productContent` text COMMENT '商品详情;',`operation` varchar(255) DEFAULT NULL,`operationByUserId` varchar(255) DEFAULT NULL,`operationByUser` varchar(255) DEFAULT NULL,`operationAt` varchar(255) DEFAULT NULL,PRIMARY KEY (`id`) USING BTREE) ENGINE = InnoDB AUTO_INCREMENT = 4 DEFAULT CHARSET = utf8 COMMENT = '商品表'
student_learning_record
CREATE TABLE `student_learning_record` (`id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID',`courseMemberId` varchar(255) DEFAULT NULL COMMENT '学习记录编号',`courseBatchId` varchar(255) DEFAULT NULL COMMENT '课程本期ID',`courseName` varchar(255) DEFAULT NULL COMMENT '课程名称',`courseId` varchar(255) DEFAULT NULL COMMENT '所属课程系列',`classId` varchar(255) DEFAULT NULL COMMENT '班级编号',`memberId` varchar(255) DEFAULT NULL COMMENT '员工编号',`netName` varchar(255) DEFAULT NULL COMMENT '名字',`loginId` varchar(255) DEFAULT NULL COMMENT '用户ID',`district` varchar(255) DEFAULT NULL COMMENT '分公司ID',`orgId` varchar(255) DEFAULT NULL COMMENT '行政组织ID',`orgName` varchar(255) DEFAULT NULL COMMENT '行政组织名称',`orgFullName` varchar(255) DEFAULT NULL COMMENT '行政组织全称',`roleId` varchar(255) DEFAULT NULL COMMENT '组织角色ID',`stage` varchar(50) DEFAULT NULL COMMENT '职务阶段',`title` varchar(50) DEFAULT NULL COMMENT '职务',`position` varchar(50) DEFAULT NULL COMMENT '职务',`memberRole` varchar(50) DEFAULT NULL COMMENT '学员在课程的职分',`result` varchar(50) DEFAULT NULL COMMENT '毕业成绩',`note` text COMMENT '备注',`comment` text COMMENT '阶段评语',`teacherRecommendation` varchar(255) DEFAULT NULL COMMENT '建议:毕业、不及格',`courseCreditEarned` varchar(50) DEFAULT NULL COMMENT '所得学分',`examScoreStat` varchar(255) DEFAULT NULL COMMENT '平时成绩统计',`examScoreDetail` text COMMENT '每课成绩详情',`overallComment` varchar(1023) DEFAULT NULL COMMENT '整体评语',`commentDetail` text COMMENT '评语详情',`attendanceStat` varchar(1023) DEFAULT NULL COMMENT '出勤统计',`attendanceDetail` text COMMENT '出勤详情',`assignmentStat` varchar(1023) DEFAULT NULL COMMENT '作业统计',`assignmentDetail` text COMMENT '作业详情汇报',`noteStat` varchar(1023) DEFAULT NULL COMMENT '笔记统计',`noteDetail` text COMMENT '笔记详情汇报',`totalLearningHour` varchar(255) DEFAULT NULL COMMENT '总学习时长',`memberCourseStatus` varchar(255) DEFAULT NULL COMMENT '课程学习状态',`nominatedByMemberId` varchar(255) DEFAULT NULL COMMENT '推荐人员工编号',`nominatedByUserId` varchar(255) DEFAULT NULL COMMENT '推荐人用户名',`nominatedByUser` varchar(255) DEFAULT NULL COMMENT '推荐人',`dateStarted` varchar(255) DEFAULT NULL COMMENT '学习开始时间',`dateEnded` varchar(255) DEFAULT NULL COMMENT '学习结束时间',`operation` varchar(255) DEFAULT NULL COMMENT '操作',`operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00 ',`operationByUserId` varchar(50) DEFAULT NULL COMMENT '操作者userId',`operationByUser` varchar(50) DEFAULT NULL COMMENT '操作者用户名(展示)',PRIMARY KEY (`id`) USING BTREE) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin
user_address
- 用户地址表
CREATE TABLE `user_address` (`id` int(8) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',`addressId` varchar(255) NOT NULL DEFAULT '' COMMENT '用户地址ID;',`userId` varchar(255) NOT NULL DEFAULT '0' COMMENT '用户ID;',`realName` varchar(255) NOT NULL DEFAULT '' COMMENT '收货人姓名;',`phone` varchar(255) NOT NULL DEFAULT '' COMMENT '收货人电话;',`province` varchar(255) NOT NULL DEFAULT '' COMMENT '收货人所在省;',`city` varchar(255) NOT NULL DEFAULT '' COMMENT '收货人所在市;',`district` varchar(255) NOT NULL DEFAULT '' COMMENT '收货人所在区;',`detail` varchar(255) NOT NULL DEFAULT '' COMMENT '收货人详细地址;',`postCode` varchar(255) DEFAULT '0' COMMENT '邮编;',`longitude` varchar(255) DEFAULT '0' COMMENT '经度;',`latitude` varchar(255) DEFAULT '0' COMMENT '纬度;',`isDefault` varchar(255) NOT NULL DEFAULT 'false' COMMENT '是否默认; false=不是,true=是',`operation` varchar(255) CHARACTER SET utf8mb4 DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',`operationByUserId` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '操作者userId',`operationByUser` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '操作者用户名',`operationAt` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00 ',`districtCode` varchar(255) DEFAULT NULL COMMENT '地区编码;',`cityCode` varchar(255) DEFAULT NULL COMMENT '城市编码;',`provinceCode` varchar(255) DEFAULT NULL COMMENT '省份编码;',PRIMARY KEY (`id`) USING BTREE) ENGINE = InnoDB AUTO_INCREMENT = 2 DEFAULT CHARSET = utf8 COMMENT = '用户地址表'
user_comment
- 商品评论表
CREATE TABLE `user_comment` (`id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',`commentId` varchar(255) NOT NULL DEFAULT '' COMMENT '评论ID;',`commentType` varchar(255) NOT NULL DEFAULT 'course' COMMENT '评论类型; course=课程, product=商品',`courseId` varchar(255) DEFAULT '' COMMENT '课程ID;',`courseName` varchar(255) DEFAULT NULL COMMENT '课程名称;',`productId` varchar(255) DEFAULT '' COMMENT '商品ID;',`productName` varchar(255) DEFAULT NULL COMMENT '商品名称;',`userId` varchar(255) NOT NULL DEFAULT '' COMMENT '用户ID;',`orderId` varchar(255) NOT NULL DEFAULT '' COMMENT '订单ID;',`nickname` varchar(255) DEFAULT NULL COMMENT '用户昵称;',`avatar` varchar(255) DEFAULT NULL COMMENT '用户头像;',`comment` varchar(255) DEFAULT NULL COMMENT '评论内容;',`star` int(11) DEFAULT NULL COMMENT '评分;',`pics` varchar(255) DEFAULT NULL COMMENT '评论图片;',`replyContent` varchar(255) DEFAULT NULL COMMENT '回复内容;',`replyTime` varchar(255) DEFAULT NULL COMMENT '回复时间;',`replyUserId` varchar(255) DEFAULT NULL COMMENT '回复人员Id;',`replyUserName` varchar(255) DEFAULT NULL COMMENT '回复人员名称;',`isReply` varchar(255) DEFAULT NULL COMMENT '是否回复; true=是,false=否',`isDel` varchar(255) DEFAULT NULL COMMENT '是否删除; true=是,false=否',`isShown` varchar(255) DEFAULT NULL COMMENT '是否显示; true=是,false=否',`isVirtual` varchar(255) DEFAULT 'false' COMMENT '是否虚拟评论;',`operation` varchar(255) CHARACTER SET utf8mb4 DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',`operationByUserId` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '操作者userId',`operationByUser` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '操作者用户名',`operationAt` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00 ',PRIMARY KEY (`id`) USING BTREE) ENGINE = InnoDB DEFAULT CHARSET = utf8 COMMENT = '商品评论表'
user_learing_record
- 用户学习记录
CREATE TABLE `user_learing_record` (`id` int(11) NOT NULL AUTO_INCREMENT,`courseId` varchar(11) DEFAULT NULL COMMENT '课程id',`articleId` varchar(11) DEFAULT NULL COMMENT '文章id',`learingType` varchar(255) DEFAULT NULL COMMENT '学习记录类型;course,article,exam,assignment',`operation` varchar(255) CHARACTER SET utf8mb4 DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',`operationByUserId` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '操作者userId',`operationByUser` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '操作者用户名',`operationAt` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00 ',`userId` varchar(255) DEFAULT NULL COMMENT '用户id',PRIMARY KEY (`id`) USING BTREE) ENGINE = InnoDB AUTO_INCREMENT = 2 DEFAULT CHARSET = utf8mb4 COMMENT = '用户学习记录'
user_like
- 用户点赞收藏
CREATE TABLE `user_like` (`id` int(11) NOT NULL AUTO_INCREMENT,`likeType` varchar(255) NOT NULL DEFAULT 'collect' COMMENT '类型; like=点赞, collect=收藏',`userId` varchar(255) NOT NULL DEFAULT '0' COMMENT '用户id',`articleId` varchar(255) DEFAULT '' COMMENT '文章id',`courseId` varchar(255) DEFAULT '0' COMMENT '课程id',`operation` varchar(255) DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',`operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者userId',`operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者用户名',`operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00 ',PRIMARY KEY (`id`) USING BTREE) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COMMENT = '用户点赞收藏'
业务视图
_view02_user_app
CREATE ALGORITHM = UNDEFINED DEFINER = `root` @`localhost` SQL SECURITY DEFINER VIEW `_view02_user_app` ASselect(case `jh_enterprise_v2_data_repository`.`enterprise_view02_user_app`.`appId`when 'jufeng-mgmt' then 'mgmt'when 'jufeng-student' then 'student'when 'jufeng-teacher' then 'teacher'else NULLend) AS `jhId`,`jh_enterprise_v2_data_repository`.`enterprise_view02_user_app`.`id` AS `id`,`jh_enterprise_v2_data_repository`.`enterprise_view02_user_app`.`userId` AS `userId`,`jh_enterprise_v2_data_repository`.`enterprise_view02_user_app`.`appId` AS `appId`from`jh_enterprise_v2_data_repository`.`enterprise_view02_user_app`where(`jh_enterprise_v2_data_repository`.`enterprise_view02_user_app`.`appId` in ('jufeng-mgmt', 'jufeng-student', 'jufeng-teacher'))
view01_article
CREATE ALGORITHM = UNDEFINED DEFINER = `root` @`%` SQL SECURITY DEFINER VIEW `view01_article` ASselect`article`.`id` AS `id`,`article`.`articleId` AS `articleId`,`article`.`categoryId` AS `categoryId`,`article`.`categoryName` AS `categoryName`,`article`.`articleCategoryId` AS `articleCategoryId`,`article`.`courseId` AS `courseId`,`article`.`courseBatchId` AS `courseBatchId`,`article`.`articleGroupName` AS `articleGroupName`,`article`.`articleTagList` AS `articleTagList`,`article`.`articlePublishStatus` AS `articlePublishStatus`,`article`.`articlePublishTime` AS `articlePublishTime`,`article`.`articleTitle` AS `articleTitle`,`article`.`articleShortName` AS `articleShortName`,`article`.`articleConfig` AS `articleConfig`,`article`.`articleCoverImage` AS `articleCoverImage`,`article`.`articleContent` AS `articleContent`,`article`.`articleContentForSeo` AS `articleContentForSeo`,`article`.`articleType` AS `articleType`,`article`.`articleAudioUrl` AS `articleAudioUrl`,`article`.`articleVideoUrl` AS `articleVideoUrl`,`article`.`articleCreateTime` AS `articleCreateTime`,`article`.`articleCreateUserId` AS `articleCreateUserId`,`article`.`articleCreateUsername` AS `articleCreateUsername`,`article`.`articleUpdateTime` AS `articleUpdateTime`,`article`.`articleUpdateUserId` AS `articleUpdateUserId`,`article`.`articleUpdateUsername` AS `articleUpdateUsername`,`article`.`visitCount` AS `visitCount`,`article`.`operation` AS `operation`,`article`.`operationByUserId` AS `operationByUserId`,`article`.`operationByUser` AS `operationByUser`,`article`.`operationAt` AS `operationAt`,`article`.`auditStatus` AS `auditStatus`,`article`.`auditByUserId` AS `auditByUserId`,`article`.`auditComment` AS `auditComment`,`article`.`auditAt` AS `auditAt`,`article`.`ownerUserId` AS `ownerUserId`,`article`.`ownerUserName` AS `ownerUserName`from`article`
view01_article_detail
CREATE ALGORITHM = UNDEFINED DEFINER = `root` @`%` SQL SECURITY DEFINER VIEW `view01_article_detail` ASselect`article`.`id` AS `id`,`article`.`articleId` AS `articleId`,`article`.`categoryId` AS `categoryId`,`article`.`categoryName` AS `categoryName`,`article`.`articleCategoryId` AS `articleCategoryId`,`article`.`courseBatchId` AS `courseBatchId`,`article`.`articleGroupName` AS `articleGroupName`,`article`.`articleTagList` AS `articleTagList`,`article`.`articlePublishStatus` AS `articlePublishStatus`,`article`.`articlePublishTime` AS `articlePublishTime`,`article`.`articleTitle` AS `articleTitle`,`article`.`articleShortName` AS `articleShortName`,`article`.`articleConfig` AS `articleConfig`,`article`.`articleCoverImage` AS `articleCoverImage`,`article`.`articleContent` AS `articleContent`,`article`.`articleContentForSeo` AS `articleContentForSeo`,`article`.`articleType` AS `articleType`,`article`.`articleAudioUrl` AS `articleAudioUrl`,`article`.`articleVideoUrl` AS `articleVideoUrl`,`article`.`articleCreateTime` AS `articleCreateTime`,`article`.`articleCreateUserId` AS `articleCreateUserId`,`article`.`articleCreateUsername` AS `articleCreateUsername`,`article`.`articleUpdateTime` AS `articleUpdateTime`,`article`.`articleUpdateUserId` AS `articleUpdateUserId`,`article`.`articleUpdateUsername` AS `articleUpdateUsername`,`article`.`articlePrice` AS `articlePrice`,`article`.`visitCount` AS `visitCount`,`article`.`operation` AS `operation`,`article`.`operationByUserId` AS `operationByUserId`,`article`.`operationByUser` AS `operationByUser`,`article`.`operationAt` AS `operationAt`,`article`.`auditStatus` AS `auditStatus`,`course_article`.`responseCount` AS `responseCount`,`course_article`.`courseId` AS `courseId`from(`article`join `course_article` on ((`article`.`articleId` = `course_article`.`articleId`)))
view01_article_student_response
CREATE ALGORITHM = UNDEFINED DEFINER = `root` @`%` SQL SECURITY DEFINER VIEW `view01_article_student_response` ASselect`article_student_response`.`id` AS `id`,`article_student_response`.`responseId` AS `responseId`,`article_student_response`.`courseId` AS `courseId`,`article_student_response`.`classId` AS `classId`,`article_student_response`.`articleTitle` AS `articleTitle`,`article_student_response`.`articleId` AS `articleId`,`article_student_response`.`articleType` AS `articleType`,`article_student_response`.`userId` AS `userId`,`article_student_response`.`fullMark` AS `fullMark`,`article_student_response`.`totalMark` AS `totalMark`,`article_student_response`.`responseNote` AS `responseNote`,`article_student_response`.`responseSubmitStatus` AS `responseSubmitStatus`,`article_student_response`.`responseSubmitAt` AS `responseSubmitAt`,`article_student_response`.`responseContent` AS `responseContent`,`article_student_response`.`responseRetryNumber` AS `responseRetryNumber`,`article_student_response`.`teacherId` AS `teacherId`,`article_student_response`.`teacherReview` AS `teacherReview`,`article_student_response`.`teacherReviewStatus` AS `teacherReviewStatus`,`article_student_response`.`teacherReviewAt` AS `teacherReviewAt`,`article_student_response`.`operation` AS `operation`,`article_student_response`.`operationByUserId` AS `operationByUserId`,`article_student_response`.`operationByUser` AS `operationByUser`,`article_student_response`.`operationAt` AS `operationAt`,`article_student_response`.`responsePercent` AS `responsePercent`,`_user`.`username` AS `netName`,`article`.`ownerUserId` AS `ownerUserId`,`article`.`ownerUserName` AS `ownerUserName`from((`article_student_response`join `_user` on ((`article_student_response`.`userId` = `_user`.`userId`)))join `article` on ((`article_student_response`.`articleId` = `article`.`articleId`)))
view01_attendance
CREATE ALGORITHM = UNDEFINED DEFINER = `root` @`%` SQL SECURITY DEFINER VIEW `view01_attendance` ASselect`attendance`.`id` AS `id`,`attendance`.`classId` AS `classId`,`attendance`.`courseId` AS `courseId`,`attendance`.`userId` AS `userId`,`attendance`.`lessonNumber` AS `lessonNumber`,`attendance`.`attendanceDate` AS `attendanceDate`,`attendance`.`attendance` AS `attendance`,`attendance`.`articleId` AS `articleId`,`attendance`.`articleTitle` AS `articleTitle`,`attendance`.`markedAt` AS `markedAt`,`attendance`.`markedByUser` AS `markedByUser`,`attendance`.`markedByUserId` AS `markedByUserId`,`attendance`.`remarks` AS `remarks`,`attendance`.`operation` AS `operation`,`attendance`.`operationAt` AS `operationAt`,`attendance`.`operationByUserId` AS `operationByUserId`,`attendance`.`operationByUser` AS `operationByUser`,`attendance`.`courseBatchId` AS `courseBatchId`,`course`.`ownerUserId` AS `ownerUserId`,`course`.`ownerUserName` AS `ownerUserName`from(`attendance`join `course` on ((`attendance`.`courseId` = `course`.`courseId`)))
view01_course_article
CREATE ALGORITHM = UNDEFINED DEFINER = `root` @`%` SQL SECURITY DEFINER VIEW `view01_course_article` ASselect`course_article`.`id` AS `id`,`course_article`.`courseId` AS `courseId`,`course_article`.`articleId` AS `articleId`,`course_article`.`albumId` AS `albumId`,`course_article`.`lessonNumber` AS `lessonNumber`,`course_article`.`articleDesignStatus` AS `articleDesignStatus`,`course_article`.`isFree` AS `isFree`,`course_article`.`price` AS `price`,`course_article`.`visitCount` AS `visitCount`,`course_article`.`questionCount` AS `questionCount`,`course_article`.`responseCount` AS `responseCount`,`course_article`.`operation` AS `operation`,`course_article`.`operationByUserId` AS `operationByUserId`,`course_article`.`operationByUser` AS `operationByUser`,`course_article`.`operationAt` AS `operationAt`,`article`.`articleTitle` AS `articleTitle`,`article`.`articleType` AS `articleType`,`article`.`articleTagList` AS `articleTagList`,`article`.`articlePublishStatus` AS `articlePublishStatus`,`article`.`articleCoverImage` AS `articleCoverImage`,`article`.`articlePublishTime` AS `articlePublishTime`,`article`.`articlePrice` AS `articlePrice`,`article`.`ownerUserId` AS `ownerUserId`,`article`.`ownerUserName` AS `ownerUserName`,`article`.`auditStatus` AS `auditStatus`from(`course_article`left join `article` on ((`course_article`.`articleId` = `article`.`articleId`)))
view01_course_list
CREATE ALGORITHM = UNDEFINED DEFINER = `root` @`%` SQL SECURITY DEFINER VIEW `view01_course_list` ASselect`course`.`id` AS `id`,`course`.`courseId` AS `courseId`,`course`.`categoryId` AS `categoryId`,`course`.`courseTitle` AS `courseTitle`,`course`.`courseType` AS `courseType`,`course`.`courseContent` AS `courseContent`,`course`.`courseImage` AS `courseImage`,`course`.`courseTag` AS `courseTag`,`course`.`coursePrice` AS `coursePrice`,`course`.`banner` AS `banner`,`course`.`posterImage` AS `posterImage`,`course`.`serviceCode` AS `serviceCode`,`course`.`freeAritleIdList` AS `freeAritleIdList`,`course`.`isDel` AS `isDel`,`course`.`isFree` AS `isFree`,`course`.`sort` AS `sort`,`course`.`sales` AS `sales`,`course`.`operation` AS `operation`,`course`.`operationByUserId` AS `operationByUserId`,`course`.`operationByUser` AS `operationByUser`,`course`.`operationAt` AS `operationAt`,`course`.`userCount` AS `userCount`,count(distinct (casewhen ((`course_article`.`articleType` = 'article')and (`course_article`.`articlePublishStatus` = 'login')) then `course_article`.`id`end)) AS `articleCount`from(`course`left join `course_article` on ((`course`.`courseId` = `course_article`.`courseId`)))group by`course`.`id`having(`articleCount` > 0)
view01_course_user
CREATE ALGORITHM = UNDEFINED DEFINER = `root` @`%` SQL SECURITY DEFINER VIEW `view01_course_user` ASselect`course_user`.`id` AS `id`,`course_user`.`courseId` AS `courseId`,`course_user`.`courseTitle` AS `courseTitle`,`course_user`.`courseType` AS `courseType`,`course_user`.`courseTag` AS `courseTag`,`course_user`.`courseImage` AS `courseImage`,`course_user`.`userId` AS `userId`,`course_user`.`userName` AS `userName`,`course_user`.`userAvatar` AS `userAvatar`,`course_user`.`classId` AS `classId`,`course_user`.`orderId` AS `orderId`,`course_user`.`isDel` AS `isDel`,`course_user`.`isPay` AS `isPay`,`course_user`.`operation` AS `operation`,`course_user`.`operationByUserId` AS `operationByUserId`,`course_user`.`operationByUser` AS `operationByUser`,`course_user`.`operationAt` AS `operationAt`,`course`.`ownerUserId` AS `ownerUserId`,`course`.`ownerUserName` AS `ownerUserName`,`course`.`helperUserIdList` AS `helperUserIdList`from(`course_user`join `course` on ((`course_user`.`courseId` = `course`.`courseId`)))
view01_course_with_article_count
CREATE ALGORITHM = UNDEFINED DEFINER = `root` @`%` SQL SECURITY DEFINER VIEW `view01_course_with_article_count` ASselect`c`.`id` AS `id`,`c`.`courseId` AS `courseId`,`c`.`categoryId` AS `categoryId`,`c`.`courseTitle` AS `courseTitle`,`c`.`courseType` AS `courseType`,`c`.`courseContent` AS `courseContent`,`c`.`courseImage` AS `courseImage`,`c`.`courseTag` AS `courseTag`,`c`.`coursePrice` AS `coursePrice`,`c`.`banner` AS `banner`,`c`.`posterImage` AS `posterImage`,`c`.`serviceCode` AS `serviceCode`,`c`.`freeAritleIdList` AS `freeAritleIdList`,`c`.`isDel` AS `isDel`,`c`.`isFree` AS `isFree`,`c`.`sort` AS `sort`,`c`.`sales` AS `sales`,`c`.`operation` AS `operation`,`c`.`operationByUserId` AS `operationByUserId`,`c`.`operationByUser` AS `operationByUser`,`c`.`operationAt` AS `operationAt`,`c`.`helperUserIdList` AS `helperUserIdList`,sum(if((`c_art`.`articlePublishStatus` = 'login'), 1, 0)) AS `articleCount`,`course_category`.`categoryName` AS `categoryName`,`c`.`ownerUserId` AS `ownerUserId`,`c`.`auditStatus` AS `auditStatus`from((`course` `c`left join `view01_course_article` `c_art` on ((`c`.`courseId` = `c_art`.`courseId`)))join `course_category` on ((`c`.`categoryId` = `course_category`.`categoryId`)))group by`c`.`id`
view01_order
CREATE ALGORITHM = UNDEFINED DEFINER = `root` @`%` SQL SECURITY DEFINER VIEW `view01_order` ASselect`order`.`id` AS `id`,`order`.`orderId` AS `orderId`,`order`.`orderType` AS `orderType`,`order`.`orderStatus` AS `orderStatus`,`order`.`userName` AS `userName`,`order`.`userId` AS `userId`,`order`.`userPhone` AS `userPhone`,`order`.`userAddress` AS `userAddress`,`order`.`courseId` AS `courseId`,`order`.`memberId` AS `memberId`,`order`.`articleId` AS `articleId`,`order`.`productId` AS `productId`,`order`.`totalNum` AS `totalNum`,`order`.`totalPrice` AS `totalPrice`,`order`.`totalPostage` AS `totalPostage`,`order`.`payPrice` AS `payPrice`,`order`.`payPostage` AS `payPostage`,`order`.`payType` AS `payType`,`order`.`payTradeNo` AS `payTradeNo`,`order`.`payTime` AS `payTime`,`order`.`merchantId` AS `merchantId`,`order`.`payStatus` AS `payStatus`,`order`.`deductionPrice` AS `deductionPrice`,`order`.`couponId` AS `couponId`,`order`.`couponPrice` AS `couponPrice`,`order`.`deliveryName` AS `deliveryName`,`order`.`deliveryType` AS `deliveryType`,`order`.`deliveryNumber` AS `deliveryNumber`,`order`.`refundStatus` AS `refundStatus`,`order`.`refundReason` AS `refundReason`,`order`.`refundReasonPicList` AS `refundReasonPicList`,`order`.`refundApplyTime` AS `refundApplyTime`,`order`.`refundTime` AS `refundTime`,`order`.`refundPrice` AS `refundPrice`,`order`.`mark` AS `mark`,`order`.`isDel` AS `isDel`,`order`.`remark` AS `remark`,`order`.`spreadUserId` AS `spreadUserId`,`order`.`operation` AS `operation`,`order`.`operationByUserId` AS `operationByUserId`,`order`.`operationByUser` AS `operationByUser`,`order`.`operationAt` AS `operationAt`,`article`.`categoryName` AS `categoryName`,`article`.`articleCoverImage` AS `articleCoverImage`,`course`.`courseImage` AS `courseImage`,`course`.`courseTitle` AS `courseTitle`,`store_product`.`productName` AS `productName`,`store_product`.`productImage` AS `productImage`,`order`.`refundRejectReason` AS `refundRejectReason`from(((`order`left join `article` on ((`order`.`articleId` = `article`.`articleId`)))left join `course` on ((`order`.`courseId` = `course`.`courseId`)))left join `store_product` on ((`order`.`productId` = convert(`store_product`.`productId` using utf8mb4))))
view01_order_detail
CREATE ALGORITHM = UNDEFINED DEFINER = `root` @`%` SQL SECURITY DEFINER VIEW `view01_order_detail` ASselect`order`.`id` AS `id`,`order`.`orderId` AS `orderId`,`order`.`orderType` AS `orderType`,`order`.`orderStatus` AS `orderStatus`,`order`.`userName` AS `userName`,`order`.`userId` AS `userId`,`order`.`userPhone` AS `userPhone`,`order`.`userAddress` AS `userAddress`,`order`.`courseId` AS `courseId`,`order`.`memberId` AS `memberId`,`order`.`articleId` AS `articleId`,`order`.`productId` AS `productId`,`order`.`totalNum` AS `totalNum`,`order`.`totalPrice` AS `totalPrice`,`order`.`totalPostage` AS `totalPostage`,`order`.`payPrice` AS `payPrice`,`order`.`payPostage` AS `payPostage`,`order`.`payType` AS `payType`,`order`.`payTradeNo` AS `payTradeNo`,`order`.`payTime` AS `payTime`,`order`.`merchantId` AS `merchantId`,`order`.`payStatus` AS `payStatus`,`order`.`deductionPrice` AS `deductionPrice`,`order`.`couponId` AS `couponId`,`order`.`couponPrice` AS `couponPrice`,`order`.`deliveryName` AS `deliveryName`,`order`.`deliveryType` AS `deliveryType`,`order`.`deliveryNumber` AS `deliveryNumber`,`order`.`refundStatus` AS `refundStatus`,`order`.`refundReason` AS `refundReason`,`order`.`refundReasonPicList` AS `refundReasonPicList`,`order`.`refundApplyTime` AS `refundApplyTime`,`order`.`refundTime` AS `refundTime`,`order`.`refundPrice` AS `refundPrice`,`order`.`mark` AS `mark`,`order`.`isDel` AS `isDel`,`order`.`remark` AS `remark`,`order`.`spreadUserId` AS `spreadUserId`,`order`.`operation` AS `operation`,`order`.`operationByUserId` AS `operationByUserId`,`order`.`operationByUser` AS `operationByUser`,`order`.`operationAt` AS `operationAt`,`course`.`courseTitle` AS `courseTitle`,`article`.`articleTitle` AS `articleTitle`,`store_product`.`productName` AS `productName`from(((`order`left join `course` on ((`order`.`courseId` = `course`.`courseId`)))left join `article` on ((`order`.`articleId` = `article`.`articleId`)))left join `store_product` on ((`order`.`productId` = convert(`store_product`.`productId` using utf8mb4))))
view01_student_learning_record
CREATE ALGORITHM = UNDEFINED DEFINER = `root` @`%` SQL SECURITY DEFINER VIEW `view01_student_learning_record` ASselect`student_learning_record`.`id` AS `id`,`student_learning_record`.`courseMemberId` AS `courseMemberId`,`student_learning_record`.`courseBatchId` AS `courseBatchId`,`student_learning_record`.`courseId` AS `courseId`,`student_learning_record`.`classId` AS `classId`,`student_learning_record`.`memberId` AS `memberId`,`student_learning_record`.`loginId` AS `loginId`,`student_learning_record`.`district` AS `district`,`student_learning_record`.`orgId` AS `orgId`,`student_learning_record`.`orgName` AS `orgName`,`student_learning_record`.`orgFullName` AS `orgFullName`,`student_learning_record`.`roleId` AS `roleId`,`student_learning_record`.`stage` AS `stage`,`student_learning_record`.`title` AS `title`,`student_learning_record`.`position` AS `position`,`student_learning_record`.`memberRole` AS `memberRole`,`student_learning_record`.`result` AS `result`,`student_learning_record`.`note` AS `note`,`student_learning_record`.`comment` AS `comment`,`student_learning_record`.`teacherRecommendation` AS `teacherRecommendation`,`student_learning_record`.`courseCreditEarned` AS `courseCreditEarned`,`student_learning_record`.`examScoreStat` AS `examScoreStat`,`student_learning_record`.`examScoreDetail` AS `examScoreDetail`,`student_learning_record`.`overallComment` AS `overallComment`,`student_learning_record`.`commentDetail` AS `commentDetail`,`student_learning_record`.`attendanceStat` AS `attendanceStat`,`student_learning_record`.`attendanceDetail` AS `attendanceDetail`,`student_learning_record`.`assignmentStat` AS `assignmentStat`,`student_learning_record`.`assignmentDetail` AS `assignmentDetail`,`student_learning_record`.`noteStat` AS `noteStat`,`student_learning_record`.`noteDetail` AS `noteDetail`,`student_learning_record`.`totalLearningHour` AS `totalLearningHour`,`student_learning_record`.`memberCourseStatus` AS `memberCourseStatus`,`student_learning_record`.`nominatedByMemberId` AS `nominatedByMemberId`,`student_learning_record`.`nominatedByUserId` AS `nominatedByUserId`,`student_learning_record`.`nominatedByUser` AS `nominatedByUser`,`student_learning_record`.`dateStarted` AS `dateStarted`,`student_learning_record`.`dateEnded` AS `dateEnded`,`student_learning_record`.`operation` AS `operation`,`student_learning_record`.`operationAt` AS `operationAt`,`student_learning_record`.`operationByUserId` AS `operationByUserId`,`student_learning_record`.`operationByUser` AS `operationByUser`,`course`.`courseTitle` AS `courseName`,`_user`.`username` AS `netName`,`course`.`ownerUserId` AS `ownerUserId`,`course`.`ownerUserName` AS `ownerUserName`from((`student_learning_record`join `course` on ((`student_learning_record`.`courseId` = `course`.`courseId`)))join `_user` on ((`student_learning_record`.`loginId` = `_user`.`userId`)))
view01_user_learing_record
CREATE ALGORITHM = UNDEFINED DEFINER = `root` @`%` SQL SECURITY DEFINER VIEW `view01_user_learing_record` ASselect distinct`user_learing_record`.`id` AS `id`,`user_learing_record`.`courseId` AS `courseId`,`user_learing_record`.`articleId` AS `articleId`,`user_learing_record`.`learingType` AS `learingType`,`user_learing_record`.`operation` AS `operation`,`user_learing_record`.`operationByUserId` AS `operationByUserId`,`user_learing_record`.`operationByUser` AS `operationByUser`,`user_learing_record`.`operationAt` AS `operationAt`,`user_learing_record`.`userId` AS `userId`,`course`.`courseImage` AS `courseImage`,`course`.`courseTitle` AS `courseTitle`,`course`.`coursePrice` AS `coursePrice`,`course`.`userCount` AS `userCount`,`course_article`.`articleTitle` AS `articleTitle`,`course_article`.`articleCoverImage` AS `articleCoverImage`,`course_article`.`articlePrice` AS `articlePrice`,`course_article`.`responseCount` AS `responseCount`from((`user_learing_record`left join `course` on ((`user_learing_record`.`courseId` = `course`.`courseId`)))join `view01_course_article` `course_article` on ((`user_learing_record`.`articleId` = `course_article`.`articleId`)))
view01_user_learing_record_article
CREATE ALGORITHM = UNDEFINED DEFINER = `root` @`%` SQL SECURITY DEFINER VIEW `view01_user_learing_record_article` ASselect`user_learing_record`.`id` AS `id`,`user_learing_record`.`courseId` AS `courseId`,`user_learing_record`.`articleId` AS `articleId`,`user_learing_record`.`learingType` AS `learingType`,`user_learing_record`.`operation` AS `operation`,`user_learing_record`.`operationByUserId` AS `operationByUserId`,`user_learing_record`.`operationByUser` AS `operationByUser`,`user_learing_record`.`operationAt` AS `operationAt`,`user_learing_record`.`userId` AS `userId`,`course`.`courseImage` AS `courseImage`,`course_article`.`articleTitle` AS `articleTitle`,`course_article`.`articleCoverImage` AS `articleCoverImage`,`course_article`.`articlePrice` AS `articlePrice`,`course_article`.`responseCount` AS `responseCount`from((`user_learing_record`join `course` on ((`user_learing_record`.`courseId` = `course`.`courseId`)))join `view01_course_article` `course_article` on ((`user_learing_record`.`articleId` = `course_article`.`articleId`)))where(not((`user_learing_record`.`learingType` like '%course%')))group by`user_learing_record`.`articleId`
view01_user_learing_record_course
CREATE ALGORITHM = UNDEFINED DEFINER = `root` @`%` SQL SECURITY DEFINER VIEW `view01_user_learing_record_course` ASselect distinct`user_learing_record`.`id` AS `id`,`user_learing_record`.`courseId` AS `courseId`,`user_learing_record`.`articleId` AS `articleId`,`user_learing_record`.`learingType` AS `learingType`,`user_learing_record`.`operation` AS `operation`,`user_learing_record`.`operationByUserId` AS `operationByUserId`,`user_learing_record`.`operationByUser` AS `operationByUser`,`user_learing_record`.`operationAt` AS `operationAt`,`user_learing_record`.`userId` AS `userId`,`course`.`courseImage` AS `courseImage`,`course`.`courseTitle` AS `courseTitle`,`course`.`coursePrice` AS `coursePrice`,`course`.`userCount` AS `userCount`from(`user_learing_record`left join `course` on ((`user_learing_record`.`courseId` = `course`.`courseId`)))where(`user_learing_record`.`learingType` = 'course')
view01_user_like
CREATE ALGORITHM = UNDEFINED DEFINER = `root` @`%` SQL SECURITY DEFINER VIEW `view01_user_like` ASselect`user_like`.`userId` AS `userId`,`user_like`.`articleId` AS `articleId`,`user_like`.`courseId` AS `courseId`,`user_like`.`operationAt` AS `operationAt`,`user_like`.`operationByUser` AS `operationByUser`,`user_like`.`operationByUserId` AS `operationByUserId`,`user_like`.`operation` AS `operation`,`course`.`courseTitle` AS `courseTitle`,`course`.`courseType` AS `courseType`,`course`.`coursePrice` AS `coursePrice`,`course`.`courseContent` AS `courseContent`,`course`.`courseImage` AS `courseImage`,`course`.`auditStatus` AS `auditStatus`,`article`.`categoryId` AS `categoryId`,`article`.`articleTitle` AS `articleTitle`,`article`.`articleType` AS `articleType`,`article`.`articleCoverImage` AS `articleCoverImage`,`article`.`articlePrice` AS `articlePrice`,`article`.`articleContent` AS `articleContent`,`article`.`articleContentForSeo` AS `articleContentForSeo`,`article`.`articleAudioUrl` AS `articleAudioUrl`,`article`.`articleCreateTime` AS `articleCreateTime`,`article`.`articleVideoUrl` AS `articleVideoUrl`,`article`.`visitCount` AS `visitCount`,`article`.`auditStatus` AS `articleAuditStatus`,`course`.`userCount` AS `userCount`from((`user_like`left join `course` on ((`user_like`.`courseId` = `course`.`courseId`)))left join `article` on ((`user_like`.`articleId` = `article`.`articleId`)))