CREATE TABLE `portal_common_app_link` (
  `app_link_id` bigint NOT NULL COMMENT '主键id',
  `link_category_id` bigint DEFAULT NULL COMMENT '所属链接分类id',
  `link_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '链接名称',
  `icon_type` int DEFAULT NULL COMMENT '图标类型：1-文件id，2-选择图片',
  `icon_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '图标编码',
  `link_icon_file_id` bigint DEFAULT NULL COMMENT '链接图标的文件id',
  `redirect_type` tinyint DEFAULT NULL COMMENT '跳转方式：1-内部路由，2-外部链接',
  `redirect_url` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '跳转路由',
  `open_type` tinyint DEFAULT NULL COMMENT '打开方式：1-本页面打开，2-新标签打开',
  `fld_sort` decimal(10,2) DEFAULT '100.00' COMMENT '排序',
  `del_flag` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT 'N' COMMENT '是否删除：Y-删除，N-未删除',
  `version_flag` bigint DEFAULT NULL COMMENT '乐观锁',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `create_user` bigint DEFAULT NULL COMMENT '创建人',
  `update_time` datetime DEFAULT NULL COMMENT '修改时间',
  `update_user` bigint DEFAULT NULL COMMENT '修改人',
  `tenant_id` bigint DEFAULT NULL COMMENT '租户id',
  PRIMARY KEY (`app_link_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='通用应用链接';

CREATE TABLE `portal_common_app_link_category` (
  `category_id` bigint NOT NULL COMMENT '主键id',
  `icon_type` int DEFAULT NULL COMMENT '图标类型：1-文件id，2-选择图片',
  `icon_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '图标编码',
  `category_icon_file_id` bigint DEFAULT NULL COMMENT '分类的图标',
  `category_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '应用链接分类名称',
  `fld_sort` decimal(10,2) DEFAULT NULL COMMENT '类别的顺序',
  `version_flag` bigint DEFAULT NULL COMMENT '乐观锁',
  `del_flag` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT 'N' COMMENT '是否删除：Y-删除，N-未删除',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `create_user` bigint DEFAULT NULL COMMENT '创建人',
  `update_time` datetime DEFAULT NULL COMMENT '修改时间',
  `update_user` bigint DEFAULT NULL COMMENT '修改人',
  `tenant_id` bigint DEFAULT NULL COMMENT '租户id',
  PRIMARY KEY (`category_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='通用应用链接的分类';

CREATE TABLE `portal_common_app_link_user_config` (
  `id` bigint NOT NULL COMMENT '主键id',
  `user_id` bigint DEFAULT NULL COMMENT '关联用户id',
  `link_category_id` bigint DEFAULT NULL COMMENT '所属链接分类id',
  `app_link_id` bigint DEFAULT NULL COMMENT '链接id',
  `fld_sort` decimal(10,2) DEFAULT '100.00' COMMENT '排序',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `create_user` bigint DEFAULT NULL COMMENT '创建人',
  `update_time` datetime DEFAULT NULL COMMENT '修改时间',
  `update_user` bigint DEFAULT NULL COMMENT '修改人',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='用户应用链接的配置';

INSERT INTO `portal_common_app_link_category`(`category_id`, `icon_type`, `icon_code`, `category_icon_file_id`, `category_name`, `fld_sort`, `version_flag`, `del_flag`, `create_time`, `create_user`, `update_time`, `update_user`, `tenant_id`) VALUES (1892202090147700738, 2, 'icon-icon-menu-project', NULL, '门户配置', 100.00, 0, 'N', '2025-02-19 21:18:28', 1339550467939639299, NULL, NULL, 1);
INSERT INTO `portal_common_app_link_category`(`category_id`, `icon_type`, `icon_code`, `category_icon_file_id`, `category_name`, `fld_sort`, `version_flag`, `del_flag`, `create_time`, `create_user`, `update_time`, `update_user`, `tenant_id`) VALUES (1892202150080110593, 2, 'icon-icon-menu-project', NULL, '业务流程', 110.00, 1, 'N', '2025-02-19 21:18:43', 1339550467939639299, '2025-02-19 21:19:25', 1339550467939639299, 1);
INSERT INTO `portal_common_app_link_category`(`category_id`, `icon_type`, `icon_code`, `category_icon_file_id`, `category_name`, `fld_sort`, `version_flag`, `del_flag`, `create_time`, `create_user`, `update_time`, `update_user`, `tenant_id`) VALUES (1892202190194434049, 2, 'icon-icon-menu-project', NULL, '组织架构', 120.00, 1, 'N', '2025-02-19 21:18:52', 1339550467939639299, '2025-02-19 21:19:31', 1339550467939639299, 1);
INSERT INTO `portal_common_app_link_category`(`category_id`, `icon_type`, `icon_code`, `category_icon_file_id`, `category_name`, `fld_sort`, `version_flag`, `del_flag`, `create_time`, `create_user`, `update_time`, `update_user`, `tenant_id`) VALUES (1892202249208291330, 2, 'icon-icon-menu-project', NULL, '后台配置', 130.00, 1, 'N', '2025-02-19 21:19:06', 1339550467939639299, '2025-02-19 21:19:35', 1339550467939639299, 1);
INSERT INTO `portal_common_app_link_category`(`category_id`, `icon_type`, `icon_code`, `category_icon_file_id`, `category_name`, `fld_sort`, `version_flag`, `del_flag`, `create_time`, `create_user`, `update_time`, `update_user`, `tenant_id`) VALUES (1892202455601602562, 2, 'icon-icon-menu-project', NULL, '权限管理', 125.00, 1, 'N', '2025-02-19 21:19:56', 1339550467939639299, '2025-02-19 21:20:03', 1339550467939639299, 1);

INSERT INTO `portal_common_app_link`(`app_link_id`, `link_category_id`, `link_name`, `icon_type`, `icon_code`, `link_icon_file_id`, `redirect_type`, `redirect_url`, `open_type`, `fld_sort`, `del_flag`, `version_flag`, `create_time`, `create_user`, `update_time`, `update_user`, `tenant_id`) VALUES (1892202582689013761, 1892202090147700738, '门户设计', 2, 'icon-menu-moxingliebiao', NULL, 1, '/portal/backend/config', 2, 100.00, 'N', 0, '2025-02-19 21:20:26', 1339550467939639299, NULL, NULL, 1);
INSERT INTO `portal_common_app_link`(`app_link_id`, `link_category_id`, `link_name`, `icon_type`, `icon_code`, `link_icon_file_id`, `redirect_type`, `redirect_url`, `open_type`, `fld_sort`, `del_flag`, `version_flag`, `create_time`, `create_user`, `update_time`, `update_user`, `tenant_id`) VALUES (1892202659180535810, 1892202090147700738, '快捷入口管理', 2, 'icon-yiyueshixiang', NULL, 1, '/portal/backend/app', 2, 102.00, 'N', 0, '2025-02-19 21:20:44', 1339550467939639299, NULL, NULL, 1);
INSERT INTO `portal_common_app_link`(`app_link_id`, `link_category_id`, `link_name`, `icon_type`, `icon_code`, `link_icon_file_id`, `redirect_type`, `redirect_url`, `open_type`, `fld_sort`, `del_flag`, `version_flag`, `create_time`, `create_user`, `update_time`, `update_user`, `tenant_id`) VALUES (1892202823832133633, 1892202150080110593, '业务设计', 2, 'icon-menu-yewuliebiao', NULL, 1, '/mid/app/list', 2, 100.00, 'N', 0, '2025-02-19 21:21:23', 1339550467939639299, NULL, NULL, 1);
INSERT INTO `portal_common_app_link`(`app_link_id`, `link_category_id`, `link_name`, `icon_type`, `icon_code`, `link_icon_file_id`, `redirect_type`, `redirect_url`, `open_type`, `fld_sort`, `del_flag`, `version_flag`, `create_time`, `create_user`, `update_time`, `update_user`, `tenant_id`) VALUES (1892202895651201026, 1892202150080110593, '流程设计', 2, 'icon-menu-moxingliebiao', NULL, 1, '/mid/workflow/model', 2, 102.00, 'N', 0, '2025-02-19 21:21:40', 1339550467939639299, NULL, NULL, 1);
INSERT INTO `portal_common_app_link`(`app_link_id`, `link_category_id`, `link_name`, `icon_type`, `icon_code`, `link_icon_file_id`, `redirect_type`, `redirect_url`, `open_type`, `fld_sort`, `del_flag`, `version_flag`, `create_time`, `create_user`, `update_time`, `update_user`, `tenant_id`) VALUES (1892202963561177089, 1892202150080110593, '业务汇总', 2, 'icon-menu-yewuliebiao', NULL, 1, '/mid/app/summary', 2, 105.00, 'N', 0, '2025-02-19 21:21:57', 1339550467939639299, NULL, NULL, 1);
INSERT INTO `portal_common_app_link`(`app_link_id`, `link_category_id`, `link_name`, `icon_type`, `icon_code`, `link_icon_file_id`, `redirect_type`, `redirect_url`, `open_type`, `fld_sort`, `del_flag`, `version_flag`, `create_time`, `create_user`, `update_time`, `update_user`, `tenant_id`) VALUES (1892203071715500034, 1892202190194434049, '人员管理', 2, 'icon-menu-renyuan', NULL, 1, '/system/structure/user', 2, 100.00, 'N', 0, '2025-02-19 21:22:22', 1339550467939639299, NULL, NULL, 1);
INSERT INTO `portal_common_app_link`(`app_link_id`, `link_category_id`, `link_name`, `icon_type`, `icon_code`, `link_icon_file_id`, `redirect_type`, `redirect_url`, `open_type`, `fld_sort`, `del_flag`, `version_flag`, `create_time`, `create_user`, `update_time`, `update_user`, `tenant_id`) VALUES (1892203156918591490, 1892202190194434049, '机构管理', 2, 'icon-menu-jigou', NULL, 1, '/system/structure/organization', 2, 100.00, 'N', 0, '2025-02-19 21:22:43', 1339550467939639299, NULL, NULL, 1);
INSERT INTO `portal_common_app_link`(`app_link_id`, `link_category_id`, `link_name`, `icon_type`, `icon_code`, `link_icon_file_id`, `redirect_type`, `redirect_url`, `open_type`, `fld_sort`, `del_flag`, `version_flag`, `create_time`, `create_user`, `update_time`, `update_user`, `tenant_id`) VALUES (1892203279996248065, 1892202190194434049, '职位管理', 2, 'icon-menu-zhiwei', NULL, 1, '/system/structure/position', 2, 110.00, 'N', 0, '2025-02-19 21:23:12', 1339550467939639299, NULL, NULL, 1);
INSERT INTO `portal_common_app_link`(`app_link_id`, `link_category_id`, `link_name`, `icon_type`, `icon_code`, `link_icon_file_id`, `redirect_type`, `redirect_url`, `open_type`, `fld_sort`, `del_flag`, `version_flag`, `create_time`, `create_user`, `update_time`, `update_user`, `tenant_id`) VALUES (1892203349047074818, 1892202455601602562, '应用管理', 2, 'icon-menu-yingyong', NULL, 1, '/system/auth/app', 2, 100.00, 'N', 0, '2025-02-19 21:23:29', 1339550467939639299, NULL, NULL, 1);
INSERT INTO `portal_common_app_link`(`app_link_id`, `link_category_id`, `link_name`, `icon_type`, `icon_code`, `link_icon_file_id`, `redirect_type`, `redirect_url`, `open_type`, `fld_sort`, `del_flag`, `version_flag`, `create_time`, `create_user`, `update_time`, `update_user`, `tenant_id`) VALUES (1892203416512454658, 1892202455601602562, '角色管理', 2, 'icon-menu-juese', NULL, 2, '/system/auth/role', 2, 110.00, 'N', 0, '2025-02-19 21:23:45', 1339550467939639299, NULL, NULL, 1);
INSERT INTO `portal_common_app_link`(`app_link_id`, `link_category_id`, `link_name`, `icon_type`, `icon_code`, `link_icon_file_id`, `redirect_type`, `redirect_url`, `open_type`, `fld_sort`, `del_flag`, `version_flag`, `create_time`, `create_user`, `update_time`, `update_user`, `tenant_id`) VALUES (1892203486578302977, 1892202455601602562, '权限管理', 2, 'icon-menu-quanxian', NULL, 1, '/system/auth/permission', 2, 120.00, 'N', 0, '2025-02-19 21:24:01', 1339550467939639299, NULL, NULL, 1);
INSERT INTO `portal_common_app_link`(`app_link_id`, `link_category_id`, `link_name`, `icon_type`, `icon_code`, `link_icon_file_id`, `redirect_type`, `redirect_url`, `open_type`, `fld_sort`, `del_flag`, `version_flag`, `create_time`, `create_user`, `update_time`, `update_user`, `tenant_id`) VALUES (1892203543255932929, 1892202455601602562, '菜单管理', 2, 'icon-menu-caidan', NULL, 1, '/system/auth/menu', 2, 100.00, 'N', 0, '2025-02-19 21:24:15', 1339550467939639299, NULL, NULL, 1);
INSERT INTO `portal_common_app_link`(`app_link_id`, `link_category_id`, `link_name`, `icon_type`, `icon_code`, `link_icon_file_id`, `redirect_type`, `redirect_url`, `open_type`, `fld_sort`, `del_flag`, `version_flag`, `create_time`, `create_user`, `update_time`, `update_user`, `tenant_id`) VALUES (1892203614290665473, 1892202249208291330, '系统配置', 2, 'icon-menu-peizhi', NULL, 1, '/system/backend/sys_config', 2, 100.00, 'N', 0, '2025-02-19 21:24:32', 1339550467939639299, NULL, NULL, 1);
INSERT INTO `portal_common_app_link`(`app_link_id`, `link_category_id`, `link_name`, `icon_type`, `icon_code`, `link_icon_file_id`, `redirect_type`, `redirect_url`, `open_type`, `fld_sort`, `del_flag`, `version_flag`, `create_time`, `create_user`, `update_time`, `update_user`, `tenant_id`) VALUES (1892204038930391042, 1892202249208291330, '字典管理', 2, 'icon-menu-zidian', NULL, 1, '/system/backend/dict', 2, 110.00, 'N', 1, '2025-02-19 21:26:13', 1339550467939639299, '2025-02-19 21:26:19', 1339550467939639299, 1);
INSERT INTO `portal_common_app_link`(`app_link_id`, `link_category_id`, `link_name`, `icon_type`, `icon_code`, `link_icon_file_id`, `redirect_type`, `redirect_url`, `open_type`, `fld_sort`, `del_flag`, `version_flag`, `create_time`, `create_user`, `update_time`, `update_user`, `tenant_id`) VALUES (1892204136938692609, 1892202249208291330, '定时任务', 2, 'icon-menu-dingshirenwu', NULL, 1, '/system/backend/timer', 2, 120.00, 'N', 0, '2025-02-19 21:26:36', 1339550467939639299, NULL, NULL, 1);
INSERT INTO `portal_common_app_link`(`app_link_id`, `link_category_id`, `link_name`, `icon_type`, `icon_code`, `link_icon_file_id`, `redirect_type`, `redirect_url`, `open_type`, `fld_sort`, `del_flag`, `version_flag`, `create_time`, `create_user`, `update_time`, `update_user`, `tenant_id`) VALUES (1892204201665191937, 1892202249208291330, '文件管理', 2, 'icon-menu-wenjianguanli', NULL, 1, '/system/backend/file', 2, 130.00, 'N', 0, '2025-02-19 21:26:52', 1339550467939639299, NULL, NULL, 1);
INSERT INTO `portal_common_app_link`(`app_link_id`, `link_category_id`, `link_name`, `icon_type`, `icon_code`, `link_icon_file_id`, `redirect_type`, `redirect_url`, `open_type`, `fld_sort`, `del_flag`, `version_flag`, `create_time`, `create_user`, `update_time`, `update_user`, `tenant_id`) VALUES (1892204287342239746, 1892202249208291330, '多数据源', 2, 'icon-menu-duoshujuyuan', NULL, 1, '/system/backend/datasource', 2, 140.00, 'N', 0, '2025-02-19 21:27:12', 1339550467939639299, NULL, NULL, 1);
INSERT INTO `portal_common_app_link`(`app_link_id`, `link_category_id`, `link_name`, `icon_type`, `icon_code`, `link_icon_file_id`, `redirect_type`, `redirect_url`, `open_type`, `fld_sort`, `del_flag`, `version_flag`, `create_time`, `create_user`, `update_time`, `update_user`, `tenant_id`) VALUES (1892204375993049089, 1892202249208291330, '日志管理', 2, 'icon-menu-rizhichakan', NULL, 1, '/system/backend/log', 2, 150.00, 'N', 0, '2025-02-19 21:27:33', 1339550467939639299, NULL, NULL, 1);
INSERT INTO `portal_common_app_link`(`app_link_id`, `link_category_id`, `link_name`, `icon_type`, `icon_code`, `link_icon_file_id`, `redirect_type`, `redirect_url`, `open_type`, `fld_sort`, `del_flag`, `version_flag`, `create_time`, `create_user`, `update_time`, `update_user`, `tenant_id`) VALUES (1892204473141518338, 1892202249208291330, '主题配置', 2, 'icon-menu-zhutipeizhi', NULL, 1, '/system/backend/theme', 2, 160.00, 'N', 0, '2025-02-19 21:27:57', 1339550467939639299, NULL, NULL, 1);