数据库设计
系统主要包含用户(sys_user)、组织(sys_dept)、角色(sys_role)、菜单(sys_menu)、角色组织(sys_role_dept)、角色菜单(sys_role_menu)、用户Token(sys_user_token)、系统日志(sys_log)等表。
1.用户属于组织,通过 sys_user 表中的 dept_id 关联到组织。
2.组织拥有角色,通过角色组织表关联。
3.用户拥有角色,通过用户角色表关联,用户可以继承组织的角色。
4.角色关联菜单,菜单关联权限,角色通过角色菜单表关联到菜单表。
表结构
用户表
-- ----------------------------------------------------
-- 用户
-- ----------------------------------------------------
-- Table structure for `sys_user`
-- ----------------------------------------------------
CREATE TABLE `sys_user` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '编号',
`name` varchar(50) NOT NULL COMMENT '用户名',
`password` varchar(100) COMMENT '密码',
`salt` varchar(40) COMMENT '盐',
`email` varchar(100) COMMENT '邮箱',
`mobile` varchar(100) COMMENT '手机号',
`status` tinyint COMMENT '状态 0:禁用 1:正常',
`dept_id` bigint(20) COMMENT '机构ID',
`create_by` varchar(50) COMMENT '创建人',
`create_time` datetime COMMENT '创建时间',
`last_update_by` varchar(50) COMMENT '更新人',
`last_update_time` datetime COMMENT '更新时间',
`del_flag` tinyint DEFAULT 0 COMMENT '是否删除 -1:已删除 0:正常',
PRIMARY KEY (`id`),
UNIQUE INDEX (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='用户';
机构表
-- ----------------------------------------------------
-- 机构
-- ------------------------------------------------
-- Table structure for `sys_dept`
-- ------------------------------------------------
CREATE TABLE `sys_dept` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '编号',
`name` varchar(50) COMMENT '机构名称',
`parent_id` bigint COMMENT '上级机构ID,一级机构为0',
`order_num` int COMMENT '排序',
`create_by` varchar(50) COMMENT '创建人',
`create_time` datetime COMMENT '创建时间',
`last_update_by` varchar(50) COMMENT '更新人',
`last_update_time` datetime COMMENT '更新时间',
`del_flag` tinyint DEFAULT 0 COMMENT '是否删除 -1:已删除 0:正常',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='机构管理';
角色表
-- ------------------------------------------------
-- 角色
-- ------------------------------------------------
-- Table structure for `sys_role`
-- ------------------------------------------------
CREATE TABLE `sys_role` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '编号',
`name` varchar(100) COMMENT '角色名称',
`remark` varchar(100) COMMENT '备注',
`create_by` varchar(50) COMMENT '创建人',
`create_time` datetime COMMENT '创建时间',
`last_update_by` varchar(50) COMMENT '更新人',
`last_update_time` datetime COMMENT '更新时间',
`del_flag` tinyint DEFAULT 0 COMMENT '是否删除 -1:已删除 0:正常',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='角色';
菜单表
-- ------------------------------------------------
-- 菜单
-- ------------------------------------------------
-- Table structure for `sys_menu`
-- ------------------------------------------------
CREATE TABLE `sys_menu` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '编号',
`name` varchar(50) COMMENT '菜单名称',
`parent_id` bigint COMMENT '父菜单ID,一级菜单为0',
`url` varchar(200) COMMENT '菜单URL',
`perms` varchar(500) COMMENT '授权(多个用逗号分隔,如:user:view,user:create)',
`type` int COMMENT '类型 0:目录 1:菜单 2:按钮',
`icon` varchar(50) COMMENT '菜单图标',
`order_num` int COMMENT '排序',
`create_by` varchar(50) COMMENT '创建人',
`create_time` datetime COMMENT '创建时间',
`last_update_by` varchar(50) COMMENT '更新人',
`last_update_time` datetime COMMENT '更新时间',
`del_flag` tinyint DEFAULT 0 COMMENT '是否删除 -1:已删除 0:正常',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='菜单管理';
用户角色表
-- ------------------------------------------------
-- 用户与角色对应关系
-- ------------------------------------------------
-- Table structure for `sys_user_role`
-- ------------------------------------------------
CREATE TABLE `sys_user_role` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '编号',
`user_id` bigint COMMENT '用户ID',
`role_id` bigint COMMENT '角色ID',
`create_by` varchar(50) COMMENT '创建人',
`create_time` datetime COMMENT '创建时间',
`last_update_by` varchar(50) COMMENT '更新人',
`last_update_time` datetime COMMENT '更新时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='用户与角色对应关系';
角色机构表
-- ------------------------------------------------
-- 角色与机构对应关系
-- ------------------------------------------------
-- Table structure for `sys_role_dept`
-- ------------------------------------------------
CREATE TABLE `sys_role_dept` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '编号',
`role_id` bigint COMMENT '角色ID',
`dept_id` bigint COMMENT '机构ID',
`create_by` varchar(50) COMMENT '创建人',
`create_time` datetime COMMENT '创建时间',
`last_update_by` varchar(50) COMMENT '更新人',
`last_update_time` datetime COMMENT '更新时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='角色与机构对应关系';
角色菜单表
-- ------------------------------------------------
-- 角色与菜单对应关系
-- ------------------------------------------------
-- Table structure for `sys_role_menu`
-- ------------------------------------------------
CREATE TABLE `sys_role_menu` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '编号',
`role_id` bigint COMMENT '角色ID',
`menu_id` bigint COMMENT '菜单ID',
`create_by` varchar(50) COMMENT '创建人',
`create_time` datetime COMMENT '创建时间',
`last_update_by` varchar(50) COMMENT '更新人',
`last_update_time` datetime COMMENT '更新时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='角色与菜单对应关系';
用户Token表
-- ------------------------------------------------
-- 用户Token
-- ------------------------------------------------
-- Table structure for `sys_user_token`
-- ------------------------------------------------
CREATE TABLE `sys_user_token` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '编号',
`user_id` bigint NOT NULL,
`token` varchar(100) NOT NULL COMMENT 'token',
`expire_time` datetime DEFAULT NULL COMMENT '过期时间',
`create_by` varchar(50) COMMENT '创建人',
`create_time` datetime COMMENT '创建时间',
`last_update_by` varchar(50) COMMENT '更新人',
`last_update_time` datetime COMMENT '更新时间',
PRIMARY KEY (`id`),
UNIQUE KEY `token` (`token`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='用户Token';
系统日志表
-- ------------------------------------------------
-- 系统日志
-- ------------------------------------------------
-- Table structure for `sys_log`
-- ------------------------------------------------
CREATE TABLE `sys_log` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '编号',
`user_name` varchar(50) COMMENT '用户名',
`operation` varchar(50) COMMENT '用户操作',
`method` varchar(200) COMMENT '请求方法',
`params` varchar(5000) COMMENT '请求参数',
`time` bigint NOT NULL COMMENT '执行时长(毫秒)',
`ip` varchar(64) COMMENT 'IP地址',
`create_by` varchar(50) COMMENT '创建人',
`create_time` datetime COMMENT '创建时间',
`last_update_by` varchar(50) COMMENT '更新人',
`last_update_time` datetime COMMENT '更新时间',
PRIMARY KEY (`id`)
) ENGINE=`InnoDB` DEFAULT CHARACTER SET utf8 COMMENT='系统日志';
数据字典表
-- ------------------------------------------------
-- 数据字典
-- ------------------------------------------------
-- Table structure for `sys_dict`
-- ------------------------------------------------
DROP TABLE IF EXISTS `sys_dict`;
CREATE TABLE `sys_dict` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '编号',
`value` varchar(100) NOT NULL COMMENT '数据值',
`label` varchar(100) NOT NULL COMMENT '标签名',
`type` varchar(100) NOT NULL COMMENT '类型',
`description` varchar(100) NOT NULL COMMENT '描述',
`sort` decimal(10,0) NOT NULL COMMENT '排序(升序)',
`create_by` varchar(50) COMMENT '创建人',
`create_time` datetime COMMENT '创建时间',
`last_update_by` varchar(50) COMMENT '更新人',
`last_update_time` datetime COMMENT '更新时间',
`remarks` varchar(255) DEFAULT NULL COMMENT '备注信息',
`del_flag` tinyint DEFAULT 0 COMMENT '是否删除 -1:已删除 0:正常',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='字典表';
完整SQL脚本
将完整的SQL脚本保存到SQL文件,放置在工程doc目录下,以便保存修改。project\doc\db.sql
-- ----------------------------------------------------
-- 用户
-- ----------------------------------------------------
-- Table structure for `sys_user`
-- ----------------------------------------------------
CREATE TABLE `sys_user` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '编号',
`name` varchar(50) NOT NULL COMMENT '用户名',
`password` varchar(100) COMMENT '密码',
`salt` varchar(40) COMMENT '盐',
`email` varchar(100) COMMENT '邮箱',
`mobile` varchar(100) COMMENT '手机号',
`status` tinyint COMMENT '状态 0:禁用 1:正常',
`dept_id` bigint(20) COMMENT '机构ID',
`create_by` varchar(50) COMMENT '创建人',
`create_time` datetime COMMENT '创建时间',
`last_update_by` varchar(50) COMMENT '更新人',
`last_update_time` datetime COMMENT '更新时间',
`del_flag` tinyint DEFAULT 0 COMMENT '是否删除 -1:已删除 0:正常',
PRIMARY KEY (`id`),
UNIQUE INDEX (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='用户'; -- ----------------------------------------------------
-- 机构
-- ------------------------------------------------
-- Table structure for `sys_dept`
-- ------------------------------------------------
CREATE TABLE `sys_dept` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '编号',
`name` varchar(50) COMMENT '机构名称',
`parent_id` bigint COMMENT '上级机构ID,一级机构为0',
`order_num` int COMMENT '排序',
`create_by` varchar(50) COMMENT '创建人',
`create_time` datetime COMMENT '创建时间',
`last_update_by` varchar(50) COMMENT '更新人',
`last_update_time` datetime COMMENT '更新时间',
`del_flag` tinyint DEFAULT 0 COMMENT '是否删除 -1:已删除 0:正常',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='机构管理'; -- ------------------------------------------------
-- 角色
-- ------------------------------------------------
-- Table structure for `sys_role`
-- ------------------------------------------------
CREATE TABLE `sys_role` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '编号',
`name` varchar(100) COMMENT '角色名称',
`remark` varchar(100) COMMENT '备注',
`create_by` varchar(50) COMMENT '创建人',
`create_time` datetime COMMENT '创建时间',
`last_update_by` varchar(50) COMMENT '更新人',
`last_update_time` datetime COMMENT '更新时间',
`del_flag` tinyint DEFAULT 0 COMMENT '是否删除 -1:已删除 0:正常',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='角色'; -- ------------------------------------------------
-- 菜单
-- ------------------------------------------------
-- Table structure for `sys_menu`
-- ------------------------------------------------
CREATE TABLE `sys_menu` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '编号',
`name` varchar(50) COMMENT '菜单名称',
`parent_id` bigint COMMENT '父菜单ID,一级菜单为0',
`url` varchar(200) COMMENT '菜单URL',
`perms` varchar(500) COMMENT '授权(多个用逗号分隔,如:user:view,user:create)',
`type` int COMMENT '类型 0:目录 1:菜单 2:按钮',
`icon` varchar(50) COMMENT '菜单图标',
`order_num` int COMMENT '排序',
`create_by` varchar(50) COMMENT '创建人',
`create_time` datetime COMMENT '创建时间',
`last_update_by` varchar(50) COMMENT '更新人',
`last_update_time` datetime COMMENT '更新时间',
`del_flag` tinyint DEFAULT 0 COMMENT '是否删除 -1:已删除 0:正常',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='菜单管理'; -- ------------------------------------------------
-- 用户与角色对应关系
-- ------------------------------------------------
-- Table structure for `sys_user_role`
-- ------------------------------------------------
CREATE TABLE `sys_user_role` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '编号',
`user_id` bigint COMMENT '用户ID',
`role_id` bigint COMMENT '角色ID',
`create_by` varchar(50) COMMENT '创建人',
`create_time` datetime COMMENT '创建时间',
`last_update_by` varchar(50) COMMENT '更新人',
`last_update_time` datetime COMMENT '更新时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='用户与角色对应关系'; -- ------------------------------------------------
-- 角色与机构对应关系
-- ------------------------------------------------
-- Table structure for `sys_role_dept`
-- ------------------------------------------------
CREATE TABLE `sys_role_dept` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '编号',
`role_id` bigint COMMENT '角色ID',
`dept_id` bigint COMMENT '机构ID',
`create_by` varchar(50) COMMENT '创建人',
`create_time` datetime COMMENT '创建时间',
`last_update_by` varchar(50) COMMENT '更新人',
`last_update_time` datetime COMMENT '更新时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='角色与机构对应关系'; -- ------------------------------------------------
-- 角色与菜单对应关系
-- ------------------------------------------------
-- Table structure for `sys_role_menu`
-- ------------------------------------------------
CREATE TABLE `sys_role_menu` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '编号',
`role_id` bigint COMMENT '角色ID',
`menu_id` bigint COMMENT '菜单ID',
`create_by` varchar(50) COMMENT '创建人',
`create_time` datetime COMMENT '创建时间',
`last_update_by` varchar(50) COMMENT '更新人',
`last_update_time` datetime COMMENT '更新时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='角色与菜单对应关系'; -- ------------------------------------------------
-- 用户Token
-- ------------------------------------------------
-- Table structure for `sys_user_token`
-- ------------------------------------------------
CREATE TABLE `sys_user_token` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '编号',
`user_id` bigint NOT NULL,
`token` varchar(100) NOT NULL COMMENT 'token',
`expire_time` datetime DEFAULT NULL COMMENT '过期时间',
`create_by` varchar(50) COMMENT '创建人',
`create_time` datetime COMMENT '创建时间',
`last_update_by` varchar(50) COMMENT '更新人',
`last_update_time` datetime COMMENT '更新时间',
PRIMARY KEY (`id`),
UNIQUE KEY `token` (`token`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='用户Token'; -- ------------------------------------------------
-- 系统日志
-- ------------------------------------------------
-- Table structure for `sys_log`
-- ------------------------------------------------
CREATE TABLE `sys_log` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '编号',
`user_name` varchar(50) COMMENT '用户名',
`operation` varchar(50) COMMENT '用户操作',
`method` varchar(200) COMMENT '请求方法',
`params` varchar(5000) COMMENT '请求参数',
`time` bigint NOT NULL COMMENT '执行时长(毫秒)',
`ip` varchar(64) COMMENT 'IP地址',
`create_by` varchar(50) COMMENT '创建人',
`create_time` datetime COMMENT '创建时间',
`last_update_by` varchar(50) COMMENT '更新人',
`last_update_time` datetime COMMENT '更新时间',
PRIMARY KEY (`id`)
) ENGINE=`InnoDB` DEFAULT CHARACTER SET utf8 COMMENT='系统日志'; -- ------------------------------------------------
-- 数据字典
-- ------------------------------------------------
-- Table structure for `sys_dict`
-- ------------------------------------------------
DROP TABLE IF EXISTS `sys_dict`;
CREATE TABLE `sys_dict` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '编号',
`value` varchar(100) NOT NULL COMMENT '数据值',
`label` varchar(100) NOT NULL COMMENT '标签名',
`type` varchar(100) NOT NULL COMMENT '类型',
`description` varchar(100) NOT NULL COMMENT '描述',
`sort` decimal(10,0) NOT NULL COMMENT '排序(升序)',
`create_by` varchar(50) COMMENT '创建人',
`create_time` datetime COMMENT '创建时间',
`last_update_by` varchar(50) COMMENT '更新人',
`last_update_time` datetime COMMENT '更新时间',
`remarks` varchar(255) DEFAULT NULL COMMENT '备注信息',
`del_flag` tinyint DEFAULT 0 COMMENT '是否删除 -1:已删除 0:正常',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='字典表'; -- --------------------------------------
-- 初始数据
-- --------------------------------------
-- Records of `sys_user`
-- --------------------------------------
INSERT INTO `sys_user` (`id`, `name`, `password`, `salt`, `dept_id`, `email`, `mobile`, `status`, `create_time`) VALUES ('', 'admin', '9ec9750e709431dad22365cabc5c625482e574c74adaebba7dd02f1129e4ce1d', 'YzcmCZNvbXocrsz9dm8e', '', 'admin@qq.com', '', '', '2018-08-14 11:11:11');
INSERT INTO `sys_user` (`id`, `name`, `password`, `salt`, `dept_id`, `email`, `mobile`, `status`, `create_time`) VALUES ('', 'Louis', '9ec9750e709431dad22365cabc5c625482e574c74adaebba7dd02f1129e4ce1d', 'YzcmCZNvbXocrsz9dm8e', '', 'louis@qq.com', '', '', '2018-08-14 11:11:11');
INSERT INTO `sys_user` (`id`, `name`, `password`, `salt`, `dept_id`, `email`, `mobile`, `status`, `create_time`) VALUES ('', 'Kobe', '9ec9750e709431dad22365cabc5c625482e574c74adaebba7dd02f1129e4ce1d', 'YzcmCZNvbXocrsz9dm8e', '', 'kobe@qq.com', '', '', '2018-08-14 11:11:11');
INSERT INTO `sys_user` (`id`, `name`, `password`, `salt`, `dept_id`, `email`, `mobile`, `status`, `create_time`) VALUES ('', 'Iverson', '9ec9750e709431dad22365cabc5c625482e574c74adaebba7dd02f1129e4ce1d', 'YzcmCZNvbXocrsz9dm8e', '', 'iverson@qq.com', '', '', '2018-08-14 11:11:11');
INSERT INTO `sys_user` (`id`, `name`, `password`, `salt`, `dept_id`, `email`, `mobile`, `status`, `create_time`) VALUES ('', 'Iverson5', '9ec9750e709431dad22365cabc5c625482e574c74adaebba7dd02f1129e4ce1d', 'YzcmCZNvbXocrsz9dm8e', '', 'iverson@qq.com', '', '', '2018-08-14 11:11:11');
INSERT INTO `sys_user` (`id`, `name`, `password`, `salt`, `dept_id`, `email`, `mobile`, `status`, `create_time`) VALUES ('', 'Iverson6', '9ec9750e709431dad22365cabc5c625482e574c74adaebba7dd02f1129e4ce1d', 'YzcmCZNvbXocrsz9dm8e', '', 'iverson@qq.com', '', '', '2018-08-14 11:11:11');
INSERT INTO `sys_user` (`id`, `name`, `password`, `salt`, `dept_id`, `email`, `mobile`, `status`, `create_time`) VALUES ('', 'Iverson7', '9ec9750e709431dad22365cabc5c625482e574c74adaebba7dd02f1129e4ce1d', 'YzcmCZNvbXocrsz9dm8e', '', 'iverson@qq.com', '', '', '2018-08-14 11:11:11');
INSERT INTO `sys_user` (`id`, `name`, `password`, `salt`, `dept_id`, `email`, `mobile`, `status`, `create_time`) VALUES ('', 'Iverson8', '9ec9750e709431dad22365cabc5c625482e574c74adaebba7dd02f1129e4ce1d', 'YzcmCZNvbXocrsz9dm8e', '', 'iverson@qq.com', '', '', '2018-08-14 11:11:11');
INSERT INTO `sys_user` (`id`, `name`, `password`, `salt`, `dept_id`, `email`, `mobile`, `status`, `create_time`) VALUES ('', 'Iverson9', '9ec9750e709431dad22365cabc5c625482e574c74adaebba7dd02f1129e4ce1d', 'YzcmCZNvbXocrsz9dm8e', '', 'iverson@qq.com', '', '', '2018-08-14 11:11:11');
INSERT INTO `sys_user` (`id`, `name`, `password`, `salt`, `dept_id`, `email`, `mobile`, `status`, `create_time`) VALUES ('', 'Iverson10', '9ec9750e709431dad22365cabc5c625482e574c74adaebba7dd02f1129e4ce1d', 'YzcmCZNvbXocrsz9dm8e', '', 'iverson@qq.com', '', '', '2018-08-14 11:11:11');
INSERT INTO `sys_user` (`id`, `name`, `password`, `salt`, `dept_id`, `email`, `mobile`, `status`, `create_time`) VALUES ('', 'Iverson11', '9ec9750e709431dad22365cabc5c625482e574c74adaebba7dd02f1129e4ce1d', 'YzcmCZNvbXocrsz9dm8e', '', 'iverson@qq.com', '', '', '2018-08-14 11:11:11');
INSERT INTO `sys_user` (`id`, `name`, `password`, `salt`, `dept_id`, `email`, `mobile`, `status`, `create_time`) VALUES ('', 'Iverson12', '9ec9750e709431dad22365cabc5c625482e574c74adaebba7dd02f1129e4ce1d', 'YzcmCZNvbXocrsz9dm8e', '', 'iverson@qq.com', '', '', '2018-08-14 11:11:11');
-- --------------------------------------
-- Records of `sys_role`
-- --------------------------------------
INSERT INTO `sys_role` (`id`, `name`, `remark`, `create_time`) VALUES ('', 'admin', '超级管理员', '2018-08-14 11:11:11');
INSERT INTO `sys_role` (`id`, `name`, `remark`, `create_time`) VALUES ('', 'dev', '开发人员', '2018-08-14 11:11:11');
INSERT INTO `sys_role` (`id`, `name`, `remark`, `create_time`) VALUES ('', 'test', '测试人员', '2018-08-14 11:11:11');
-- --------------------------------------
-- Records of `sys_user_role`
-- --------------------------------------
INSERT INTO `sys_user_role` (`id`, `user_id`, `role_id`) VALUES ('', '', '');
INSERT INTO `sys_user_role` (`id`, `user_id`, `role_id`) VALUES ('', '', '');
INSERT INTO `sys_user_role` (`id`, `user_id`, `role_id`) VALUES ('', '', '');
INSERT INTO `sys_user_role` (`id`, `user_id`, `role_id`) VALUES ('', '', '');
-- --------------------------------------
-- Records of `sys_dept`
-- --------------------------------------
INSERT INTO `sys_dept` (`id`, `parent_id`, `name`, `order_num`, `del_flag`) VALUES ('', '', '轻尘集团', '', '');
INSERT INTO `sys_dept` (`id`, `parent_id`, `name`, `order_num`, `del_flag`) VALUES ('', '', '北京分公司', '', '');
INSERT INTO `sys_dept` (`id`, `parent_id`, `name`, `order_num`, `del_flag`) VALUES ('', '', '上海分公司', '', '');
INSERT INTO `sys_dept` (`id`, `parent_id`, `name`, `order_num`, `del_flag`) VALUES ('', '', '技术部', '', '');
INSERT INTO `sys_dept` (`id`, `parent_id`, `name`, `order_num`, `del_flag`) VALUES ('', '', '宣传部', '', '');
INSERT INTO `sys_dept` (`id`, `parent_id`, `name`, `order_num`, `del_flag`) VALUES ('', '', '销售部', '', '');
INSERT INTO `sys_dept` (`id`, `parent_id`, `name`, `order_num`, `del_flag`) VALUES ('', '', '市场部', '', '');
INSERT INTO `sys_dept` (`id`, `parent_id`, `name`, `order_num`, `del_flag`) VALUES ('', '', '牧尘集团', '', '');
INSERT INTO `sys_dept` (`id`, `parent_id`, `name`, `order_num`, `del_flag`) VALUES ('', '', '北京分公司', '', '');
INSERT INTO `sys_dept` (`id`, `parent_id`, `name`, `order_num`, `del_flag`) VALUES ('', '', '上海分公司', '', '');
INSERT INTO `sys_dept` (`id`, `parent_id`, `name`, `order_num`, `del_flag`) VALUES ('', '', '技术部', '', '');
INSERT INTO `sys_dept` (`id`, `parent_id`, `name`, `order_num`, `del_flag`) VALUES ('', '', '宣传部', '', '');
INSERT INTO `sys_dept` (`id`, `parent_id`, `name`, `order_num`, `del_flag`) VALUES ('', '', '销售部', '', '');
INSERT INTO `sys_dept` (`id`, `parent_id`, `name`, `order_num`, `del_flag`) VALUES ('', '', '市场部', '', '');
-- --------------------------------------
-- Records of `sys_menu`
-- --------------------------------------
INSERT INTO `sys_menu` (`id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) VALUES ('', '', '系统管理', NULL, NULL, '', 'fa el-icon-setting', '');
INSERT INTO `sys_menu` (`id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) VALUES ('', '', '用户管理', '/sys/user', NULL, '', 'el-icon-service', '');
INSERT INTO `sys_menu` (`id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) VALUES ('', '', '机构管理', '/sys/dept', NULL, '', 'el-icon-news', '');
INSERT INTO `sys_menu` (`id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) VALUES ('', '', '角色管理', '/sys/role', NULL, '', 'el-icon-view', '');
INSERT INTO `sys_menu` (`id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) VALUES ('', '', '菜单管理', '/sys/menu', NULL, '', 'el-icon-menu', '');
INSERT INTO `sys_menu` (`id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) VALUES ('', '', 'SQL监控', '/druid/sql', NULL, '', 'el-icon-info', '');
INSERT INTO `sys_menu` (`id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) VALUES ('', '', '系统日志', '/sys/log', 'sys:log:view', '', 'el-icon-info', '');
INSERT INTO `sys_menu` (`id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) VALUES ('', '', '查看', NULL, 'sys:user:view', '', NULL, '');
INSERT INTO `sys_menu` (`id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) VALUES ('', '', '新增', NULL, 'sys:user:add', '', NULL, '');
INSERT INTO `sys_menu` (`id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) VALUES ('', '', '修改', NULL, 'sys:user:edit', '', NULL, '');
INSERT INTO `sys_menu` (`id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) VALUES ('', '', '删除', NULL, 'sys:user:delete', '', NULL, '');
INSERT INTO `sys_menu` (`id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) VALUES ('', '', '查看', NULL, 'sys:dept:view', '', NULL, '');
INSERT INTO `sys_menu` (`id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) VALUES ('', '', '新增', NULL, 'sys:dept:add', '', NULL, '');
INSERT INTO `sys_menu` (`id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) VALUES ('', '', '修改', NULL, 'sys:dept:edit', '', NULL, '');
INSERT INTO `sys_menu` (`id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) VALUES ('', '', '删除', NULL, 'sys:dept:delete', '', NULL, '');
INSERT INTO `sys_menu` (`id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) VALUES ('', '', '查看', NULL, 'sys:role:view', '', NULL, '');
INSERT INTO `sys_menu` (`id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) VALUES ('', '', '新增', NULL, 'sys:role:add', '', NULL, '');
INSERT INTO `sys_menu` (`id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) VALUES ('', '', '修改', NULL, 'sys:role:edit', '', NULL, '');
INSERT INTO `sys_menu` (`id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) VALUES ('', '', '删除', NULL, 'sys:role:delete', '', NULL, '');
INSERT INTO `sys_menu` (`id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) VALUES ('', '', '查看', NULL, 'sys:menu:view', '', NULL, '');
INSERT INTO `sys_menu` (`id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) VALUES ('', '', '新增', NULL, 'sys:menu:add', '', NULL, '');
INSERT INTO `sys_menu` (`id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) VALUES ('', '', '修改', NULL, 'sys:menu:edit', '', NULL, '');
INSERT INTO `sys_menu` (`id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) VALUES ('', '', '删除', NULL, 'sys:menu:delete', '', NULL, '');
INSERT INTO `sys_menu` (`id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) VALUES ('', '', '内容管理', NULL, NULL, '', 'el-icon-document', '');
INSERT INTO `sys_menu` (`id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) VALUES ('', '', '栏目管理', '/content/category', NULL, '', 'el-icon-tickets', '');
INSERT INTO `sys_menu` (`id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) VALUES ('', '', '文章管理', '/content/artical', NULL, '', 'el-icon-tickets', '');
INSERT INTO `sys_menu` (`id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) VALUES ('', '', '使用案例', NULL, NULL, '', 'el-icon-picture-outline', '');
INSERT INTO `sys_menu` (`id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) VALUES ('', '', '国际化', '/demo/i18n', NULL, '', 'el-icon-edit', '');
INSERT INTO `sys_menu` (`id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) VALUES ('', '', '换皮肤', '/demo/theme', NULL, '', 'el-icon-picture', '');
-- --------------------------------------
-- Records of `sys_role_menu`
-- --------------------------------------
INSERT INTO `sys_role_menu` (`id`, `role_id`, `menu_id`) VALUES ('', '', '');
INSERT INTO `sys_role_menu` (`id`, `role_id`, `menu_id`) VALUES ('', '', '');
INSERT INTO `sys_role_menu` (`id`, `role_id`, `menu_id`) VALUES ('', '', '');
INSERT INTO `sys_role_menu` (`id`, `role_id`, `menu_id`) VALUES ('', '', '');
INSERT INTO `sys_role_menu` (`id`, `role_id`, `menu_id`) VALUES ('', '', '');
INSERT INTO `sys_role_menu` (`id`, `role_id`, `menu_id`) VALUES ('', '', '');
INSERT INTO `sys_role_menu` (`id`, `role_id`, `menu_id`) VALUES ('', '', '');
INSERT INTO `sys_role_menu` (`id`, `role_id`, `menu_id`) VALUES ('', '', '');
INSERT INTO `sys_role_menu` (`id`, `role_id`, `menu_id`) VALUES ('', '', '');
INSERT INTO `sys_role_menu` (`id`, `role_id`, `menu_id`) VALUES ('', '', '');
INSERT INTO `sys_role_menu` (`id`, `role_id`, `menu_id`) VALUES ('', '', '');
INSERT INTO `sys_role_menu` (`id`, `role_id`, `menu_id`) VALUES ('', '', ''); -- --------------------------------------
-- Records of `sys_dict`
-- --------------------------------------
INSERT INTO `sys_dict` (`id`, `value`, `label`, `type`, `description`, `sort`) VALUES ('', 'male', '男', 'sex', '男性', '');
INSERT INTO `sys_dict` (`id`, `value`, `label`, `type`, `description`, `sort`) VALUES ('', 'female', '女', 'sex', '女性', '');
源码下载
后端:https://gitee.com/liuge1988/kitty
前端:https://gitee.com/liuge1988/kitty-ui.git
作者:朝雨忆轻尘
出处:https://www.cnblogs.com/xifengxiaoma/
版权所有,欢迎转载,转载请注明原文作者及出处。