框架内置表

12003
  • 内置表/View
    • 用户: _user, _user_session, _view01_user
    • 页面&接口: _page, _resource
    • 用户权限:
      • _group, _user_group_role,
      • _user_group_role_page, _user_group_role_resource
    • 工具表: constant_ui, constant, _record_history, _file, _cache

用户

_user

  1. CREATE TABLE `_user` (
  2. `id` int(11) NOT NULL AUTO_INCREMENT,
  3. `idSequence` varchar(255) DEFAULT NULL COMMENT '自增id; 用于生成userId',
  4. `userId` varchar(255) DEFAULT NULL COMMENT '主键id',
  5. `username` varchar(255) DEFAULT NULL COMMENT '用户名(登陆)',
  6. `clearTextPassword` varchar(255) DEFAULT NULL COMMENT '明文密码',
  7. `password` varchar(255) DEFAULT NULL COMMENT '密码',
  8. `md5Salt` varchar(255) DEFAULT NULL COMMENT 'md5Salt',
  9. `userStatus` varchar(255) DEFAULT 'active' COMMENT '用户账号状态:活跃或关闭',
  10. `userType` varchar(255) DEFAULT NULL COMMENT '用户类型; staff, student.',
  11. `config` mediumtext COMMENT '配置信息',
  12. `operation` varchar(255) DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',
  13. `operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者userId',
  14. `operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者用户名',
  15. `operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00 ',
  16. PRIMARY KEY (`id`) USING BTREE,
  17. UNIQUE KEY `username_index` (`username`) USING BTREE,
  18. UNIQUE KEY `userId_index` (`userId`) USING BTREE
  19. ) ENGINE = InnoDB AUTO_INCREMENT = 50 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '用户表'

_user_session

  1. CREATE TABLE `_user_session` (
  2. `id` int(11) NOT NULL AUTO_INCREMENT,
  3. `userId` varchar(255) DEFAULT NULL COMMENT '用户id',
  4. `userIp` varchar(255) DEFAULT NULL COMMENT '用户ip',
  5. `userIpRegion` varchar(255) DEFAULT NULL COMMENT '用户Ip区域',
  6. `userAgent` text COMMENT '请求的 agent',
  7. `deviceId` varchar(255) DEFAULT NULL COMMENT '设备id',
  8. `deviceType` varchar(255) DEFAULT 'web' COMMENT '设备类型; flutter, web, bot_databot, bot_chatbot, bot_xiaochengxu',
  9. `socketStatus` varchar(255) DEFAULT 'offline' COMMENT 'socket状态',
  10. `authToken` varchar(255) DEFAULT NULL COMMENT 'auth token',
  11. `operation` varchar(255) DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',
  12. `operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者userId',
  13. `operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者用户名',
  14. `operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00 ',
  15. PRIMARY KEY (`id`) USING BTREE,
  16. KEY `userId_index` (`userId`) USING BTREE,
  17. KEY `userId_deviceId_index` (`userId`, `deviceId`) USING BTREE,
  18. KEY `authToken_index` (`authToken`) USING BTREE
  19. ) ENGINE = InnoDB AUTO_INCREMENT = 83 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '用户session表; deviceId 维度;软删除未启用;'

_view01_user

  1. CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `_view01_user` AS select `_user`.`id` AS `id`,`_user`.`idSequence` AS `idSequence`,`_user`.`userId` AS `userId`,`_user`.`username` AS `username`,`_user`.`phoneNumber` AS `phoneNumber`,`_user`.`email` AS `email`,`_user`.`userStatus` AS `userStatus`,`_user`.`hrOrgRoleList` AS `hrOrgRoleList`,`_user`.`qiweiId` AS `qiweiId`,`_user`.`wechatId` AS `wechatId`,`_user`.`userConfig` AS `userConfig`,`_user`.`password` AS `password`,`_user`.`md5Salt` AS `md5Salt`,`_user`.`clearTextPassword` AS `clearTextPassword`,`_user`.`operation` AS `operation`,`_user`.`operationByUserId` AS `operationByUserId`,`_user`.`operationByUser` AS `operationByUser`,`_user`.`operationAt` AS `operationAt` from `_user`

页面&接口

_page

  1. CREATE TABLE `_page` (
  2. `id` int(11) NOT NULL AUTO_INCREMENT,
  3. `pageId` varchar(255) DEFAULT NULL COMMENT 'pageId',
  4. `pageFile` varchar(255) DEFAULT NULL COMMENT 'page文件指定; 默认使用pageId.html',
  5. `pageHook` varchar(255) DEFAULT NULL COMMENT 'pageHook',
  6. `pageName` varchar(255) DEFAULT NULL COMMENT 'page name',
  7. `pageType` varchar(255) DEFAULT NULL COMMENT '页面类型; showInMenu, dynamicInMenu',
  8. `pageIcon` text ,
  9. `sort` varchar(255) DEFAULT NULL,
  10. `operation` varchar(255) DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',
  11. `operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者userId',
  12. `operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者用户名',
  13. `operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00 ',
  14. PRIMARY KEY (`id`) USING BTREE
  15. ) ENGINE = InnoDB AUTO_INCREMENT = 174 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '页面表; 软删除未启用;'

_resource

  1. CREATE TABLE `_resource` (
  2. `id` int(11) NOT NULL AUTO_INCREMENT,
  3. `accessControlTable` varchar(255) DEFAULT NULL COMMENT '数据规则控制表',
  4. `resourceHook` text COMMENT '[ "before": {"service": "xx", "serviceFunction": "xxx"}, "after": [] }',
  5. `pageId` varchar(255) DEFAULT NULL COMMENT 'page id; E.g: index',
  6. `actionId` varchar(255) DEFAULT NULL COMMENT 'action id; E.g: selectXXXByXXX',
  7. `desc` varchar(255) DEFAULT NULL COMMENT '描述',
  8. `resourceType` varchar(255) DEFAULT NULL COMMENT 'resource 类型; E.g: auth service sql',
  9. `appDataSchema` text COMMENT 'appData 参数校验',
  10. `resourceData` text COMMENT 'resource 数据; { "service": "auth", "serviceFunction": "passwordLogin" } or { "table": "${tableName}", "action": "select", "whereCondition": ".where(function() {this.whereNot( { recordStatus: \\"active\\" })})" }',
  11. `requestDemo` text COMMENT '请求Demo',
  12. `responseDemo` text COMMENT '响应Demo',
  13. `operation` varchar(255) DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',
  14. `operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者userId',
  15. `operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者用户名',
  16. `operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00 ',
  17. PRIMARY KEY (`id`) USING BTREE
  18. ) ENGINE = InnoDB AUTO_INCREMENT = 798 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '请求资源表; 软删除未启用; resourceId=`${appId}.${pageId}.${actionId}`'

页面&接口

_group

  1. CREATE TABLE `_group` (
  2. `id` int(11) NOT NULL AUTO_INCREMENT,
  3. `groupId` varchar(511) CHARACTER SET utf8mb4 DEFAULT NULL,
  4. `groupLastId` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT 'groupId',
  5. `groupPath` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL,
  6. `groupName` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '群组简称',
  7. `groupDeptName` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '群组全称',
  8. `groupAllName` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '路径全名',
  9. `principalId` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '组织负责人',
  10. `headId` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '部门主管',
  11. `leadId` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '分管领导; 未启用',
  12. `groupDesc` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '群组描述',
  13. `operation` varchar(255) CHARACTER SET utf8mb4 DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',
  14. `operationByUserId` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '操作者userId',
  15. `operationByUser` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '操作者用户名',
  16. `operationAt` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00 ',
  17. PRIMARY KEY (`id`) USING BTREE
  18. ) ENGINE=InnoDB AUTO_INCREMENT=44 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;

_user_group_role

  1. CREATE TABLE `_user_group_role` (
  2. `id` int(11) NOT NULL AUTO_INCREMENT,
  3. `userId` varchar(255) NOT NULL COMMENT '用户id',
  4. `groupId` varchar(255) NOT NULL COMMENT '群组Id',
  5. `roleId` varchar(255) DEFAULT NULL COMMENT '角色Id',
  6. `roleDeadline` varchar(255) DEFAULT NULL COMMENT '权限期限日期',
  7. `operation` varchar(255) DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',
  8. `operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者userId',
  9. `operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者用户名',
  10. `operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00 ',
  11. PRIMARY KEY (`id`) USING BTREE,
  12. KEY `groupId_index` (`groupId`) USING BTREE,
  13. KEY `userId_index` (`userId`) USING BTREE
  14. ) ENGINE=InnoDB AUTO_INCREMENT=691 DEFAULT CHARSET=utf8mb4 COMMENT='用户群组角色关联表; 软删除未启用;';

_user_group_role_page

_user_group_role_resource

工具表

constant_ui

constant

  1. CREATE TABLE `_constant` (
  2. `id` int(11) NOT NULL AUTO_INCREMENT,
  3. `constantKey` varchar(255) DEFAULT NULL,
  4. `constantType` varchar(255) DEFAULT NULL COMMENT '常量类型; object, array',
  5. `desc` varchar(255) DEFAULT NULL COMMENT '描述',
  6. `constantValue` text COMMENT '常量内容; object, array',
  7. `operation` varchar(255) DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',
  8. `operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者userId',
  9. `operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者用户名',
  10. `operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00 ',
  11. PRIMARY KEY (`id`) USING BTREE
  12. ) ENGINE = InnoDB AUTO_INCREMENT = 12 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '常量表; 软删除未启用;'

_record_history

  1. CREATE TABLE `_record_history` (
  2. `id` int(11) NOT NULL AUTO_INCREMENT,
  3. `table` varchar(255) DEFAULT NULL COMMENT '表',
  4. `recordId` int(11) DEFAULT NULL COMMENT '数据在table中的主键id; recordContent.id',
  5. `recordContent` text NOT NULL COMMENT '数据',
  6. `packageContent` text NOT NULL COMMENT '当时请求的 package JSON',
  7. `operation` varchar(255) DEFAULT NULL COMMENT '操作; jhInsert, jhUpdate, jhDelete jhRestore',
  8. `operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者userId; recordContent.operationByUserId',
  9. `operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者用户名; recordContent.operationByUser',
  10. `operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间; recordContent.operationAt; E.g: 2021-05-28T10:24:54+08:00 ',
  11. PRIMARY KEY (`id`) USING BTREE
  12. ) ENGINE = InnoDB AUTO_INCREMENT = 40812 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin

_file

_cache

  1. CREATE TABLE `_cache` (
  2. `id` int(11) NOT NULL AUTO_INCREMENT,
  3. `userId` varchar(255) NOT NULL COMMENT '用户Id',
  4. `content` longtext COMMENT '缓存数据',
  5. `recordStatus` varchar(255) DEFAULT 'active',
  6. `operation` varchar(255) DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',
  7. `operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者userId',
  8. `operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者用户名',
  9. `operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00 ',
  10. PRIMARY KEY (`id`) USING BTREE
  11. ) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '缓存表