数据结构
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 = 3 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 = 43 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 '数据JSON',
`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 = 2971 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 = 445 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '请求资源表; 软删除未启用; resourceId=`${appId}.${pageId}.${actionId}`'
_test_case
- 测试用例表
CREATE TABLE `_test_case` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`pageId` varchar(255) DEFAULT NULL COMMENT '页面Id',
`testId` varchar(255) DEFAULT NULL COMMENT '测试用例Id; 10000 ++',
`testName` varchar(255) DEFAULT NULL COMMENT '测试用例名',
`uiActionIdList` varchar(255) DEFAULT NULL COMMENT 'uiAction列表; 一个测试用例对应多个uiActionId',
`testOpeartion` text COMMENT '测试用例步骤;',
`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
) 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 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 = 17 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '用户session表; deviceId 维度;软删除未启用;'
employee_hostel
CREATE TABLE `employee_hostel` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`idSequence` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '自增id',
`hostelId` varchar(255) DEFAULT NULL COMMENT '楼ID',
`hostelName` varchar(255) DEFAULT NULL COMMENT '楼名称',
`remarks` varchar(1023) DEFAULT NULL COMMENT '备注',
`operation` varchar(255) DEFAULT NULL 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 '操作时间',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE KEY `hostelId` (`hostelId`) USING BTREE,
KEY `hostelName` (`hostelName`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 26 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin
employee_hostel_bed
CREATE TABLE `employee_hostel_bed` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`employeeId` varchar(255) DEFAULT NULL,
`idSequence` varchar(255) DEFAULT NULL,
`hostelRoomId` varchar(255) DEFAULT NULL COMMENT '房间号',
`hostelBedId` varchar(255) DEFAULT NULL COMMENT '床号',
`remarks` text ,
`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 `uniq` (`employeeId`, `hostelRoomId`, `hostelBedId`) USING BTREE,
KEY `employeeId` (`employeeId`) USING BTREE,
KEY `hostelRoomId` (`hostelRoomId`) USING BTREE,
KEY `hostelBedId` (`hostelBedId`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 190 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin
employee_hostel_history
CREATE TABLE `employee_hostel_history` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`year` varchar(255) DEFAULT NULL COMMENT '年',
`semester` varchar(255) DEFAULT NULL COMMENT '学期',
`employeeId` varchar(255) DEFAULT NULL,
`hostelId` varchar(255) DEFAULT NULL COMMENT '宿舍楼ID',
`hostelName` varchar(255) DEFAULT NULL COMMENT '宿舍楼',
`hostelRoomId` varchar(255) DEFAULT NULL COMMENT '房间号',
`hostelRoomName` varchar(255) DEFAULT NULL COMMENT '房间',
`hostelBedId` varchar(255) DEFAULT NULL COMMENT '床号',
`remarks` text ,
`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 `employeeId` (`employeeId`) USING BTREE,
KEY `hostelRoomId` (`hostelRoomId`) USING BTREE,
KEY `hostelBedId` (`hostelBedId`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 108 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin
employee_hostel_room
CREATE TABLE `employee_hostel_room` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`idSequence` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '自增id',
`hostelRoomId` varchar(255) DEFAULT NULL COMMENT '房间Id',
`hostelRoomName` varchar(255) DEFAULT NULL COMMENT '房间名称',
`hostelId` varchar(255) DEFAULT NULL COMMENT '楼ID',
`floor` int(11) DEFAULT NULL COMMENT '楼层',
`hostelRoomStatus` varchar(255) DEFAULT NULL COMMENT '房间状态',
`bedCount` int(11) DEFAULT NULL COMMENT '床位数量',
`hostelRoomType` varchar(255) DEFAULT NULL COMMENT '宿舍类型',
`remarks` varchar(1023) DEFAULT NULL COMMENT '备注',
`operation` varchar(255) DEFAULT NULL 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 '操作时间',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE KEY `hostelRoomId` (`hostelRoomId`) USING BTREE,
KEY `hostelId` (`hostelId`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 165 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin
student_hostel
CREATE TABLE `student_hostel` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`idSequence` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '自增id',
`hostelId` varchar(255) DEFAULT NULL COMMENT '楼ID',
`hostelName` varchar(255) DEFAULT NULL COMMENT '楼名称',
`remarks` varchar(1023) DEFAULT NULL COMMENT '备注',
`operation` varchar(255) DEFAULT NULL 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 '操作时间',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE KEY `hostelId` (`hostelId`) USING BTREE,
KEY `hostelName` (`hostelName`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 26 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin
student_hostel_bed
CREATE TABLE `student_hostel_bed` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`studentId` varchar(255) DEFAULT NULL,
`idSequence` varchar(255) DEFAULT NULL,
`hostelRoomId` varchar(255) DEFAULT NULL COMMENT '房间号',
`hostelBedId` varchar(255) DEFAULT NULL COMMENT '床号',
`remarks` text ,
`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 `uniq` (`studentId`, `hostelRoomId`, `hostelBedId`) USING BTREE,
KEY `studentId` (`studentId`) USING BTREE,
KEY `hostelRoomId` (`hostelRoomId`) USING BTREE,
KEY `hostelBedId` (`hostelBedId`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 4660 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin
student_hostel_history
CREATE TABLE `student_hostel_history` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`year` varchar(255) DEFAULT NULL COMMENT '年',
`semester` varchar(255) DEFAULT NULL COMMENT '学期',
`studentId` varchar(255) DEFAULT NULL,
`classId` varchar(255) DEFAULT NULL COMMENT '班级ID',
`hostelId` varchar(255) DEFAULT NULL COMMENT '宿舍楼ID',
`hostelName` varchar(255) DEFAULT NULL COMMENT '宿舍楼名',
`hostelRoomId` varchar(255) DEFAULT NULL COMMENT '房间号',
`hostelRoomName` varchar(255) DEFAULT NULL COMMENT '房间名',
`hostelBedId` varchar(255) DEFAULT NULL COMMENT '床号',
`remarks` 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,
KEY `studentId` (`studentId`) USING BTREE,
KEY `hostelRoomId` (`hostelRoomId`) USING BTREE,
KEY `hostelBedId` (`hostelBedId`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2797 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin
student_hostel_room
CREATE TABLE `student_hostel_room` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`idSequence` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '自增id',
`hostelRoomId` varchar(255) DEFAULT NULL COMMENT '房间Id',
`hostelRoomName` varchar(255) DEFAULT NULL COMMENT '房间名称',
`hostelId` varchar(255) DEFAULT NULL COMMENT '楼ID',
`floor` int(11) DEFAULT NULL COMMENT '楼层',
`hostelRoomStatus` varchar(255) DEFAULT NULL COMMENT '房间状态',
`bedCount` int(11) DEFAULT NULL COMMENT '床位数量',
`hostelRoomType` varchar(255) DEFAULT NULL COMMENT '宿舍类型',
`remarks` varchar(1023) DEFAULT NULL COMMENT '备注',
`operation` varchar(255) DEFAULT NULL 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 '操作时间',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE KEY `hostelRoomId` (`hostelRoomId`) USING BTREE,
KEY `hostelId` (`hostelId`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 558 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-hostel'
)
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-hostel'
)
or (
`lms_data_repository`.`enterprise_user_group_role_resource`.`appId` = '*'
)
)
_view01_employee_hostel
CREATE ALGORITHM = UNDEFINED DEFINER = `root` @`%` SQL SECURITY DEFINER VIEW `_view01_employee_hostel` AS
select
`employee_hostel`.`id` AS `id`,
`employee_hostel`.`idSequence` AS `idSequence`,
`employee_hostel`.`hostelId` AS `hostelId`,
`employee_hostel`.`hostelName` AS `hostelName`,
`employee_hostel`.`remarks` AS `remarks`,
`employee_hostel`.`operation` AS `operation`,
`employee_hostel`.`operationByUserId` AS `operationByUserId`,
`employee_hostel`.`operationByUser` AS `operationByUser`,
`employee_hostel`.`operationAt` AS `operationAt`,
count(`_view01_employee_hostel_room`.`hostelRoomId`) AS `roomCount`,
count(distinct `_view01_employee_hostel_room`.`floor`) AS `floorCount`,
coalesce(sum(`_view01_employee_hostel_room`.`bedCount`), 0) AS `bedCount`,
coalesce(
sum(`_view01_employee_hostel_room`.`roomMemberCount`),
0
) AS `memberCount`,
(
coalesce(sum(`_view01_employee_hostel_room`.`bedCount`), 0) - coalesce(
sum(`_view01_employee_hostel_room`.`roomMemberCount`),
0
)
) AS `emptyBedCount`
from
(
`employee_hostel`
left join `_view01_employee_hostel_room` on (
(
`employee_hostel`.`hostelId` = `_view01_employee_hostel_room`.`hostelId`
)
)
)
group by
`employee_hostel`.`hostelId`
_view01_employee_hostel_bed
CREATE ALGORITHM = UNDEFINED DEFINER = `root` @`%` SQL SECURITY DEFINER VIEW `_view01_employee_hostel_bed` AS
select
`lms_hostel`.`employee_hostel_bed`.`id` AS `id`,
`lms_hostel`.`employee_hostel_bed`.`employeeId` AS `employeeId`,
`lms_hostel`.`employee_hostel_bed`.`idSequence` AS `idSequence`,
`lms_hostel`.`employee_hostel_bed`.`hostelRoomId` AS `hostelRoomId`,
`lms_hostel`.`employee_hostel_bed`.`hostelBedId` AS `hostelBedId`,
`lms_hostel`.`employee_hostel_bed`.`remarks` AS `remarks`,
`lms_hostel`.`employee_hostel_bed`.`operation` AS `operation`,
`lms_hostel`.`employee_hostel_bed`.`operationByUserId` AS `operationByUserId`,
`lms_hostel`.`employee_hostel_bed`.`operationByUser` AS `operationByUser`,
`lms_hostel`.`employee_hostel_bed`.`operationAt` AS `operationAt`,
`_view02_employee`.`employeeName` AS `employeeName`,
`_view02_employee`.`post` AS `post`,
`_view02_employee`.`sex` AS `sex`,
`_view02_employee`.`entryStatus` AS `entryStatus`
from
(
`lms_hostel`.`employee_hostel_bed`
left join `lms_hostel`.`_view02_employee` on (
(
`lms_hostel`.`employee_hostel_bed`.`employeeId` = `_view02_employee`.`employeeId`
)
)
)
_view01_employee_hostel_room
CREATE ALGORITHM = UNDEFINED DEFINER = `root` @`%` SQL SECURITY DEFINER VIEW `_view01_employee_hostel_room` AS
select
`employee_hostel_room`.`id` AS `id`,
`employee_hostel_room`.`idSequence` AS `idSequence`,
`employee_hostel_room`.`hostelRoomId` AS `hostelRoomId`,
`employee_hostel_room`.`hostelRoomName` AS `hostelRoomName`,
`employee_hostel_room`.`hostelId` AS `hostelId`,
`employee_hostel`.`hostelName` AS `hostelName`,
`employee_hostel`.`remarks` AS `hostelRemarks`,
`employee_hostel_room`.`floor` AS `floor`,
`employee_hostel_room`.`hostelRoomStatus` AS `hostelRoomStatus`,
`employee_hostel_room`.`bedCount` AS `bedCount`,
`employee_hostel_room`.`hostelRoomType` AS `hostelRoomType`,
`employee_hostel_room`.`remarks` AS `remarks`,
`employee_hostel_room`.`operation` AS `operation`,
`employee_hostel_room`.`operationByUserId` AS `operationByUserId`,
`employee_hostel_room`.`operationByUser` AS `operationByUser`,
`employee_hostel_room`.`operationAt` AS `operationAt`,
count(`employee_hostel_bed`.`employeeId`) AS `roomMemberCount`
from
(
(
`employee_hostel_room`
left join `employee_hostel` on (
(
`employee_hostel_room`.`hostelId` = `employee_hostel`.`hostelId`
)
)
)
left join `employee_hostel_bed` on (
(
`employee_hostel_room`.`hostelRoomId` = `employee_hostel_bed`.`hostelRoomId`
)
)
)
group by
`employee_hostel_room`.`id`
_view01_student_hostel
CREATE ALGORITHM = UNDEFINED DEFINER = `root` @`%` SQL SECURITY DEFINER VIEW `_view01_student_hostel` AS
select
`student_hostel`.`id` AS `id`,
`student_hostel`.`idSequence` AS `idSequence`,
`student_hostel`.`hostelId` AS `hostelId`,
`student_hostel`.`hostelName` AS `hostelName`,
`student_hostel`.`remarks` AS `remarks`,
`student_hostel`.`operation` AS `operation`,
`student_hostel`.`operationByUserId` AS `operationByUserId`,
`student_hostel`.`operationByUser` AS `operationByUser`,
`student_hostel`.`operationAt` AS `operationAt`,
count(`_view01_student_hostel_room`.`hostelRoomId`) AS `roomCount`,
count(distinct `_view01_student_hostel_room`.`floor`) AS `floorCount`,
coalesce(sum(`_view01_student_hostel_room`.`bedCount`), 0) AS `bedCount`,
coalesce(
sum(`_view01_student_hostel_room`.`roomMemberCount`),
0
) AS `memberCount`,
(
coalesce(sum(`_view01_student_hostel_room`.`bedCount`), 0) - coalesce(
sum(`_view01_student_hostel_room`.`roomMemberCount`),
0
)
) AS `emptyBedCount`
from
(
`student_hostel`
left join `_view01_student_hostel_room` on (
(
`student_hostel`.`hostelId` = `_view01_student_hostel_room`.`hostelId`
)
)
)
group by
`student_hostel`.`hostelId`
_view01_student_hostel_bed
CREATE ALGORITHM = UNDEFINED DEFINER = `root` @`%` SQL SECURITY DEFINER VIEW `_view01_student_hostel_bed` AS
select
`lms_hostel`.`student_hostel_bed`.`id` AS `id`,
`lms_hostel`.`student_hostel_bed`.`studentId` AS `studentId`,
`lms_hostel`.`student_hostel_bed`.`idSequence` AS `idSequence`,
`lms_hostel`.`student_hostel_bed`.`hostelRoomId` AS `hostelRoomId`,
`lms_hostel`.`student_hostel_bed`.`hostelBedId` AS `hostelBedId`,
`lms_hostel`.`student_hostel_bed`.`remarks` AS `remarks`,
`lms_hostel`.`student_hostel_bed`.`operation` AS `operation`,
`lms_hostel`.`student_hostel_bed`.`operationByUserId` AS `operationByUserId`,
`lms_hostel`.`student_hostel_bed`.`operationByUser` AS `operationByUser`,
`lms_hostel`.`student_hostel_bed`.`operationAt` AS `operationAt`,
`_view02_student_basic_class`.`name` AS `name`,
`_view02_student_basic_class`.`className` AS `className`,
`_view02_student_basic_class`.`gender` AS `gender`,
`_view02_student_basic_class`.`studentStatus` AS `studentStatus`
from
(
`lms_hostel`.`student_hostel_bed`
left join `lms_hostel`.`_view02_student_basic_class` on (
(
`lms_hostel`.`student_hostel_bed`.`studentId` = `_view02_student_basic_class`.`studentId`
)
)
)
_view01_student_hostel_room
CREATE ALGORITHM = UNDEFINED DEFINER = `root` @`%` SQL SECURITY DEFINER VIEW `_view01_student_hostel_room` AS
select
`student_hostel_room`.`id` AS `id`,
`student_hostel_room`.`idSequence` AS `idSequence`,
`student_hostel_room`.`hostelRoomId` AS `hostelRoomId`,
`student_hostel_room`.`hostelRoomName` AS `hostelRoomName`,
`student_hostel_room`.`hostelId` AS `hostelId`,
`student_hostel`.`hostelName` AS `hostelName`,
`student_hostel`.`remarks` AS `hostelRemarks`,
`student_hostel_room`.`floor` AS `floor`,
`student_hostel_room`.`hostelRoomStatus` AS `hostelRoomStatus`,
`student_hostel_room`.`bedCount` AS `bedCount`,
`student_hostel_room`.`hostelRoomType` AS `hostelRoomType`,
`student_hostel_room`.`remarks` AS `remarks`,
`student_hostel_room`.`operation` AS `operation`,
`student_hostel_room`.`operationByUserId` AS `operationByUserId`,
`student_hostel_room`.`operationByUser` AS `operationByUser`,
`student_hostel_room`.`operationAt` AS `operationAt`,
count(`student_hostel_bed`.`studentId`) AS `roomMemberCount`
from
(
(
`student_hostel_room`
left join `student_hostel` on (
(
`student_hostel_room`.`hostelId` = `student_hostel`.`hostelId`
)
)
)
left join `student_hostel_bed` on (
(
`student_hostel_room`.`hostelRoomId` = `student_hostel_bed`.`hostelRoomId`
)
)
)
group by
`student_hostel_room`.`id`
_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_employee
CREATE ALGORITHM = UNDEFINED DEFINER = `root` @`%` SQL SECURITY DEFINER VIEW `_view02_employee` AS
select
`view01_employee`.`id` AS `id`,
`view01_employee`.`employeeId` AS `employeeId`,
`view01_employee`.`employeeName` AS `employeeName`,
`view01_employee`.`idSequence` AS `idSequence`,
`view01_employee`.`sex` AS `sex`,
`view01_employee`.`age` AS `age`,
`view01_employee`.`contactNumber` AS `contactNumber`,
`view01_employee`.`emergencyContactNumber` AS `emergencyContactNumber`,
`view01_employee`.`post` AS `post`,
`view01_employee`.`politicalBackground` AS `politicalBackground`,
`view01_employee`.`icNumber` AS `icNumber`,
`view01_employee`.`dateOfBirth` AS `dateOfBirth`,
`view01_employee`.`institution` AS `institution`,
`view01_employee`.`major` AS `major`,
`view01_employee`.`highestEducation` AS `highestEducation`,
`view01_employee`.`teacherQualification` AS `teacherQualification`,
`view01_employee`.`teacherQualificationLeaver` AS `teacherQualificationLeaver`,
`view01_employee`.`teacherQualificationSubject` AS `teacherQualificationSubject`,
`view01_employee`.`teacherCertificationNumber` AS `teacherCertificationNumber`,
`view01_employee`.`teachingLevel` AS `teachingLevel`,
`view01_employee`.`teachingSubject` AS `teachingSubject`,
`view01_employee`.`residentialAddress` AS `residentialAddress`,
`view01_employee`.`province` AS `province`,
`view01_employee`.`city` AS `city`,
`view01_employee`.`county` AS `county`,
`view01_employee`.`dateOfEntry` AS `dateOfEntry`,
`view01_employee`.`dateOfContractExpiration` AS `dateOfContractExpiration`,
`view01_employee`.`cardNumber` AS `cardNumber`,
`view01_employee`.`licensePlateNumber` AS `licensePlateNumber`,
`view01_employee`.`employmentForms` AS `employmentForms`,
`view01_employee`.`entryStatus` AS `entryStatus`,
`view01_employee`.`status` AS `status`,
`view01_employee`.`remarks` AS `remarks`,
`view01_employee`.`leaveRequestStatus` AS `leaveRequestStatus`,
`view01_employee`.`contactPerson` AS `contactPerson`,
`view01_employee`.`educationExperience` AS `educationExperience`,
`view01_employee`.`certificate` AS `certificate`,
`view01_employee`.`salaryCard` AS `salaryCard`,
`view01_employee`.`socialSecurity` AS `socialSecurity`,
`view01_employee`.`trainingExperience` AS `trainingExperience`,
`view01_employee`.`workExperience` AS `workExperience`,
`view01_employee`.`operation` AS `operation`,
`view01_employee`.`operationByUserId` AS `operationByUserId`,
`view01_employee`.`operationByUser` AS `operationByUser`,
`view01_employee`.`operationAt` AS `operationAt`,
`view01_employee`.`orgId` AS `orgId`,
`view01_employee`.`orgName` AS `orgName`
from
`lms_hr`.`view01_employee`
_view02_student_basic_class
CREATE ALGORITHM = UNDEFINED DEFINER = `root` @`%` SQL SECURITY DEFINER VIEW `_view02_student_basic_class` AS
select
`view01_student_basic_class`.`studentId` AS `studentId`,
`view01_student_basic_class`.`name` AS `name`,
`view01_student_basic_class`.`year` AS `year`,
`view01_student_basic_class`.`academicYear` AS `academicYear`,
`view01_student_basic_class`.`semester` AS `semester`,
`view01_student_basic_class`.`classNum` AS `classNum`,
`view01_student_basic_class`.`studentStatus` AS `studentStatus`,
`view01_student_basic_class`.`segment` AS `segment`,
`view01_student_basic_class`.`level` AS `level`,
`view01_student_basic_class`.`remarks` AS `remarks`,
`view01_student_basic_class`.`newRemarks` AS `newRemarks`,
`view01_student_basic_class`.`gender` AS `gender`,
`view01_student_basic_class`.`guardian2Contact` AS `guardian2Contact`,
`view01_student_basic_class`.`guardian2Relationship` AS `guardian2Relationship`,
`view01_student_basic_class`.`guardian2Name` AS `guardian2Name`,
`view01_student_basic_class`.`guardian1Contact` AS `guardian1Contact`,
`view01_student_basic_class`.`guardian1Relationship` AS `guardian1Relationship`,
`view01_student_basic_class`.`guardian1Name` AS `guardian1Name`,
`view01_student_basic_class`.`classId` AS `classId`,
`view01_student_basic_class`.`className` AS `className`,
`view01_student_basic_class`.`requestType` AS `requestType`,
`view01_student_basic_class`.`completedClassAssignedYesOrNo` AS `completedClassAssignedYesOrNo`,
`view01_student_basic_class`.`completedEnrollmentRecordYesOrNo` AS `completedEnrollmentRecordYesOrNo`,
`view01_student_basic_class`.`completedLogisticsAssignedYesOrNo` AS `completedLogisticsAssignedYesOrNo`,
`view01_student_basic_class`.`completedPaymentYesOrNo` AS `completedPaymentYesOrNo`,
`view01_student_basic_class`.`completedEnrollmentYesOrNo` AS `completedEnrollmentYesOrNo`,
`view01_student_basic_class`.`completedQuitYesOrNo` AS `completedQuitYesOrNo`,
`view01_student_basic_class`.`id` AS `id`,
`view01_student_basic_class`.`compeletedUpgradeYesOrNo` AS `compeletedUpgradeYesOrNo`,
`view01_student_basic_class`.`enrollmentYear` AS `enrollmentYear`,
`view01_student_basic_class`.`middleSchoolExamScore` AS `middleSchoolExamScore`,
`view01_student_basic_class`.`number` AS `number`
from
`lms_student_admin`.`view01_student_basic_class`
_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-hostel'
)
view01_student_hostel_detail
CREATE ALGORITHM = UNDEFINED DEFINER = `root` @`%` SQL SECURITY DEFINER VIEW `view01_student_hostel_detail` AS
select
`student_hostel_bed`.`id` AS `id`,
`student_hostel_bed`.`studentId` AS `studentId`,
`student_hostel_bed`.`idSequence` AS `idSequence`,
`student_hostel_room`.`hostelId` AS `hostelId`,
`student_hostel`.`hostelName` AS `hostelName`,
`student_hostel_bed`.`hostelRoomId` AS `hostelRoomId`,
`student_hostel_room`.`hostelRoomName` AS `hostelRoomName`,
`student_hostel_bed`.`hostelBedId` AS `hostelBedId`,
`student_hostel_bed`.`remarks` AS `remarks`,
`student_hostel_bed`.`operation` AS `operation`,
`student_hostel_bed`.`operationByUserId` AS `operationByUserId`,
`student_hostel_bed`.`operationByUser` AS `operationByUser`,
`student_hostel_bed`.`operationAt` AS `operationAt`
from
(
(
`student_hostel_bed`
left join `student_hostel_room` on (
(
`student_hostel_bed`.`hostelRoomId` = `student_hostel_room`.`hostelRoomId`
)
)
)
left join `student_hostel` on (
(
`student_hostel_room`.`hostelId` = `student_hostel`.`hostelId`
)
)
)
view01_waiting_student
CREATE ALGORITHM = UNDEFINED DEFINER = `root` @`%` SQL SECURITY DEFINER VIEW `view01_waiting_student` AS
select
`view01_student_basic_class`.`studentId` AS `studentId`,
`view01_student_basic_class`.`name` AS `name`,
`view01_student_basic_class`.`className` AS `className`,
`view01_student_basic_class`.`gender` AS `gender`
from
(
`lms_student_admin`.`view01_student_basic_class`
left join `lms_hostel`.`student_hostel_bed` on (
(
`view01_student_basic_class`.`studentId` = `lms_hostel`.`student_hostel_bed`.`studentId`
)
)
)
where
(
isnull(`lms_hostel`.`student_hostel_bed`.`id`)
and (
`view01_student_basic_class`.`studentStatus` in ('新生', '在校')
)
)
view02_employee_hostel_detail
CREATE ALGORITHM = UNDEFINED DEFINER = `root` @`%` SQL SECURITY DEFINER VIEW `view02_employee_hostel_detail` AS
select
`lms_hostel`.`employee_hostel_bed`.`employeeId` AS `employeeId`,
`lms_hostel`.`employee_hostel_bed`.`hostelRoomId` AS `hostelRoomId`,
`lms_hostel`.`employee_hostel_bed`.`hostelBedId` AS `hostelBedId`,
`lms_hostel`.`employee_hostel_room`.`hostelRoomName` AS `hostelRoomName`,
`lms_hostel`.`employee_hostel`.`hostelName` AS `hostelName`,
`lms_hostel`.`employee_hostel_room`.`hostelId` AS `hostelId`,
`_view02_employee`.`employeeName` AS `employeeName`
from
(
(
(
`lms_hostel`.`employee_hostel_bed`
left join `lms_hostel`.`employee_hostel_room` on (
(
`lms_hostel`.`employee_hostel_bed`.`hostelRoomId` = `lms_hostel`.`employee_hostel_room`.`hostelRoomId`
)
)
)
left join `lms_hostel`.`employee_hostel` on (
(
`lms_hostel`.`employee_hostel_room`.`hostelId` = `lms_hostel`.`employee_hostel`.`hostelId`
)
)
)
left join `lms_hostel`.`_view02_employee` on (
(
`lms_hostel`.`employee_hostel_bed`.`employeeId` = `_view02_employee`.`employeeId`
)
)
)
view02_student_class_hostel
CREATE ALGORITHM = UNDEFINED DEFINER = `root` @`%` SQL SECURITY DEFINER VIEW `view02_student_class_hostel` AS
select
`view01_student_basic_class`.`studentId` AS `studentId`,
`view01_student_basic_class`.`name` AS `name`,
`view01_student_basic_class`.`year` AS `year`,
`view01_student_basic_class`.`academicYear` AS `academicYear`,
`view01_student_basic_class`.`semester` AS `semester`,
`view01_student_basic_class`.`classNum` AS `classNum`,
`view01_student_basic_class`.`studentStatus` AS `studentStatus`,
`view01_student_basic_class`.`level` AS `level`,
`view01_student_basic_class`.`number` AS `number`,
`view01_student_basic_class`.`classId` AS `classId`,
`view01_student_basic_class`.`className` AS `className`,
`lms_hostel`.`student_hostel_bed`.`hostelRoomId` AS `hostelRoomId`,
`lms_hostel`.`student_hostel_bed`.`hostelBedId` AS `hostelBedId`
from
(
`lms_student_admin`.`view01_student_basic_class`
left join `lms_hostel`.`student_hostel_bed` on (
(
`view01_student_basic_class`.`studentId` = `lms_hostel`.`student_hostel_bed`.`studentId`
)
)
)
view02_student_hostel_detail
CREATE ALGORITHM = UNDEFINED DEFINER = `root` @`%` SQL SECURITY DEFINER VIEW `view02_student_hostel_detail` AS
select
`lms_hostel`.`student_hostel_bed`.`id` AS `id`,
`lms_hostel`.`student_hostel_bed`.`studentId` AS `studentId`,
`lms_hostel`.`student_hostel_bed`.`idSequence` AS `idSequence`,
`lms_hostel`.`student_hostel_room`.`hostelId` AS `hostelId`,
`lms_hostel`.`student_hostel`.`hostelName` AS `hostelName`,
`lms_hostel`.`student_hostel_bed`.`hostelRoomId` AS `hostelRoomId`,
`lms_hostel`.`student_hostel_room`.`hostelRoomName` AS `hostelRoomName`,
`lms_hostel`.`student_hostel_bed`.`hostelBedId` AS `hostelBedId`,
`lms_hostel`.`student_hostel_bed`.`remarks` AS `remarks`,
`lms_hostel`.`student_hostel_bed`.`operation` AS `operation`,
`lms_hostel`.`student_hostel_bed`.`operationByUserId` AS `operationByUserId`,
`lms_hostel`.`student_hostel_bed`.`operationByUser` AS `operationByUser`,
`lms_hostel`.`student_hostel_bed`.`operationAt` AS `operationAt`,
`_view02_student_basic_class`.`name` AS `name`
from
(
(
(
`lms_hostel`.`student_hostel_bed`
left join `lms_hostel`.`student_hostel_room` on (
(
`lms_hostel`.`student_hostel_bed`.`hostelRoomId` = `lms_hostel`.`student_hostel_room`.`hostelRoomId`
)
)
)
left join `lms_hostel`.`student_hostel` on (
(
`lms_hostel`.`student_hostel_room`.`hostelId` = `lms_hostel`.`student_hostel`.`hostelId`
)
)
)
left join `lms_hostel`.`_view02_student_basic_class` on (
(
`lms_hostel`.`student_hostel_bed`.`studentId` = `_view02_student_basic_class`.`studentId`
)
)
)