数据结构
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 = 8 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 COMMENT 'page文件指定; 默认使用pageId.html',
`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 = 41 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 = 578 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 = 387 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 '测试用例步骤;',
`expectedResult` 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 = 31 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '用户session表; deviceId 维度;软删除未启用;'
reimbursement
- 报销表
CREATE TABLE `reimbursement` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`idSequence` int(11) DEFAULT NULL,
`year` varchar(255) DEFAULT NULL COMMENT '年',
`semester` varchar(255) DEFAULT NULL COMMENT '学期',
`reimbursementId` varchar(255) DEFAULT NULL COMMENT '报销业务ID',
`reimbursementType` varchar(255) DEFAULT NULL COMMENT '报销类别',
`reimbursementReason` varchar(255) DEFAULT NULL COMMENT '报销事由',
`reimbursementAmount` decimal(10, 2) DEFAULT NULL COMMENT '报销金额;报销项的总金额',
`attachment` varchar(255) DEFAULT NULL COMMENT '附件;多个附件用,分隔',
`remarks` varchar(255) DEFAULT NULL COMMENT '备注',
`reimbursementItem` text COMMENT '报销项; [{itemName: '', amount: '', expenseDate: '', remark: ''}]',
`workflow` text COMMENT '流程审核人员;{"1":"E41287U","2":"E41001K"}',
`workflowStage` varchar(255) DEFAULT NULL COMMENT '审核阶段;对应workflow的key值: 1、2 等',
`nextProcess` varchar(255) DEFAULT NULL COMMENT '下一流程',
`latestUpdates` varchar(255) DEFAULT NULL COMMENT '最新操作描述',
`publishStatus` varchar(255) DEFAULT 'publish' COMMENT '发布状态;draft、publish',
`publishAt` varchar(255) DEFAULT NULL COMMENT '发布时间;publishStatus变更为"publish"的时间',
`reviewStatus` varchar(255) DEFAULT '待审核' COMMENT '审核状态;待审核、审核中、审核通过、驳回',
`transferStatus` varchar(255) DEFAULT '待转账' COMMENT '转账状态;待转账、已转账、异常',
`reimbursementStatus` varchar(255) DEFAULT '处理中' COMMENT '报销状态;处理中、已完成、已撤销',
`applicationUserId` varchar(255) DEFAULT NULL COMMENT '申请人Id',
`applicationUser` varchar(255) DEFAULT NULL COMMENT '申请人用户名',
`applicationAt` varchar(255) DEFAULT NULL COMMENT '申请时间',
`notifyUserList` text COMMENT '完成后抄送人员;{"1":"E41287U","2":"E41001K"}',
`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 `reimbursementId` (`reimbursementId`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 127 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '报销表'
reimbursement_confirm_history
- 报销变更记录表
CREATE TABLE `reimbursement_confirm_history` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`reimbursementId` varchar(255) DEFAULT NULL COMMENT '报销业务ID',
`confirmUserId` varchar(255) DEFAULT NULL COMMENT '操作人id',
`confirmUser` varchar(255) DEFAULT NULL COMMENT '操作人',
`confirmAt` varchar(255) DEFAULT NULL COMMENT '操作时间',
`confirmType` varchar(255) DEFAULT NULL COMMENT '操作类型;发起申请、审核、修改申请、转账',
`result` varchar(255) DEFAULT NULL COMMENT '操作结果;审批(通过、驳回)、转账(成功、异常),发起申请/修改申请(成功)',
`duration` varchar(255) DEFAULT NULL COMMENT '耗时(秒)',
`description` varchar(255) DEFAULT NULL COMMENT '操作描述',
`remarks` varchar(255) DEFAULT NULL COMMENT '备注',
`attachment` 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,
KEY `reimbursementId` (`reimbursementId`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 134 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '报销变更记录表'
视图
_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-reimbursement'
)
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-reimbursement'
)
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-reimbursement'
)
employee
CREATE ALGORITHM = UNDEFINED DEFINER = `root` @`%` SQL SECURITY DEFINER VIEW `employee` AS
select
`lms_hr`.`employee`.`id` AS `id`,
`lms_hr`.`employee`.`employeeId` AS `employeeId`,
`lms_hr`.`employee`.`employeeName` AS `employeeName`,
`lms_hr`.`employee`.`idSequence` AS `idSequence`,
`lms_hr`.`employee`.`sex` AS `sex`,
`lms_hr`.`employee`.`age` AS `age`,
`lms_hr`.`employee`.`contactNumber` AS `contactNumber`,
`lms_hr`.`employee`.`emergencyContactNumber` AS `emergencyContactNumber`,
`lms_hr`.`employee`.`post` AS `post`,
`lms_hr`.`employee`.`post2` AS `post2`,
`lms_hr`.`employee`.`post3` AS `post3`,
`lms_hr`.`employee`.`politicalBackground` AS `politicalBackground`,
`lms_hr`.`employee`.`icNumber` AS `icNumber`,
`lms_hr`.`employee`.`dateOfBirth` AS `dateOfBirth`,
`lms_hr`.`employee`.`institution` AS `institution`,
`lms_hr`.`employee`.`major` AS `major`,
`lms_hr`.`employee`.`highestEducation` AS `highestEducation`,
`lms_hr`.`employee`.`teacherQualification` AS `teacherQualification`,
`lms_hr`.`employee`.`teacherQualificationLeaver` AS `teacherQualificationLeaver`,
`lms_hr`.`employee`.`teacherQualificationSubject` AS `teacherQualificationSubject`,
`lms_hr`.`employee`.`teacherCertificationNumber` AS `teacherCertificationNumber`,
`lms_hr`.`employee`.`teachingLevel` AS `teachingLevel`,
`lms_hr`.`employee`.`teachingSubject` AS `teachingSubject`,
`lms_hr`.`employee`.`residentialAddress` AS `residentialAddress`,
`lms_hr`.`employee`.`province` AS `province`,
`lms_hr`.`employee`.`city` AS `city`,
`lms_hr`.`employee`.`county` AS `county`,
`lms_hr`.`employee`.`operationAt` AS `operationAt`,
`lms_hr`.`employee`.`dateOfEntry` AS `dateOfEntry`,
`lms_hr`.`employee`.`dateOfContractExpiration` AS `dateOfContractExpiration`,
`lms_hr`.`employee`.`leaveRequestStatus` AS `leaveRequestStatus`,
`lms_hr`.`employee`.`cardNumber` AS `cardNumber`,
`lms_hr`.`employee`.`licensePlateNumber` AS `licensePlateNumber`,
`lms_hr`.`employee`.`employmentForms` AS `employmentForms`,
`lms_hr`.`employee`.`probationPeriod` AS `probationPeriod`,
`lms_hr`.`employee`.`entryStatus` AS `entryStatus`,
`lms_hr`.`employee`.`status` AS `status`,
`lms_hr`.`employee`.`remarks` AS `remarks`,
`lms_hr`.`employee`.`contactPerson` AS `contactPerson`,
`lms_hr`.`employee`.`educationExperience` AS `educationExperience`,
`lms_hr`.`employee`.`certificate` AS `certificate`,
`lms_hr`.`employee`.`salaryCard` AS `salaryCard`,
`lms_hr`.`employee`.`socialSecurity` AS `socialSecurity`,
`lms_hr`.`employee`.`trainingExperience` AS `trainingExperience`,
`lms_hr`.`employee`.`workExperience` AS `workExperience`,
`lms_hr`.`employee`.`operation` AS `operation`,
`lms_hr`.`employee`.`operationByUserId` AS `operationByUserId`,
`lms_hr`.`employee`.`operationByUser` AS `operationByUser`
from
`lms_hr`.`employee`
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`
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`
view01_member_org_role
CREATE ALGORITHM = UNDEFINED DEFINER = `root` @`%` SQL SECURITY DEFINER VIEW `view01_member_org_role` AS
select
`lms_hr`.`member_org_role`.`id` AS `id`,
`lms_hr`.`member_org_role`.`orgId` AS `orgId`,
`lms_hr`.`member_org_role`.`memberId` AS `memberId`,
`lms_hr`.`member_org_role`.`roleId` AS `roleId`,
`lms_hr`.`member_org_role`.`remark` AS `remark`,
`lms_hr`.`org`.`orgParentId` AS `orgParentId`,
`lms_hr`.`org`.`orgName` AS `orgName`,
`lms_hr`.`employee`.`employeeId` AS `employeeId`,
`lms_hr`.`employee`.`employeeName` AS `employeeName`,
`lms_hr`.`employee`.`idSequence` AS `idSequence`,
`lms_hr`.`employee`.`sex` AS `sex`,
`lms_hr`.`employee`.`age` AS `age`,
`lms_hr`.`employee`.`contactNumber` AS `contactNumber`,
`lms_hr`.`employee`.`emergencyContactNumber` AS `emergencyContactNumber`,
`lms_hr`.`employee`.`post` AS `post`,
`lms_hr`.`employee`.`politicalBackground` AS `politicalBackground`,
`lms_hr`.`employee`.`icNumber` AS `icNumber`,
`lms_hr`.`employee`.`dateOfBirth` AS `dateOfBirth`,
`lms_hr`.`employee`.`institution` AS `institution`,
`lms_hr`.`employee`.`major` AS `major`,
`lms_hr`.`employee`.`highestEducation` AS `highestEducation`,
`lms_hr`.`employee`.`teacherQualification` AS `teacherQualification`,
`lms_hr`.`employee`.`teacherQualificationLeaver` AS `teacherQualificationLeaver`,
`lms_hr`.`employee`.`teacherQualificationSubject` AS `teacherQualificationSubject`,
`lms_hr`.`employee`.`teacherCertificationNumber` AS `teacherCertificationNumber`,
`lms_hr`.`employee`.`teachingLevel` AS `teachingLevel`,
`lms_hr`.`employee`.`teachingSubject` AS `teachingSubject`,
`lms_hr`.`employee`.`residentialAddress` AS `residentialAddress`,
`lms_hr`.`employee`.`province` AS `province`,
`lms_hr`.`employee`.`city` AS `city`,
`lms_hr`.`employee`.`county` AS `county`,
`lms_hr`.`employee`.`dateOfEntry` AS `dateOfEntry`,
`lms_hr`.`employee`.`dateOfContractExpiration` AS `dateOfContractExpiration`,
`lms_hr`.`employee`.`cardNumber` AS `cardNumber`,
`lms_hr`.`employee`.`licensePlateNumber` AS `licensePlateNumber`,
`lms_hr`.`employee`.`employmentForms` AS `employmentForms`,
`lms_hr`.`employee`.`entryStatus` AS `entryStatus`,
`lms_hr`.`employee`.`status` AS `status`,
`lms_hr`.`employee`.`remarks` AS `remarks`
from
(
(
`lms_hr`.`member_org_role`
left join `lms_hr`.`org` on (
(
`lms_hr`.`member_org_role`.`orgId` = `lms_hr`.`org`.`orgId`
)
)
)
left join `lms_hr`.`employee` on (
(
`lms_hr`.`member_org_role`.`memberId` = `lms_hr`.`employee`.`employeeId`
)
)
)
view01_reimbursement
CREATE ALGORITHM = UNDEFINED DEFINER = `root` @`%` SQL SECURITY DEFINER VIEW `view01_reimbursement` AS
select
`reimbursement`.`id` AS `id`,
`reimbursement`.`idSequence` AS `idSequence`,
`reimbursement`.`year` AS `year`,
`reimbursement`.`semester` AS `semester`,
`reimbursement`.`reimbursementId` AS `reimbursementId`,
`reimbursement`.`reimbursementType` AS `reimbursementType`,
`reimbursement`.`reimbursementReason` AS `reimbursementReason`,
`reimbursement`.`reimbursementAmount` AS `reimbursementAmount`,
`reimbursement`.`attachment` AS `attachment`,
`reimbursement`.`remarks` AS `remarks`,
`reimbursement`.`reimbursementItem` AS `reimbursementItem`,
`reimbursement`.`workflow` AS `workflow`,
`reimbursement`.`workflowStage` AS `workflowStage`,
`reimbursement`.`nextProcess` AS `nextProcess`,
`reimbursement`.`latestUpdates` AS `latestUpdates`,
`reimbursement`.`publishStatus` AS `publishStatus`,
`reimbursement`.`publishAt` AS `publishAt`,
`reimbursement`.`reviewStatus` AS `reviewStatus`,
`reimbursement`.`transferStatus` AS `transferStatus`,
`reimbursement`.`reimbursementStatus` AS `reimbursementStatus`,
`reimbursement`.`applicationUserId` AS `applicationUserId`,
`reimbursement`.`applicationUser` AS `applicationUser`,
`reimbursement`.`applicationAt` AS `applicationAt`,
`reimbursement`.`notifyUserList` AS `notifyUserList`,
`reimbursement`.`operation` AS `operation`,
`reimbursement`.`operationByUserId` AS `operationByUserId`,
`reimbursement`.`operationByUser` AS `operationByUser`,
`reimbursement`.`operationAt` AS `operationAt`
from
`reimbursement`