数据结构
12114表总览
普通表
_cache
- 缓存表
CREATE TABLE `_cache` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`userId` varchar(255) NOT NULL COMMENT '用户Id',
`content` longtext COMMENT '缓存数据',
`recordStatus` varchar(255) DEFAULT 'active',
`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 COLLATE = utf8mb4_bin COMMENT = '缓存表'
_constant
- 常量表; 软删除未启用;
CREATE TABLE `_constant` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`constantKey` varchar(255) DEFAULT NULL,
`constantType` varchar(255) DEFAULT NULL COMMENT '常量类型; object, array',
`desc` varchar(255) DEFAULT NULL COMMENT '描述',
`constantValue` text COMMENT '常量内容; object, array',
`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 AUTO_INCREMENT = 5 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '常量表; 软删除未启用;'
_page
- 页面表; 软删除未启用;
CREATE TABLE `_page` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`pageId` varchar(255) DEFAULT NULL COMMENT 'pageId',
`pageFile` varchar(255) DEFAULT NULL,
`pageName` varchar(255) DEFAULT NULL COMMENT 'page name',
`pageType` varchar(255) DEFAULT NULL COMMENT '页面类型; showInMenu, dynamicInMenu',
`sort` varchar(255) DEFAULT NULL,
`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 AUTO_INCREMENT = 18 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '页面表; 软删除未启用;'
_record_history
- 数据历史表
CREATE TABLE `_record_history` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`table` varchar(255) DEFAULT NULL COMMENT '表',
`recordId` int(11) DEFAULT NULL COMMENT '数据在table中的主键id; recordContent.id',
`recordContent` text NOT NULL COMMENT '数据',
`packageContent` text NOT NULL COMMENT '当时请求的 package JSON',
`operation` varchar(255) DEFAULT NULL COMMENT '操作; jhInsert, jhUpdate, jhDelete jhRestore',
`operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者userId; recordContent.operationByUserId',
`operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者用户名; recordContent.operationByUser',
`operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间; recordContent.operationAt; E.g: 2021-05-28T10:24:54+08:00 ',
PRIMARY KEY (`id`) USING BTREE,
KEY `index_record_id` (`recordId`) USING BTREE,
KEY `index_table_action` (`table`, `operation`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 4 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '数据历史表'
_resource
- 请求资源表; 软删除未启用; resourceId=
${appId}.${pageId}.${actionId}
CREATE TABLE `_resource` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`accessControlTable` varchar(255) DEFAULT NULL COMMENT '数据规则控制表',
`resourceHook` text COMMENT '[ "before": {"service": "xx", "serviceFunction": "xxx"}, "after": [] }',
`pageId` varchar(255) DEFAULT NULL COMMENT 'page id; E.g: index',
`actionId` varchar(255) DEFAULT NULL COMMENT 'action id; E.g: selectXXXByXXX',
`desc` varchar(255) DEFAULT NULL COMMENT '描述',
`resourceType` varchar(255) DEFAULT NULL COMMENT 'resource 类型; E.g: auth service sql',
`appDataSchema` text COMMENT 'appData 参数校验',
`resourceData` text COMMENT 'resource 数据; { "service": "auth", "serviceFunction": "passwordLogin" } or { "table": "${tableName}", "action": "select", "whereCondition": ".where(function() {this.whereNot( { recordStatus: \\"active\\" })})" }',
`requestDemo` text COMMENT '请求Demo',
`responseDemo` text COMMENT '响应Demo',
`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 AUTO_INCREMENT = 47 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '请求资源表; 软删除未启用; resourceId=`${appId}.${pageId}.${actionId}`'
_resource_request_log
- 文件表; 软删除未启用;
CREATE TABLE `_resource_request_log` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`resourceId` varchar(255) DEFAULT NULL COMMENT 'resource id;',
`packageId` varchar(255) DEFAULT NULL COMMENT 'resource package id',
`userIp` varchar(255) DEFAULT NULL COMMENT '用户ip;',
`userAgent` varchar(255) DEFAULT NULL COMMENT '设备信息',
`userId` varchar(255) DEFAULT NULL COMMENT '用户ID',
`deviceId` varchar(255) DEFAULT NULL COMMENT '设备id',
`userIpRegion` varchar(255) DEFAULT NULL COMMENT '用户Ip区域',
`executeSql` varchar(255) DEFAULT NULL COMMENT '执行的sql',
`requestBody` longtext COMMENT '请求body',
`responseBody` longtext COMMENT '响应body',
`responseStatus` varchar(255) DEFAULT NULL COMMENT '执行的结果; success, fail',
`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,
KEY `resourceId_index` (`resourceId`) USING BTREE,
KEY `packageId_index` (`packageId`) USING BTREE
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '文件表; 软删除未启用;'
_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 AUTO_INCREMENT = 23 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = 'ui 施工方案'
_user_session
- 用户session表; deviceId 维度;软删除未启用;
CREATE TABLE `_user_session` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`userId` varchar(255) DEFAULT NULL COMMENT '用户id',
`userIp` varchar(255) DEFAULT NULL COMMENT '用户ip',
`userIpRegion` varchar(255) DEFAULT NULL COMMENT '用户Ip区域',
`userAgent` text COMMENT '请求的 agent',
`deviceId` varchar(255) DEFAULT NULL COMMENT '设备id',
`deviceType` varchar(255) DEFAULT 'web' COMMENT '设备类型; flutter, web, bot_databot, bot_chatbot, bot_xiaochengxu',
`socketStatus` varchar(255) DEFAULT 'offline' COMMENT 'socket状态',
`authToken` varchar(255) DEFAULT NULL COMMENT 'auth token',
`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,
KEY `userId_index` (`userId`) USING BTREE,
KEY `userId_deviceId_index` (`userId`, `deviceId`) USING BTREE,
KEY `authToken_index` (`authToken`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '用户session表; deviceId 维度;软删除未启用;'
appraisal
- 周期测评
CREATE TABLE `appraisal` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`idSequence` varchar(255) DEFAULT NULL COMMENT '顺序号',
`appraisalId` varchar(255) DEFAULT NULL COMMENT '评价ID',
`appraisalName` varchar(255) DEFAULT NULL COMMENT '名称',
`appraisalCategory` varchar(255) DEFAULT NULL COMMENT '评语类别',
`year` varchar(255) DEFAULT NULL COMMENT '自然年',
`semester` varchar(255) DEFAULT NULL COMMENT '学期',
`segment` varchar(255) DEFAULT NULL COMMENT '学部',
`level` varchar(255) DEFAULT NULL COMMENT '年级',
`number` varchar(255) DEFAULT NULL COMMENT '班级号',
`classId` varchar(255) DEFAULT NULL COMMENT '班级ID',
`className` varchar(255) DEFAULT NULL,
`appraisalDate` varchar(255) DEFAULT NULL COMMENT '评语日期',
`description` text COMMENT '简介',
`isSendNotice` varchar(255) DEFAULT NULL COMMENT '发送状态',
`sendCount` varchar(255) DEFAULT NULL COMMENT '发送计数',
`operation` varchar(255) DEFAULT NULL,
`operationAt` varchar(255) DEFAULT NULL,
`operationByUserId` varchar(255) DEFAULT NULL,
`operationByUser` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE,
UNIQUE KEY `appraisalId` (`appraisalId`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 29 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '周期测评'
appraisal_student
CREATE TABLE `appraisal_student` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`appraisalStudentId` int(11) DEFAULT NULL,
`studentId` varchar(255) DEFAULT NULL COMMENT '学生ID',
`studentName` varchar(255) DEFAULT NULL COMMENT '学生姓名',
`level` varchar(255) DEFAULT NULL COMMENT '年级ID',
`classId` varchar(255) DEFAULT NULL COMMENT '班级ID',
`className` varchar(255) DEFAULT NULL COMMENT '班级名称',
`teacherId` varchar(255) DEFAULT NULL COMMENT '班主任',
`teacherName` varchar(255) DEFAULT NULL COMMENT '班主任姓名',
`appraisalId` varchar(255) DEFAULT NULL,
`comment` text COMMENT '评语',
`commentMap` text COMMENT '评语结构配置',
`matter` varchar(255) DEFAULT NULL,
`commentDate` varchar(255) DEFAULT NULL,
`commentById` varchar(255) DEFAULT NULL,
`commentByName` varchar(255) DEFAULT NULL,
`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 AUTO_INCREMENT = 5280 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin
comment_for_student_copy1
CREATE TABLE `comment_for_student_copy1` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`studentId` varchar(255) DEFAULT NULL,
`studentName` varchar(255) DEFAULT NULL,
`classId` varchar(255) DEFAULT NULL,
`comment` text ,
`matter` varchar(255) DEFAULT NULL,
`commentDate` varchar(255) DEFAULT NULL,
`commentById` varchar(255) DEFAULT NULL,
`commentByName` varchar(255) DEFAULT NULL,
`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 COLLATE = utf8mb4_bin
notice_task
- 通知任务表(学生维度)
CREATE TABLE `notice_task` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`idSequence` int(11) DEFAULT NULL COMMENT '自增id;',
`taskId` varchar(255) DEFAULT NULL COMMENT '任务Id',
`appraisalId` varchar(255) DEFAULT NULL,
`studentId` varchar(255) DEFAULT NULL COMMENT '学生ID',
`studentName` varchar(255) DEFAULT NULL COMMENT '学生名',
`noticeTemplate` varchar(255) DEFAULT '普通文字消息模版' COMMENT '模板文件名;',
`noticeName` varchar(255) DEFAULT NULL COMMENT '消息名称',
`noticeContent` text COMMENT '消息内容JSON; eg: {"content": "测试推送"}',
`noticeDetailContent` text COMMENT '消息详情页内容JSON',
`isGeneratePush` varchar(255) DEFAULT '否' COMMENT '是否生成推送数据;',
`createAt` varchar(255) DEFAULT NULL COMMENT '创建任务时间;',
`schedulePushAt` varchar(255) DEFAULT NULL COMMENT '计划推送时间; E.g: 2021-05-28T10:24:54+08:00',
`isPushByWxTemplate` varchar(255) DEFAULT NULL COMMENT '是否使用微信模板消息推送',
`appId` varchar(255) DEFAULT NULL COMMENT '消息来源业务ID',
`noticeBatchId` varchar(255) DEFAULT NULL COMMENT '成绩通知生成批次编号',
`noticeData` varchar(255) DEFAULT NULL COMMENT '消息业务数据',
`noticeStatus` varchar(255) DEFAULT NULL COMMENT '消息状态:new-新建, draft-草稿, publish-发布',
`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 `task_unique` (`taskId`) USING BTREE
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '通知任务表(学生维度)'
notice_template
CREATE TABLE `notice_template` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`noticeTemplateId` varchar(255) DEFAULT NULL,
`noticeTemplate` varchar(255) DEFAULT NULL,
`noticeContent` text ,
`noticeDetailContent` text ,
`noticeTemplateStatus` varchar(255) DEFAULT NULL,
`operation` varchar(255) DEFAULT 'insert',
`operationByUserId` varchar(255) DEFAULT NULL,
`operationByUser` varchar(255) DEFAULT NULL,
`operationAt` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin
视图
_directory_user_session
CREATE ALGORITHM = UNDEFINED DEFINER = `root` @`%` SQL SECURITY DEFINER VIEW `_directory_user_session` AS
select
`lms_data_repository`.`enterprise_directory_user_session`.`id` AS `id`,
`lms_data_repository`.`enterprise_directory_user_session`.`userId` AS `userId`,
`lms_data_repository`.`enterprise_directory_user_session`.`userIp` AS `userIp`,
`lms_data_repository`.`enterprise_directory_user_session`.`userIpRegion` AS `userIpRegion`,
`lms_data_repository`.`enterprise_directory_user_session`.`userAgent` AS `userAgent`,
`lms_data_repository`.`enterprise_directory_user_session`.`deviceId` AS `deviceId`,
`lms_data_repository`.`enterprise_directory_user_session`.`deviceType` AS `deviceType`,
`lms_data_repository`.`enterprise_directory_user_session`.`socketStatus` AS `socketStatus`,
`lms_data_repository`.`enterprise_directory_user_session`.`authToken` AS `authToken`,
`lms_data_repository`.`enterprise_directory_user_session`.`operation` AS `operation`,
`lms_data_repository`.`enterprise_directory_user_session`.`operationByUserId` AS `operationByUserId`,
`lms_data_repository`.`enterprise_directory_user_session`.`operationByUser` AS `operationByUser`,
`lms_data_repository`.`enterprise_directory_user_session`.`operationAt` AS `operationAt`
from
`lms_data_repository`.`enterprise_directory_user_session`
_group
CREATE ALGORITHM = UNDEFINED DEFINER = `root` @`%` SQL SECURITY DEFINER VIEW `_group` AS
select
`lms_data_repository`.`enterprise_group`.`id` AS `id`,
`lms_data_repository`.`enterprise_group`.`groupId` AS `groupId`,
`lms_data_repository`.`enterprise_group`.`groupLastId` AS `groupLastId`,
`lms_data_repository`.`enterprise_group`.`groupPath` AS `groupPath`,
`lms_data_repository`.`enterprise_group`.`groupName` AS `groupName`,
`lms_data_repository`.`enterprise_group`.`groupDeptName` AS `groupDeptName`,
`lms_data_repository`.`enterprise_group`.`groupAllName` AS `groupAllName`,
`lms_data_repository`.`enterprise_group`.`principalId` AS `principalId`,
`lms_data_repository`.`enterprise_group`.`headId` AS `headId`,
`lms_data_repository`.`enterprise_group`.`leadId` AS `leadId`,
`lms_data_repository`.`enterprise_group`.`groupDesc` AS `groupDesc`,
`lms_data_repository`.`enterprise_group`.`operation` AS `operation`,
`lms_data_repository`.`enterprise_group`.`operationByUserId` AS `operationByUserId`,
`lms_data_repository`.`enterprise_group`.`operationByUser` AS `operationByUser`,
`lms_data_repository`.`enterprise_group`.`operationAt` AS `operationAt`
from
`lms_data_repository`.`enterprise_group`
_role
CREATE ALGORITHM = UNDEFINED DEFINER = `root` @`%` SQL SECURITY DEFINER VIEW `_role` AS
select
`lms_data_repository`.`enterprise_role`.`id` AS `id`,
`lms_data_repository`.`enterprise_role`.`roleId` AS `roleId`,
`lms_data_repository`.`enterprise_role`.`roleName` AS `roleName`,
`lms_data_repository`.`enterprise_role`.`roleType` AS `roleType`,
`lms_data_repository`.`enterprise_role`.`roleDesc` AS `roleDesc`,
`lms_data_repository`.`enterprise_role`.`operation` AS `operation`,
`lms_data_repository`.`enterprise_role`.`operationByUserId` AS `operationByUserId`,
`lms_data_repository`.`enterprise_role`.`operationByUser` AS `operationByUser`,
`lms_data_repository`.`enterprise_role`.`operationAt` AS `operationAt`
from
`lms_data_repository`.`enterprise_role`
_user_group_role
CREATE ALGORITHM = UNDEFINED DEFINER = `root` @`%` SQL SECURITY DEFINER VIEW `_user_group_role` AS
select
`lms_data_repository`.`enterprise_user_group_role`.`id` AS `id`,
`lms_data_repository`.`enterprise_user_group_role`.`userId` AS `userId`,
`lms_data_repository`.`enterprise_user_group_role`.`groupId` AS `groupId`,
`lms_data_repository`.`enterprise_user_group_role`.`roleId` AS `roleId`,
`lms_data_repository`.`enterprise_user_group_role`.`roleDeadline` AS `roleDeadline`,
`lms_data_repository`.`enterprise_user_group_role`.`operation` AS `operation`,
`lms_data_repository`.`enterprise_user_group_role`.`operationByUserId` AS `operationByUserId`,
`lms_data_repository`.`enterprise_user_group_role`.`operationByUser` AS `operationByUser`,
`lms_data_repository`.`enterprise_user_group_role`.`operationAt` AS `operationAt`
from
`lms_data_repository`.`enterprise_user_group_role`
_user_group_role_page
CREATE ALGORITHM = UNDEFINED DEFINER = `root` @`%` SQL SECURITY DEFINER VIEW `_user_group_role_page` AS
select
`lms_data_repository`.`enterprise_user_group_role_page`.`id` AS `id`,
`lms_data_repository`.`enterprise_user_group_role_page`.`appId` AS `appId`,
`lms_data_repository`.`enterprise_user_group_role_page`.`user` AS `user`,
`lms_data_repository`.`enterprise_user_group_role_page`.`group` AS `group`,
`lms_data_repository`.`enterprise_user_group_role_page`.`role` AS `role`,
`lms_data_repository`.`enterprise_user_group_role_page`.`page` AS `page`,
`lms_data_repository`.`enterprise_user_group_role_page`.`allowOrDeny` AS `allowOrDeny`,
`lms_data_repository`.`enterprise_user_group_role_page`.`desc` AS `desc`,
`lms_data_repository`.`enterprise_user_group_role_page`.`source` AS `source`,
`lms_data_repository`.`enterprise_user_group_role_page`.`operation` AS `operation`,
`lms_data_repository`.`enterprise_user_group_role_page`.`operationByUserId` AS `operationByUserId`,
`lms_data_repository`.`enterprise_user_group_role_page`.`operationByUser` AS `operationByUser`,
`lms_data_repository`.`enterprise_user_group_role_page`.`operationAt` AS `operationAt`
from
`lms_data_repository`.`enterprise_user_group_role_page`
where
(
(
`lms_data_repository`.`enterprise_user_group_role_page`.`appId` = 'lms-mentor'
)
or (
`lms_data_repository`.`enterprise_user_group_role_page`.`appId` = '*'
)
)
_user_group_role_resource
CREATE ALGORITHM = UNDEFINED DEFINER = `root` @`%` SQL SECURITY DEFINER VIEW `_user_group_role_resource` AS
select
`lms_data_repository`.`enterprise_user_group_role_resource`.`id` AS `id`,
`lms_data_repository`.`enterprise_user_group_role_resource`.`appId` AS `appId`,
`lms_data_repository`.`enterprise_user_group_role_resource`.`user` AS `user`,
`lms_data_repository`.`enterprise_user_group_role_resource`.`group` AS `group`,
`lms_data_repository`.`enterprise_user_group_role_resource`.`role` AS `role`,
`lms_data_repository`.`enterprise_user_group_role_resource`.`resource` AS `resource`,
`lms_data_repository`.`enterprise_user_group_role_resource`.`allowOrDeny` AS `allowOrDeny`,
`lms_data_repository`.`enterprise_user_group_role_resource`.`desc` AS `desc`,
`lms_data_repository`.`enterprise_user_group_role_resource`.`source` AS `source`,
`lms_data_repository`.`enterprise_user_group_role_resource`.`operation` AS `operation`,
`lms_data_repository`.`enterprise_user_group_role_resource`.`operationByUserId` AS `operationByUserId`,
`lms_data_repository`.`enterprise_user_group_role_resource`.`operationByUser` AS `operationByUser`,
`lms_data_repository`.`enterprise_user_group_role_resource`.`operationAt` AS `operationAt`
from
`lms_data_repository`.`enterprise_user_group_role_resource`
where
(
(
`lms_data_repository`.`enterprise_user_group_role_resource`.`appId` = 'lms-mentor'
)
or (
`lms_data_repository`.`enterprise_user_group_role_resource`.`appId` = '*'
)
)
_view01_user
CREATE ALGORITHM = UNDEFINED DEFINER = `root` @`%` SQL SECURITY DEFINER VIEW `_view01_user` AS
select
`lms_data_repository`.`enterprise_view01_user`.`id` AS `id`,
`lms_data_repository`.`enterprise_view01_user`.`idSequence` AS `idSequence`,
`lms_data_repository`.`enterprise_view01_user`.`userId` AS `userId`,
`lms_data_repository`.`enterprise_view01_user`.`username` AS `username`,
`lms_data_repository`.`enterprise_view01_user`.`phoneNumber` AS `phoneNumber`,
`lms_data_repository`.`enterprise_view01_user`.`email` AS `email`,
`lms_data_repository`.`enterprise_view01_user`.`userStatus` AS `userStatus`,
`lms_data_repository`.`enterprise_view01_user`.`qiweiId` AS `qiweiId`,
`lms_data_repository`.`enterprise_view01_user`.`userConfig` AS `userConfig`,
`lms_data_repository`.`enterprise_view01_user`.`password` AS `password`,
`lms_data_repository`.`enterprise_view01_user`.`md5Salt` AS `md5Salt`,
`lms_data_repository`.`enterprise_view01_user`.`clearTextPassword` AS `clearTextPassword`,
`lms_data_repository`.`enterprise_view01_user`.`operation` AS `operation`,
`lms_data_repository`.`enterprise_view01_user`.`operationByUserId` AS `operationByUserId`,
`lms_data_repository`.`enterprise_view01_user`.`operationByUser` AS `operationByUser`,
`lms_data_repository`.`enterprise_view01_user`.`operationAt` AS `operationAt`
from
`lms_data_repository`.`enterprise_view01_user`
_view02_user_app
CREATE ALGORITHM = UNDEFINED DEFINER = `root` @`%` SQL SECURITY DEFINER VIEW `_view02_user_app` AS
select
`lms_data_repository`.`enterprise_view02_user_app`.`id` AS `id`,
`lms_data_repository`.`enterprise_view02_user_app`.`userId` AS `userId`,
`lms_data_repository`.`enterprise_view02_user_app`.`appId` AS `appId`
from
`lms_data_repository`.`enterprise_view02_user_app`
where
(
`lms_data_repository`.`enterprise_view02_user_app`.`appId` = 'lms-mentor'
)
view01_class
CREATE ALGORITHM = UNDEFINED DEFINER = `root` @`%` SQL SECURITY DEFINER VIEW `view01_class` AS
select
`lms_student_admin`.`class`.`id` AS `id`,
`lms_student_admin`.`class`.`year` AS `year`,
`lms_student_admin`.`class`.`academicYear` AS `academicYear`,
`lms_student_admin`.`class`.`semester` AS `semester`,
`lms_student_admin`.`class`.`segment` AS `segment`,
`lms_student_admin`.`class`.`level` AS `level`,
`lms_student_admin`.`class`.`number` AS `number`,
`lms_student_admin`.`class`.`classId` AS `classId`,
`lms_student_admin`.`class`.`className` AS `className`,
`lms_student_admin`.`class`.`classNum` AS `classNum`,
`lms_student_admin`.`class`.`formTeacherId` AS `formTeacherId`,
`lms_student_admin`.`class`.`formTeacherName` AS `formTeacherName`,
`lms_student_admin`.`class`.`formTeacherGender` AS `formTeacherGender`,
`lms_student_admin`.`class`.`formTeacherContact` AS `formTeacherContact`,
`lms_student_admin`.`class`.`learningTrack` AS `learningTrack`,
`lms_student_admin`.`class`.`classType` AS `classType`,
`lms_student_admin`.`class`.`classTagList` AS `classTagList`,
`lms_student_admin`.`class`.`classCreatedBy` AS `classCreatedBy`,
`lms_student_admin`.`class`.`remarks` AS `remarks`,
`lms_student_admin`.`class`.`classStatus` AS `classStatus`,
`lms_student_admin`.`class`.`operation` AS `operation`,
`lms_student_admin`.`class`.`operationByUserId` AS `operationByUserId`,
`lms_student_admin`.`class`.`operationByUser` AS `operationByUser`,
`lms_student_admin`.`class`.`operationAt` AS `operationAt`
from
`lms_student_admin`.`class`
view01_class_all
CREATE ALGORITHM = UNDEFINED DEFINER = `root` @`%` SQL SECURITY DEFINER VIEW `view01_class_all` AS
select
`lms_student_admin`.`class`.`id` AS `id`,
`lms_student_admin`.`class`.`year` AS `year`,
`lms_student_admin`.`class`.`academicYear` AS `academicYear`,
`lms_student_admin`.`class`.`semester` AS `semester`,
`lms_student_admin`.`class`.`segment` AS `segment`,
`lms_student_admin`.`class`.`level` AS `level`,
`lms_student_admin`.`class`.`number` AS `number`,
`lms_student_admin`.`class`.`classId` AS `classId`,
`lms_student_admin`.`class`.`className` AS `className`,
`lms_student_admin`.`class`.`classNum` AS `classNum`,
`lms_student_admin`.`class`.`formTeacherId` AS `formTeacherId`,
`lms_student_admin`.`class`.`formTeacherName` AS `formTeacherName`,
`lms_student_admin`.`class`.`formTeacherGender` AS `formTeacherGender`,
`lms_student_admin`.`class`.`formTeacherContact` AS `formTeacherContact`,
`lms_student_admin`.`class`.`learningTrack` AS `learningTrack`,
`lms_student_admin`.`class`.`classType` AS `classType`,
`lms_student_admin`.`class`.`classTagList` AS `classTagList`,
`lms_student_admin`.`class`.`classCreatedBy` AS `classCreatedBy`,
`lms_student_admin`.`class`.`remarks` AS `remarks`,
`lms_student_admin`.`class`.`classStatus` AS `classStatus`,
`lms_student_admin`.`class`.`operation` AS `operation`,
`lms_student_admin`.`class`.`operationByUserId` AS `operationByUserId`,
`lms_student_admin`.`class`.`operationByUser` AS `operationByUser`,
`lms_student_admin`.`class`.`operationAt` AS `operationAt`
from
`lms_student_admin`.`class`
union
select
`lms_student_admin`.`class_history`.`id` AS `id`,
`lms_student_admin`.`class_history`.`year` AS `year`,
`lms_student_admin`.`class_history`.`academicYear` AS `academicYear`,
`lms_student_admin`.`class_history`.`semester` AS `semester`,
`lms_student_admin`.`class_history`.`segment` AS `segment`,
`lms_student_admin`.`class_history`.`level` AS `level`,
`lms_student_admin`.`class_history`.`number` AS `number`,
`lms_student_admin`.`class_history`.`classId` AS `classId`,
`lms_student_admin`.`class_history`.`className` AS `className`,
`lms_student_admin`.`class_history`.`classNum` AS `classNum`,
`lms_student_admin`.`class_history`.`formTeacherId` AS `formTeacherId`,
`lms_student_admin`.`class_history`.`formTeacherName` AS `formTeacherName`,
`lms_student_admin`.`class_history`.`formTeacherGender` AS `formTeacherGender`,
`lms_student_admin`.`class_history`.`formTeacherContact` AS `formTeacherContact`,
`lms_student_admin`.`class_history`.`learningTrack` AS `learningTrack`,
`lms_student_admin`.`class_history`.`classType` AS `classType`,
`lms_student_admin`.`class_history`.`classTagList` AS `classTagList`,
`lms_student_admin`.`class_history`.`classCreatedBy` AS `classCreatedBy`,
`lms_student_admin`.`class_history`.`remarks` AS `remarks`,
`lms_student_admin`.`class_history`.`classStatus` AS `classStatus`,
`lms_student_admin`.`class_history`.`operation` AS `operation`,
`lms_student_admin`.`class_history`.`operationByUserId` AS `operationByUserId`,
`lms_student_admin`.`class_history`.`operationByUser` AS `operationByUser`,
`lms_student_admin`.`class_history`.`operationAt` AS `operationAt`
from
`lms_student_admin`.`class_history`
view02_appraisal
CREATE ALGORITHM = UNDEFINED DEFINER = `root` @`%` SQL SECURITY DEFINER VIEW `view02_appraisal` AS
select
`lms_mentor`.`appraisal`.`id` AS `id`,
`lms_mentor`.`appraisal`.`idSequence` AS `idSequence`,
`lms_mentor`.`appraisal`.`appraisalId` AS `appraisalId`,
`lms_mentor`.`appraisal`.`appraisalName` AS `appraisalName`,
`lms_mentor`.`appraisal`.`year` AS `year`,
`lms_mentor`.`appraisal`.`semester` AS `semester`,
`lms_mentor`.`appraisal`.`segment` AS `segment`,
`lms_mentor`.`appraisal`.`level` AS `level`,
`lms_mentor`.`appraisal`.`number` AS `number`,
`lms_mentor`.`appraisal`.`className` AS `className`,
`lms_mentor`.`appraisal`.`appraisalDate` AS `appraisalDate`,
`lms_mentor`.`appraisal`.`description` AS `description`,
`lms_mentor`.`appraisal`.`isSendNotice` AS `isSendNotice`,
`lms_mentor`.`appraisal`.`sendCount` AS `sendCount`,
`lms_mentor`.`appraisal`.`operation` AS `operation`,
`lms_mentor`.`appraisal`.`operationAt` AS `operationAt`,
`lms_mentor`.`appraisal`.`operationByUserId` AS `operationByUserId`,
`lms_mentor`.`appraisal`.`operationByUser` AS `operationByUser`,
`lms_mentor`.`appraisal`.`classId` AS `classId`,
group_concat(
distinct `view01_class`.`formTeacherId` separator ','
) AS `teacherId`,
`lms_mentor`.`appraisal`.`appraisalCategory` AS `appraisalCategory`
from
(
(
`lms_mentor`.`appraisal`
left join `lms_mentor`.`appraisal_student` on (
(
`lms_mentor`.`appraisal`.`appraisalId` = `lms_mentor`.`appraisal_student`.`appraisalId`
)
)
)
left join `lms_mentor`.`view01_class` on (
(
`lms_mentor`.`appraisal_student`.`classId` = `view01_class`.`classId`
)
)
)
group by
`lms_mentor`.`appraisal`.`appraisalId`
view02_appraisal_student
CREATE ALGORITHM = UNDEFINED DEFINER = `root` @`%` SQL SECURITY DEFINER VIEW `view02_appraisal_student` AS
select
`lms_mentor`.`appraisal_student`.`id` AS `id`,
`lms_mentor`.`appraisal_student`.`appraisalStudentId` AS `appraisalStudentId`,
`lms_mentor`.`appraisal_student`.`studentId` AS `studentId`,
`lms_mentor`.`appraisal_student`.`studentName` AS `studentName`,
`lms_mentor`.`appraisal_student`.`level` AS `level`,
`lms_mentor`.`appraisal_student`.`classId` AS `classId`,
`lms_mentor`.`appraisal_student`.`appraisalId` AS `appraisalId`,
`lms_mentor`.`appraisal_student`.`comment` AS `comment`,
`lms_mentor`.`appraisal_student`.`commentMap` AS `commentMap`,
`lms_mentor`.`appraisal_student`.`matter` AS `matter`,
`lms_mentor`.`appraisal_student`.`commentDate` AS `commentDate`,
`lms_mentor`.`appraisal_student`.`commentById` AS `commentById`,
`lms_mentor`.`appraisal_student`.`commentByName` AS `commentByName`,
`lms_mentor`.`appraisal_student`.`operation` AS `operation`,
`lms_mentor`.`appraisal_student`.`operationByUserId` AS `operationByUserId`,
`lms_mentor`.`appraisal_student`.`operationByUser` AS `operationByUser`,
`lms_mentor`.`appraisal_student`.`operationAt` AS `operationAt`,
`lms_mentor`.`appraisal`.`year` AS `year`,
`lms_mentor`.`appraisal`.`semester` AS `semester`,
`lms_mentor`.`appraisal_student`.`className` AS `className`,
`view01_class`.`number` AS `number`,
`view01_class`.`formTeacherId` AS `teacherId`,
`view01_class`.`formTeacherName` AS `teacherName`,
`lms_mentor`.`appraisal`.`segment` AS `segment`,
`lms_mentor`.`appraisal`.`appraisalCategory` AS `appraisalCategory`
from
(
(
`lms_mentor`.`appraisal_student`
left join `lms_mentor`.`appraisal` on (
(
`lms_mentor`.`appraisal_student`.`appraisalId` = `lms_mentor`.`appraisal`.`appraisalId`
)
)
)
left join `lms_mentor`.`view01_class` on (
(
`lms_mentor`.`appraisal_student`.`classId` = `view01_class`.`classId`
)
)
)
view_student_basic
CREATE ALGORITHM = UNDEFINED DEFINER = `root` @`%` SQL SECURITY DEFINER VIEW `view_student_basic` AS
select
`lms_student_admin`.`student_basic`.`id` AS `id`,
`lms_student_admin`.`student_basic`.`enrollmentYear` AS `enrollmentYear`,
`lms_student_admin`.`student_basic`.`enrollmentSemester` AS `enrollmentSemester`,
`lms_student_admin`.`student_basic`.`enrollmentDate` AS `enrollmentDate`,
`lms_student_admin`.`student_basic`.`studentId` AS `studentId`,
`lms_student_admin`.`student_basic`.`classId` AS `classId`,
`lms_student_admin`.`student_basic`.`idSequence` AS `idSequence`,
`lms_student_admin`.`student_basic`.`enrollmentSegment` AS `enrollmentSegment`,
`lms_student_admin`.`student_basic`.`enrollmentLevel` AS `enrollmentLevel`,
`lms_student_admin`.`student_basic`.`enrollmentClassId` AS `enrollmentClassId`,
`lms_student_admin`.`student_basic`.`name` AS `name`,
`lms_student_admin`.`student_basic`.`gender` AS `gender`,
`lms_student_admin`.`student_basic`.`studentStatus` AS `studentStatus`,
`lms_student_admin`.`student_basic`.`icNumber` AS `icNumber`,
`lms_student_admin`.`student_basic`.`scholarshipLevel` AS `scholarshipLevel`,
`lms_student_admin`.`student_basic`.`requestType` AS `requestType`,
`lms_student_admin`.`student_basic`.`afterSchoolCareType` AS `afterSchoolCareType`,
`lms_student_admin`.`student_basic`.`residentialAddress` AS `residentialAddress`,
`lms_student_admin`.`student_basic`.`guardian1Name` AS `guardian1Name`,
`lms_student_admin`.`student_basic`.`guardian1Relationship` AS `guardian1Relationship`,
`lms_student_admin`.`student_basic`.`guardian1Contact` AS `guardian1Contact`,
`lms_student_admin`.`student_basic`.`guardian1ResidentialAddress` AS `guardian1ResidentialAddress`,
`lms_student_admin`.`student_basic`.`guardian2Name` AS `guardian2Name`,
`lms_student_admin`.`student_basic`.`guardian2Relationship` AS `guardian2Relationship`,
`lms_student_admin`.`student_basic`.`guardian2Contact` AS `guardian2Contact`,
`lms_student_admin`.`student_basic`.`guardian2ResidentialAddress` AS `guardian2ResidentialAddress`,
`lms_student_admin`.`student_basic`.`remarks` AS `remarks`,
`lms_student_admin`.`student_basic`.`newRemarks` AS `newRemarks`,
`lms_student_admin`.`student_basic`.`hostelName` AS `hostelName`,
`lms_student_admin`.`student_basic`.`hostelUnitNumber` AS `hostelUnitNumber`,
`lms_student_admin`.`student_basic`.`hostelBedId` AS `hostelBedId`,
`lms_student_admin`.`student_basic`.`dining_canteen_table` AS `dining_canteen_table`,
`lms_student_admin`.`student_basic`.`completedEnrollmentRecordYesOrNo` AS `completedEnrollmentRecordYesOrNo`,
`lms_student_admin`.`student_basic`.`completedClassAssignedYesOrNo` AS `completedClassAssignedYesOrNo`,
`lms_student_admin`.`student_basic`.`completedLogisticsAssignedYesOrNo` AS `completedLogisticsAssignedYesOrNo`,
`lms_student_admin`.`student_basic`.`completedPaymentYesOrNo` AS `completedPaymentYesOrNo`,
`lms_student_admin`.`student_basic`.`completedEnrollmentYesOrNo` AS `completedEnrollmentYesOrNo`,
`lms_student_admin`.`student_basic`.`completedQuitYesOrNo` AS `completedQuitYesOrNo`,
`lms_student_admin`.`student_basic`.`compeletedUpgradeYesOrNo` AS `compeletedUpgradeYesOrNo`,
`lms_student_admin`.`student_basic`.`enrolledBy` AS `enrolledBy`,
`lms_student_admin`.`student_basic`.`classAssignedBy` AS `classAssignedBy`,
`lms_student_admin`.`student_basic`.`paymentReceivedBy` AS `paymentReceivedBy`,
`lms_student_admin`.`student_basic`.`checkPaymentStatusBy` AS `checkPaymentStatusBy`,
`lms_student_admin`.`student_basic`.`hostelAssignedBy` AS `hostelAssignedBy`,
`lms_student_admin`.`student_basic`.`enrollmentApprovedBy` AS `enrollmentApprovedBy`,
`lms_student_admin`.`student_basic`.`quitApprovedBy` AS `quitApprovedBy`,
`lms_student_admin`.`student_basic`.`operation` AS `operation`,
`lms_student_admin`.`student_basic`.`operationAt` AS `operationAt`,
`lms_student_admin`.`student_basic`.`operationByUserId` AS `operationByUserId`,
`lms_student_admin`.`student_basic`.`operationByUser` AS `operationByUser`,
`lms_student_admin`.`student_basic`.`completedQuitAssignedYesOrNo` AS `completedQuitAssignedYesOrNo`,
`lms_student_admin`.`student_basic`.`quitHostelAssignedBy` AS `quitHostelAssignedBy`,
`lms_student_admin`.`student_basic`.`completedQuitPaymentYesOrNo` AS `completedQuitPaymentYesOrNo`,
`lms_student_admin`.`student_basic`.`quitPaymentBy` AS `quitPaymentBy`,
`lms_student_admin`.`student_basic`.`middleSchoolExamScore` AS `middleSchoolExamScore`,
`lms_student_admin`.`student_basic`.`middleSchoolExamSequence` AS `middleSchoolExamSequence`,
`view01_class`.`level` AS `level`
from
(
`lms_student_admin`.`student_basic`
left join `lms_mentor`.`view01_class` on (
(
`lms_student_admin`.`student_basic`.`classId` = `view01_class`.`classId`
)
)
)