数据结构

12135

表总览

通用表

业务表

_ui

  • ui 施工方案
  1. CREATE TABLE `_ui` (
  2. `id` int(11) NOT NULL AUTO_INCREMENT,
  3. `pageId` varchar(255) DEFAULT NULL COMMENT 'page id; E.g: index',
  4. `uiActionType` varchar(255) DEFAULT NULL COMMENT 'ui 动作类型,如:fetchData, postData, changeUi',
  5. `uiActionId` varchar(255) DEFAULT NULL COMMENT 'action id; E.g: selectXXXByXXX',
  6. `desc` varchar(255) DEFAULT NULL COMMENT '描述',
  7. `uiActionConfig` text COMMENT 'ui 动作数据',
  8. `appDataSchema` text COMMENT 'ui 校验数据',
  9. `operation` varchar(255) DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',
  10. `operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者userId',
  11. `operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者用户名',
  12. `operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00 ',
  13. PRIMARY KEY (`id`) USING BTREE
  14. ) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 ROW_FORMAT = DYNAMIC COMMENT = 'ui 施工方案'

task

  • 任务表
  1. CREATE TABLE `task` (
  2. `id` int(11) NOT NULL AUTO_INCREMENT,
  3. `idSequence` int(11) DEFAULT NULL COMMENT '自增ID, 1001++',
  4. `taskId` varchar(255) DEFAULT NULL COMMENT '任务ID',
  5. `taskTemplateId` varchar(255) DEFAULT NULL COMMENT '任务模板id',
  6. `taskBizId` varchar(255) DEFAULT NULL COMMENT '任务业务ID;绑定的业务或办公应用rowId',
  7. `taskTitle` varchar(255) DEFAULT NULL COMMENT '任务名称',
  8. `taskDesc` varchar(255) DEFAULT NULL COMMENT '任务描述',
  9. `taskLevel` varchar(255) DEFAULT NULL COMMENT '任务优先级',
  10. `taskTag` varchar(255) DEFAULT NULL COMMENT '任务标签',
  11. `taskStatus` varchar(255) DEFAULT '进行中' COMMENT '任务状态:进行中,已完成,已拒绝',
  12. `taskType` varchar(255) DEFAULT NULL COMMENT '任务类型: 任务,审批,日志',
  13. `taskContent` text CHARACTER SET utf8mb4 COMMENT '任务内容;任务,审批,日志表单内容',
  14. `taskCreateAt` varchar(255) DEFAULT NULL COMMENT '任务创建时间;',
  15. `taskReadStatus` varchar(255) DEFAULT '否' COMMENT '消息是否已读;是,否',
  16. `taskStartAt` varchar(255) DEFAULT NULL COMMENT '任务开始时间',
  17. `taskEndAt` varchar(255) DEFAULT NULL COMMENT '任务结束时间',
  18. `taskManagerId` varchar(255) DEFAULT NULL COMMENT '负责人id;只能一个',
  19. `taskMemberIdList` varchar(255) DEFAULT NULL COMMENT '参与人id;可能多个',
  20. `taskCommentList` text CHARACTER SET utf8mb4 COMMENT '任务评论列表',
  21. `taskRelationList` text CHARACTER SET utf8mb4 COMMENT '任务关联的信息列表',
  22. `taskFileList` text CHARACTER SET utf8mb4 COMMENT '任务关联的附件列表',
  23. `taskChildList` text CHARACTER SET utf8mb4 COMMENT '子任务列表todo',
  24. `taskNoticeConfig` text COMMENT '抄送人配置;',
  25. `taskAuditUserIdList` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '审核用户ID列表; 多个用英文逗号分隔',
  26. `taskAuditedUserIdList` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '已审核用户ID列表; 多个用英文逗号分隔',
  27. `taskAuditConfig` text CHARACTER SET utf8mb4 COMMENT '审核配置; { "ticketAuditUserIdList": ["xxx", "xxx"], "ticketAuditedUserIdList": ["xxx", "xxx"] }',
  28. `operation` varchar(255) DEFAULT 'insert' COMMENT '操作: insert, update, jhInsert, jhUpdate, jhDelete jhRestore',
  29. `operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者userId',
  30. `operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者用户名',
  31. `operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间',
  32. PRIMARY KEY (`id`) USING BTREE
  33. ) ENGINE = InnoDB AUTO_INCREMENT = 270 DEFAULT CHARSET = utf8mb4 ROW_FORMAT = DYNAMIC COMMENT = '任务表'

业务视图

_view01_task

  1. CREATE ALGORITHM = UNDEFINED DEFINER = `root` @`%` SQL SECURITY DEFINER VIEW `_view01_task` AS
  2. select
  3. `jianghu_oa`.`task`.`id` AS `id`,
  4. `jianghu_oa`.`task`.`idSequence` AS `idSequence`,
  5. `jianghu_oa`.`task`.`taskId` AS `taskId`,
  6. `jianghu_oa`.`task`.`taskTemplateId` AS `taskTemplateId`,
  7. `jianghu_oa`.`task`.`taskBizId` AS `taskBizId`,
  8. `jianghu_oa`.`task`.`taskTitle` AS `taskTitle`,
  9. `jianghu_oa`.`task`.`taskDesc` AS `taskDesc`,
  10. `jianghu_oa`.`task`.`taskLevel` AS `taskLevel`,
  11. `jianghu_oa`.`task`.`taskTag` AS `taskTag`,
  12. `jianghu_oa`.`task`.`taskStatus` AS `taskStatus`,
  13. `jianghu_oa`.`task`.`taskType` AS `taskType`,
  14. `jianghu_oa`.`task`.`taskContent` AS `taskContent`,
  15. `jianghu_oa`.`task`.`taskCreateAt` AS `taskCreateAt`,
  16. `jianghu_oa`.`task`.`taskReadStatus` AS `taskReadStatus`,
  17. `jianghu_oa`.`task`.`taskStartAt` AS `taskStartAt`,
  18. `jianghu_oa`.`task`.`taskEndAt` AS `taskEndAt`,
  19. `jianghu_oa`.`task`.`taskManagerId` AS `taskManagerId`,
  20. `jianghu_oa`.`task`.`taskMemberIdList` AS `taskMemberIdList`,
  21. `jianghu_oa`.`task`.`taskCommentList` AS `taskCommentList`,
  22. `jianghu_oa`.`task`.`taskRelationList` AS `taskRelationList`,
  23. `jianghu_oa`.`task`.`taskFileList` AS `taskFileList`,
  24. `jianghu_oa`.`task`.`taskChildList` AS `taskChildList`,
  25. `jianghu_oa`.`task`.`taskNoticeConfig` AS `taskNoticeConfig`,
  26. `jianghu_oa`.`task`.`taskAuditUserIdList` AS `taskAuditUserIdList`,
  27. `jianghu_oa`.`task`.`taskAuditedUserIdList` AS `taskAuditedUserIdList`,
  28. `jianghu_oa`.`task`.`taskAuditConfig` AS `taskAuditConfig`,
  29. `jianghu_oa`.`task`.`operation` AS `operation`,
  30. `jianghu_oa`.`task`.`operationByUserId` AS `operationByUserId`,
  31. `jianghu_oa`.`task`.`operationByUser` AS `operationByUser`,
  32. `jianghu_oa`.`task`.`operationAt` AS `operationAt`,
  33. `jianghu_oa`.`task_template`.`taskTemplateName` AS `taskTemplateName`,
  34. `_view01_user`.`username` AS `username`
  35. from
  36. (
  37. (
  38. `jianghu_oa`.`task`
  39. join `jianghu_oa`.`task_template` on (
  40. (
  41. `jianghu_oa`.`task`.`taskTemplateId` = `jianghu_oa`.`task_template`.`taskTemplateId`
  42. )
  43. )
  44. )
  45. join `jianghu_oa`.`_view01_user` on (
  46. (
  47. `jianghu_oa`.`task`.`taskManagerId` = `_view01_user`.`userId`
  48. )
  49. )
  50. )

_view01_user_group

  1. CREATE ALGORITHM = UNDEFINED DEFINER = `root` @`localhost` SQL SECURITY DEFINER VIEW `_view01_user_group` AS
  2. select
  3. `_view01_user`.`id` AS `id`,
  4. `_view01_user`.`idSequence` AS `idSequence`,
  5. `_view01_user`.`userId` AS `userId`,
  6. `_view01_user`.`username` AS `username`,
  7. `_view01_user`.`phoneNumber` AS `phoneNumber`,
  8. `_view01_user`.`email` AS `email`,
  9. `_view01_user`.`userStatus` AS `userStatus`,
  10. `_view01_user`.`hrOrgRoleList` AS `hrOrgRoleList`,
  11. `_view01_user`.`qiweiId` AS `qiweiId`,
  12. `_view01_user`.`wechatId` AS `wechatId`,
  13. `_view01_user`.`userConfig` AS `userConfig`,
  14. `_view01_user`.`password` AS `password`,
  15. `_view01_user`.`md5Salt` AS `md5Salt`,
  16. `_view01_user`.`clearTextPassword` AS `clearTextPassword`,
  17. `_view01_user`.`operation` AS `operation`,
  18. `_view01_user`.`operationByUserId` AS `operationByUserId`,
  19. `_view01_user`.`operationByUser` AS `operationByUser`,
  20. `_view01_user`.`operationAt` AS `operationAt`,
  21. `_group`.`groupName` AS `groupName`
  22. from
  23. (
  24. (
  25. `jianghu_oa`.`_view01_user`
  26. join `jianghu_oa`.`_user_group_role` on (
  27. (
  28. `_view01_user`.`userId` = `_user_group_role`.`userId`
  29. )
  30. )
  31. )
  32. join `jianghu_oa`.`_group` on (
  33. (`_user_group_role`.`groupId` = `_group`.`groupId`)
  34. )
  35. )

_view02_user_app

  1. CREATE ALGORITHM = UNDEFINED DEFINER = `root` @`localhost` SQL SECURITY DEFINER VIEW `_view02_user_app` AS
  2. select
  3. `jh_enterprise_v2_data_repository`.`enterprise_view02_user_app`.`id` AS `id`,
  4. `jh_enterprise_v2_data_repository`.`enterprise_view02_user_app`.`userId` AS `userId`,
  5. `jh_enterprise_v2_data_repository`.`enterprise_view02_user_app`.`appId` AS `appId`
  6. from
  7. `jh_enterprise_v2_data_repository`.`enterprise_view02_user_app`
  8. where
  9. (
  10. `jh_enterprise_v2_data_repository`.`enterprise_view02_user_app`.`appId` = 'jianghu-oa'
  11. )