SET NAMES utf8mb4; SET FOREIGN_KEY_CHECKS = 0; -- ---------------------------- -- Table structure for rts_permission -- ---------------------------- DROP TABLE IF EXISTS `rts_permission`; CREATE TABLE `rts_permission` ( `id` bigint NOT NULL AUTO_INCREMENT COMMENT '权限id,对功能(system_ability)的管理', `project_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '对应的projectCode', `map_id` bigint NULL DEFAULT NULL COMMENT '对应线路的mapId', `permission_type` int NULL DEFAULT NULL COMMENT '权限类型 0=项目,1=线路,2=线路功能', `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '权限名称', `des` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '权限描述', `creator_id` bigint NULL DEFAULT NULL COMMENT '创建者id', `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间', `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间', `is_sync` tinyint(1) NULL DEFAULT NULL COMMENT '是否同步的数据', PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 2159 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for rts_permission_distribute -- ---------------------------- DROP TABLE IF EXISTS `rts_permission_distribute`; CREATE TABLE `rts_permission_distribute` ( `id` bigint NOT NULL AUTO_INCREMENT, `map_id` bigint NULL DEFAULT NULL COMMENT '地图id', `source_subject_id` bigint NULL DEFAULT NULL COMMENT '来源主体id', `forever` tinyint(1) NULL DEFAULT NULL COMMENT '是否永久:true/false', `status` int NULL DEFAULT NULL COMMENT '权限分发状态,1-有效,2-无效', `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间', `update_time` datetime NULL DEFAULT NULL COMMENT '修改时间', `start_time` datetime NULL DEFAULT NULL COMMENT '开始时间', `end_time` datetime NULL DEFAULT NULL COMMENT '结束时间', `creator_id` bigint NULL DEFAULT NULL COMMENT '创建者id', `dsc` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '备注描述', `is_sync` tinyint(1) NULL DEFAULT NULL COMMENT '是否同步的数据', PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for rts_permission_distribute_ref -- ---------------------------- DROP TABLE IF EXISTS `rts_permission_distribute_ref`; CREATE TABLE `rts_permission_distribute_ref` ( `id` bigint NOT NULL AUTO_INCREMENT, `distribute_id` bigint NULL DEFAULT NULL COMMENT '分发id', `permission_id` bigint NULL DEFAULT NULL COMMENT '权限id', `amount` int NULL DEFAULT NULL COMMENT '总数量', `remains` int NULL DEFAULT NULL COMMENT '剩余数量', `is_sync` tinyint(1) NULL DEFAULT NULL COMMENT '是否同步数据', PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 8615 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for rts_permission_subject -- ---------------------------- DROP TABLE IF EXISTS `rts_permission_subject`; CREATE TABLE `rts_permission_subject` ( `id` bigint NOT NULL AUTO_INCREMENT COMMENT '权限主体id', `permission_id` bigint NULL DEFAULT NULL COMMENT '访问权限id', `subject_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '主体类型(user,org)', `subject_id` bigint NULL DEFAULT NULL COMMENT '主体id', `amount` int NULL DEFAULT NULL COMMENT '主体对该权限的总数量', `remains` int NULL DEFAULT NULL COMMENT '主体对该权限的剩余数量', `status` int NULL DEFAULT NULL COMMENT '权限主体状态,1(Valid)-有效,2(InValid)-无效', `forever` tinyint(1) NULL DEFAULT NULL COMMENT '是否永久:1-true/0-false', `start_time` datetime NULL DEFAULT NULL COMMENT '开始时间', `end_time` datetime NULL DEFAULT NULL COMMENT '结束时间', `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间', `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间', `distribute_id` bigint NOT NULL COMMENT '来自对应的分发id(rts_permission_distribute)', `parent_id` bigint NULL DEFAULT NULL COMMENT '父级id 数据来源rts_permission_distribute表source_subject_id字段', `is_sync` tinyint(1) NULL DEFAULT NULL COMMENT '是否同步的数据', PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 60903 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for rts_permission_system_ability -- ---------------------------- DROP TABLE IF EXISTS `rts_permission_system_ability`; CREATE TABLE `rts_permission_system_ability` ( `id` bigint NOT NULL AUTO_INCREMENT COMMENT '权限功能关联记录id', `permission_id` bigint NULL DEFAULT NULL COMMENT '权限id', `system_ability_id` bigint NULL DEFAULT NULL COMMENT '功能(system_ability)的id', `is_sync` tinyint(1) NULL DEFAULT NULL COMMENT '是否同步的数据', PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 58719 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic; SET FOREIGN_KEY_CHECKS = 1;