diff --git a/.gitignore b/.gitignore index 560ce1c2..1ec16190 100644 --- a/.gitignore +++ b/.gitignore @@ -328,4 +328,6 @@ docs/部署文档/nginx配置/hzdyjsweb.camasort.com.conf 首页完善的提示词.md scripts/ 学生宿舍卫生检查、学生违纪记录统计.md -学生调宿、退宿功能.md \ No newline at end of file +学生调宿、退宿功能.md +学生动向信息界面(宿管员).md +prompt/ diff --git a/docs/业务模块/学工管理-宿舍管理/数据库设计/宿舍管理数据库设计.md b/docs/业务模块/学工管理-宿舍管理/数据库设计/宿舍管理数据库设计.md deleted file mode 100644 index fae3231f..00000000 --- a/docs/业务模块/学工管理-宿舍管理/数据库设计/宿舍管理数据库设计.md +++ /dev/null @@ -1,416 +0,0 @@ -# 宿舍管理数据库设计文档 - -## 📋 文档信息 - -| 项目 | 信息 | -|------|------| -| **项目名称** | 校园管理系统 - 宿舍管理模块 | -| **数据库版本** | MySQL 8.0+ | -| **文档版本** | V1.0.0 | -| **创建时间** | 2025-01-14 | -| **创建人员** | 数据库设计团队 | -| **审核状态** | 待审核 | - -## 🎯 设计目标 - -### 核心目标 -- 支持多维度宿舍管理人员分配(全校、校区、宿舍区、宿舍楼、二级学院) -- 实现多级向下授权功能(5级权限体系) -- 支持权限的动态配置和调整 -- 提供完整的管理效果评估功能 -- 确保数据安全和审计追踪 - -### 设计原则 -- **分层设计**:按权限层级进行数据分层 -- **维度扩展**:支持管理维度的灵活扩展 -- **权限控制**:严格的数据权限控制机制 -- **审计追踪**:完整的操作日志和变更记录 -- **性能优化**:针对多维度查询的性能优化 - -## 🗄️ 数据库表设计 - -### 1. 宿舍管理维度表 - -#### 1.1 宿舍管理维度定义表 (dorm_management_dimension) -**表说明**:定义宿舍管理的各个维度,支持维度的灵活扩展 - -```sql - -``` - -#### 1.2 校区信息表 (dorm_campus) -**表说明**:存储校区基本信息 - -```sql -DROP TABLE IF EXISTS `xg_dorm_campus`; -CREATE TABLE `xg_dorm_campus` ( - `id` bigint(20) NOT NULL COMMENT '主键ID', - `campus_code` varchar(50) NOT NULL COMMENT '校区编码', - `campus_name` varchar(100) NOT NULL COMMENT '校区名称', - `campus_description` varchar(500) DEFAULT NULL COMMENT '校区描述', - `sort_order` int(11) DEFAULT '0' COMMENT '排序号', - `deleted` char(1) DEFAULT '0' COMMENT '删除标志(0代表存在 1代表删除)', - `tenant_id` bigint(20) DEFAULT '0' COMMENT '租户编号', - `create_by` bigint(20) DEFAULT NULL COMMENT '创建者', - `create_time` datetime DEFAULT NULL COMMENT '创建时间', - `update_by` bigint(20) DEFAULT NULL COMMENT '更新者', - `update_time` datetime DEFAULT NULL COMMENT '更新时间', - `remark` varchar(500) DEFAULT NULL COMMENT '备注', - PRIMARY KEY (`id`), - UNIQUE KEY `uk_campus_code` (`campus_code`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='校区信息表'; -``` - -#### 1.3 宿舍区信息表 (dorm_area) -**表说明**:存储宿舍区基本信息,关联校区 - -```sql -DROP TABLE IF EXISTS `xg_dorm_building`; -CREATE TABLE `xg_dorm_building` ( - `id` bigint(20) NOT NULL COMMENT '主键ID', - `building_code` varchar(50) NOT NULL COMMENT '宿舍楼编码', - `building_name` varchar(100) NOT NULL COMMENT '宿舍楼名称', - `area_id` bigint(20) NOT NULL COMMENT '所属宿舍区ID', - `campus_id` bigint(20) NOT NULL COMMENT '所属校区ID', - `building_type` char(1) DEFAULT '1' COMMENT '宿舍楼类型(1男生楼 2女生楼 3混合楼)', - `building_description` varchar(500) DEFAULT NULL COMMENT '宿舍楼描述', - `sort_order` int(11) DEFAULT '0' COMMENT '排序号', - `deleted` char(1) DEFAULT '0' COMMENT '删除标志(0代表存在 1代表删除)', - `tenant_id` bigint(20) DEFAULT '0' COMMENT '租户编号', - `create_by` bigint(20) DEFAULT NULL COMMENT '创建者', - `create_time` datetime DEFAULT NULL COMMENT '创建时间', - `update_by` bigint(20) DEFAULT NULL COMMENT '更新者', - `update_time` datetime DEFAULT NULL COMMENT '更新时间', - `remark` varchar(500) DEFAULT NULL COMMENT '备注', - PRIMARY KEY (`id`), - UNIQUE KEY `uk_building_code` (`building_code`), - KEY `idx_area_id` (`area_id`), - KEY `idx_campus_id` (`campus_id`), -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='宿舍楼信息表'; -``` - -#### 1.4 宿舍楼信息表 (dorm_building) -**表说明**:存储宿舍楼基本信息,关联宿舍区 - -```sql -DROP TABLE IF EXISTS `xg_dorm_area`; -CREATE TABLE `xg_dorm_area` ( - `id` bigint(20) NOT NULL COMMENT '主键ID', - `area_code` varchar(50) NOT NULL COMMENT '宿舍区编码', - `area_name` varchar(100) NOT NULL COMMENT '宿舍区名称', - `campus_id` bigint(20) NOT NULL COMMENT '所属校区ID', - `area_description` varchar(500) DEFAULT NULL COMMENT '宿舍区描述', - `sort_order` int(11) DEFAULT '0' COMMENT '排序号', - `deleted` char(1) DEFAULT '0' COMMENT '删除标志(0代表存在 1代表删除)', - `tenant_id` bigint(20) DEFAULT '0' COMMENT '租户编号', - `create_by` bigint(20) DEFAULT NULL COMMENT '创建者', - `create_time` datetime DEFAULT NULL COMMENT '创建时间', - `update_by` bigint(20) DEFAULT NULL COMMENT '更新者', - `update_time` datetime DEFAULT NULL COMMENT '更新时间', - `remark` varchar(500) DEFAULT NULL COMMENT '备注', - PRIMARY KEY (`id`), - UNIQUE KEY `uk_area_code` (`area_code`), - KEY `idx_campus_id` (`campus_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='宿舍区信息表'; -``` - -#### 1.5 宿舍房间表 (dorm_room) -**表说明**:存储宿舍房间基本信息,关联宿舍楼,包含楼层属性 - -```sql -DROP TABLE IF EXISTS `xg_dorm_room`; -CREATE TABLE `xg_dorm_room` ( - `id` bigint(20) NOT NULL COMMENT '主键ID', - `room_code` varchar(50) NOT NULL COMMENT '房间编号', - `room_name` varchar(100) NOT NULL COMMENT '房间名称', - `building_id` bigint(20) NOT NULL COMMENT '所属宿舍楼ID', - `floor_num` int(11) NOT NULL COMMENT '楼层', - `room_type` char(1) DEFAULT '1' COMMENT '房间类型(1学生宿舍 3教师宿舍)', - `actual_beds` int(11) DEFAULT 4 COMMENT '实际床位数', - `room_area` decimal(10,2) DEFAULT NULL COMMENT '房间面积(平方米)', - `room_status` char(1) DEFAULT '0' COMMENT '房间状态(0可用 1维修中 2已报废)', - `deleted` char(1) DEFAULT '0' COMMENT '删除标志(0代表存在 1代表删除)', - `tenant_id` bigint(20) DEFAULT '0' COMMENT '租户编号', - `create_by` bigint(20) DEFAULT NULL COMMENT '创建者', - `create_time` datetime DEFAULT NULL COMMENT '创建时间', - `update_by` bigint(20) DEFAULT NULL COMMENT '更新者', - `update_time` datetime DEFAULT NULL COMMENT '更新时间', - `remark` varchar(500) DEFAULT NULL COMMENT '备注', - PRIMARY KEY (`id`), - UNIQUE KEY `uk_room_code` (`room_code`), - KEY `idx_building_id` (`building_id`), - KEY `idx_floor_num` (`floor_num`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='宿舍房间信息表'; -``` - -#### 1.6 宿舍床位表 (dorm_bed) -**表说明**:存储宿舍床位基本信息,关联宿舍房间 - -```sql -DROP TABLE IF EXISTS `xg_dorm_bed`; -CREATE TABLE `xg_dorm_bed` ( - `id` bigint(20) NOT NULL COMMENT '主键ID', - `bed_code` varchar(50) NOT NULL COMMENT '床位编号', - `bed_name` varchar(100) NOT NULL COMMENT '床位名称', - `room_id` bigint(20) NOT NULL COMMENT '所属房间ID', - `bed_type` char(1) DEFAULT '1' COMMENT '床位类型(1下铺 2上铺 3中铺 4独立床)', - `bed_status` char(1) DEFAULT '0' COMMENT '床位状态(0空闲 1已分配 2维修中)', - `deleted` char(1) DEFAULT '0' COMMENT '删除标志(0代表存在 1代表删除)', - `tenant_id` bigint(20) DEFAULT '0' COMMENT '租户编号', - `create_by` bigint(20) DEFAULT NULL COMMENT '创建者', - `create_time` datetime DEFAULT NULL COMMENT '创建时间', - `update_by` bigint(20) DEFAULT NULL COMMENT '更新者', - `update_time` datetime DEFAULT NULL COMMENT '更新时间', - `remark` varchar(500) DEFAULT NULL COMMENT '备注', - PRIMARY KEY (`id`), - UNIQUE KEY `uk_bed_code` (`bed_code`), - KEY `idx_room_id` (`room_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='宿舍床位信息表'; - -DROP TABLE IF EXISTS `xg_dorm_bed_student`; -CREATE TABLE `xg_dorm_bed_student` ( - `id` bigint(20) NOT NULL COMMENT '主键ID', - `college_id` bigint(20) NOT NULL COMMENT '分配学院ID', - `student_id` bigint(20) NOT NULL COMMENT '分配学生ID', - `bed_id` bigint(20) NOT NULL COMMENT '床位ID', - `room_id` bigint(20) NOT NULL COMMENT '房间ID', - `building_id` bigint(20) NOT NULL COMMENT '宿舍楼ID', - `area_id` bigint(20) NOT NULL COMMENT '宿舍区ID', - `campus_id` bigint(20) NOT NULL COMMENT '校区ID', - `status` char(1) DEFAULT '0' COMMENT '状态(0正常 1已退宿)', - `assign_time` datetime NOT NULL COMMENT '分配时间', - `checkout_time` datetime DEFAULT NULL COMMENT '退宿时间', - `deleted` char(1) DEFAULT '0' COMMENT '删除标志(0代表存在 1代表删除)', - `tenant_id` bigint(20) DEFAULT '0' COMMENT '租户编号', - `create_by` bigint(20) DEFAULT NULL COMMENT '创建者', - `create_time` datetime DEFAULT NULL COMMENT '创建时间', - `update_by` bigint(20) DEFAULT NULL COMMENT '更新者', - `update_time` datetime DEFAULT NULL COMMENT '更新时间', - `remark` varchar(500) DEFAULT NULL COMMENT '备注', - PRIMARY KEY (`id`), - UNIQUE KEY `uk_student_bed` (`student_id`, `bed_id`), - KEY `idx_college_id` (`college_id`), - KEY `idx_student_id` (`student_id`), - KEY `idx_bed_id` (`bed_id`), - KEY `idx_room_id` (`room_id`), - KEY `idx_building_id` (`building_id`), - KEY `idx_area_id` (`area_id`), - KEY `idx_campus_id` (`campus_id`), - KEY `idx_assign_time` (`assign_time`), -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='床位学生分配关系表'; -``` - -### 2. 宿舍管理人员相关表 - -#### 2.1 宿舍管理员表 (dorm_manager) -**表说明**:存储全校、校区、宿舍区、宿舍楼管理员的基本信息 - -```sql -DROP TABLE IF EXISTS `xg_dorm_manager`; -CREATE TABLE `xg_dorm_manager` ( - `id` bigint(20) NOT NULL COMMENT '主键ID', - `manager_name` varchar(100) NOT NULL COMMENT '管理员姓名', - `manager_type` char(1) NOT NULL COMMENT '管理员类型(1全校管理员 2校区管理员 3宿舍区管理员 4宿舍楼管理员)', - `manager_level` int(11) DEFAULT 1 COMMENT '管理级别(1-5,1为最高)', - `user_id` bigint(20) DEFAULT NULL COMMENT '关联用户ID', - `phone` varchar(20) DEFAULT NULL COMMENT '联系电话', - `gender` char(1) DEFAULT '0' COMMENT '性别(0男 1女 2未知)', - `status` char(1) DEFAULT '0' COMMENT '状态(0正常 1停用)', - `deleted` char(1) DEFAULT '0' COMMENT '删除标志(0代表存在 1代表删除)', - `tenant_id` bigint(20) DEFAULT '0' COMMENT '租户编号', - `create_by` bigint(20) DEFAULT NULL COMMENT '创建者', - `create_time` datetime DEFAULT NULL COMMENT '创建时间', - `update_by` bigint(20) DEFAULT NULL COMMENT '更新者', - `update_time` datetime DEFAULT NULL COMMENT '更新时间', - `remark` varchar(500) DEFAULT NULL COMMENT '备注', - PRIMARY KEY (`id`), - KEY `idx_user_id` (`user_id`), - KEY `idx_manager_type` (`manager_type`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='宿舍管理员信息表'; - -DROP TABLE IF EXISTS `xg_dorm_manager_source`; -CREATE TABLE `xg_dorm_manager_source` ( - `id` bigint(20) NOT NULL COMMENT '主键ID', - `manager_id` bigint(20) NOT NULL COMMENT '管理员ID', - `permission_type` char(1) DEFAULT '1' COMMENT '权限类型(1查看 2编辑 3完全管理)', - `auth_type` char(1) NOT NULL COMMENT '授权类型(1全校级 2校区级 3宿舍区级 4楼栋级)', - `auth_source` bigint(20) DEFAULT NULL COMMENT '授权来源ID(对应校区ID或宿舍区ID或楼栋ID)', - `status` char(1) DEFAULT '0' COMMENT '状态(0有效 1已撤销)', - `deleted` char(1) DEFAULT '0' COMMENT '删除标志(0代表存在 1代表删除)', - `tenant_id` bigint(20) DEFAULT '0' COMMENT '租户编号', - `create_by` bigint(20) DEFAULT NULL COMMENT '创建者', - `create_time` datetime DEFAULT NULL COMMENT '创建时间', - `update_by` bigint(20) DEFAULT NULL COMMENT '更新者', - `update_time` datetime DEFAULT NULL COMMENT '更新时间', - `remark` varchar(500) DEFAULT NULL COMMENT '备注', - PRIMARY KEY (`id`), - KEY `idx_manager_id` (`manager_id`), - KEY `idx_auth_source` (`auth_source`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='管理员授权关系表'; - -``` - -#### 2.2 管理员宿舍楼权限关系表 (dorm_manager_building) -**表说明**:存储管理员与宿舍楼的权限绑定关系 - -```sql - - -DROP TABLE IF EXISTS `xg_dorm_manager_building`; -CREATE TABLE `xg_dorm_manager_building` ( - `id` bigint(20) NOT NULL COMMENT '主键ID', - `manager_id` bigint(20) NOT NULL COMMENT '管理员ID', - `building_id` bigint(20) NOT NULL COMMENT '宿舍楼ID', - `status` char(1) DEFAULT '0' COMMENT '状态(0有效 1已撤销)', - `deleted` char(1) DEFAULT '0' COMMENT '删除标志(0代表存在 1代表删除)', - `tenant_id` bigint(20) DEFAULT '0' COMMENT '租户编号', - `create_by` bigint(20) DEFAULT NULL COMMENT '创建者', - `create_time` datetime DEFAULT NULL COMMENT '创建时间', - `update_by` bigint(20) DEFAULT NULL COMMENT '更新者', - `update_time` datetime DEFAULT NULL COMMENT '更新时间', - `remark` varchar(500) DEFAULT NULL COMMENT '备注', - PRIMARY KEY (`id`), - UNIQUE KEY `uk_manager_building` (`manager_id`, `building_id`), - KEY `idx_manager_id` (`manager_id`), - KEY `idx_building_id` (`building_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='管理员宿舍楼权限关系表'; -``` - -#### 2.3 二级学院宿舍管理员表 (dorm_college_manager) -**表说明**:存储二级学院宿舍管理员的基本信息 - -```sql -DROP TABLE IF EXISTS `xg_dorm_college_manager`; -CREATE TABLE `xg_dorm_college_manager` ( - `id` bigint(20) NOT NULL COMMENT '主键ID', - `manager_name` varchar(100) NOT NULL COMMENT '管理员姓名', - `college_id` bigint(20) NOT NULL COMMENT '所属学院ID', - `user_id` bigint(20) DEFAULT NULL COMMENT '关联用户ID', - `phone` varchar(20) DEFAULT NULL COMMENT '联系电话', - `gender` char(1) DEFAULT '0' COMMENT '性别(0男 1女 2未知)', - `status` char(1) DEFAULT '0' COMMENT '状态(0正常 1停用)', - `deleted` char(1) DEFAULT '0' COMMENT '删除标志(0代表存在 1代表删除)', - `tenant_id` bigint(20) DEFAULT '0' COMMENT '租户编号', - `create_by` bigint(20) DEFAULT NULL COMMENT '创建者', - `create_time` datetime DEFAULT NULL COMMENT '创建时间', - `update_by` bigint(20) DEFAULT NULL COMMENT '更新者', - `update_time` datetime DEFAULT NULL COMMENT '更新时间', - `remark` varchar(500) DEFAULT NULL COMMENT '备注', - PRIMARY KEY (`id`), - KEY `idx_college_id` (`college_id`), - KEY `idx_user_id` (`user_id`), -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='二级学院宿舍管理员信息表'; -``` - -#### 2.4 二级学院床位绑定关系表 (dorm_college_bed) -**表说明**:存储二级学院与床位的绑定关系 - -```sql -DROP TABLE IF EXISTS `xg_dorm_college_bed`; -CREATE TABLE `xg_dorm_college_bed` ( - `id` bigint(20) NOT NULL COMMENT '主键ID', - `college_id` bigint(20) NOT NULL COMMENT '学院ID', - `bed_id` bigint(20) NOT NULL COMMENT '床位ID', - `building_id` bigint(20) NOT NULL COMMENT '宿舍楼ID', - `room_id` bigint(20) NOT NULL COMMENT '房间ID', - `status` char(1) DEFAULT '0' COMMENT '状态(0正常 1已解除)', - `assign_time` datetime DEFAULT NULL COMMENT '分配时间', - `release_time` datetime DEFAULT NULL COMMENT '到期解除时间', - `deleted` char(1) DEFAULT '0' COMMENT '删除标志(0代表存在 1代表删除)', - `tenant_id` bigint(20) DEFAULT '0' COMMENT '租户编号', - `create_by` bigint(20) DEFAULT NULL COMMENT '创建者', - `create_time` datetime DEFAULT NULL COMMENT '创建时间', - `update_by` bigint(20) DEFAULT NULL COMMENT '更新者', - `update_time` datetime DEFAULT NULL COMMENT '更新时间', - `remark` varchar(500) DEFAULT NULL COMMENT '备注', - PRIMARY KEY (`id`), - UNIQUE KEY `uk_college_bed` (`college_id`, `bed_id`), - KEY `idx_college_id` (`college_id`), - KEY `idx_bed_id` (`bed_id`), - KEY `idx_building_id` (`building_id`), - KEY `idx_room_id` (`room_id`), -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='二级学院床位绑定关系表'; -``` - - - -## 🔗 表关系设计 - -### 1. 维度关系图 -``` -dorm_campus (校区) -├── dorm_area (宿舍区) -│ └── dorm_building (宿舍楼) -└── dorm_college (二级学院) -``` - -### 2. 权限层级关系图 -``` -dorm_permission_level (权限层级) -├── Level 1: 学生处宿舍管理负责人 -├── Level 2: 校区宿舍管理负责人 -├── Level 3: 宿舍区主管 -├── Level 4: 宿舍楼管理员 -└── Level 5: 二级学院宿舍管理负责人 -``` - - -## 📊 索引设计 - -### 1. 主键索引 -- 所有表都使用 `bigint(20)` 类型的自增主键 -- 主键命名统一为 `id` - -### 2. 唯一索引 -- 编码字段:`manager_code`, `campus_code`, `area_code`, `building_code`, `college_code` -- 身份证号:`id_card` -- 权限层级值:`level_value` - -### 3. 复合索引 -- 管理人员分配:`(manager_id, dimension_type, dimension_id)` -- 权限配置:`(manager_id, permission_level_id, dimension_type)` -- 统计数据:`(manager_id, dimension_type, dimension_id, stats_date)` - -### 4. 普通索引 -- 状态字段:`status`, `approval_status`, `permission_status` -- 时间字段:`create_time`, `update_time`, `operation_time` -- 关联字段:`campus_id`, `area_id`, `position_id` - -## 🔒 数据安全设计 - -### 1. 敏感信息加密 -- 身份证号:使用AES加密存储 -- 手机号码:部分脱敏显示 -- 邮箱地址:部分脱敏显示 - -### 2. 权限控制 -- 数据权限:基于维度的数据访问控制 -- 功能权限:基于角色的功能访问控制 -- 操作权限:基于权限层级的操作控制 - -### 3. 审计日志 -- 权限变更:完整的权限变更记录 -- 操作日志:详细的操作行为记录 -- 数据变更:重要数据的变更追踪 - -## 📈 性能优化设计 - -### 1. 分区策略 -- 按时间分区:`dorm_permission_usage` 表按月份分区 -- 按维度分区:`dorm_management_stats` 表按维度分区 - -### 2. 缓存策略 -- 权限缓存:管理人员权限信息缓存 -- 维度缓存:维度信息缓存 -- 统计缓存:统计数据缓存 - -### 3. 查询优化 -- 索引优化:针对多维度查询的复合索引 -- SQL优化:避免全表扫描的查询语句 -- 分页优化:大数据量的分页查询优化 - -## 📝 变更记录 - -| 版本 | 日期 | 变更内容 | 变更人 | -|------|------|----------|--------| -| V1.0.0 | 2025-01-14 | 初始版本创建 | 数据库设计团队 | \ No newline at end of file diff --git a/docs/设计文档/database/hzdyjs_xg0820.sql b/docs/设计文档/database/hzdyjs_xg0820.sql index 05034694..0897434b 100644 --- a/docs/设计文档/database/hzdyjs_xg0820.sql +++ b/docs/设计文档/database/hzdyjs_xg0820.sql @@ -4473,29 +4473,6 @@ CREATE TABLE `xg_dorm_manager` ( KEY `idx_manager_type` (`manager_type`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='宿舍管理员信息表'; --- ---------------------------- --- Table structure for xg_dorm_manager_building --- ---------------------------- -DROP TABLE IF EXISTS `xg_dorm_manager_building`; -CREATE TABLE `xg_dorm_manager_building` ( - `id` bigint(20) NOT NULL COMMENT '主键ID', - `manager_id` bigint(20) NOT NULL COMMENT '管理员ID', - `building_id` bigint(20) NOT NULL COMMENT '宿舍楼ID', - `status` char(1) DEFAULT '0' COMMENT '状态(0有效 1已撤销)', - `deleted` char(1) DEFAULT '0' COMMENT '删除标志(0代表存在 1代表删除)', - `tenant_id` bigint(20) DEFAULT '0' COMMENT '租户编号', - `create_by` bigint(20) DEFAULT NULL COMMENT '创建者', - `create_dept` bigint(20) DEFAULT NULL COMMENT '创建部门', - `create_time` datetime DEFAULT NULL COMMENT '创建时间', - `update_by` bigint(20) DEFAULT NULL COMMENT '更新者', - `update_time` datetime DEFAULT NULL COMMENT '更新时间', - `remark` varchar(500) DEFAULT NULL COMMENT '备注', - PRIMARY KEY (`id`), - UNIQUE KEY `uk_manager_building` (`manager_id`,`building_id`), - KEY `idx_manager_id` (`manager_id`), - KEY `idx_building_id` (`building_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='管理员宿舍楼权限关系表'; - -- ---------------------------- -- Table structure for xg_dorm_manager_source -- ----------------------------