statistics.sql 10.9 KB
/*
 Navicat Premium Data Transfer

 Source Server         : localhost
 Source Server Type    : MySQL
 Source Server Version : 50626
 Source Host           : localhost
 Source Database       : statistics

 Target Server Type    : MySQL
 Target Server Version : 50626
 File Encoding         : utf-8

 Date: 04/15/2019 18:28:08 PM
*/

SET NAMES utf8;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
--  Table structure for `AssociatedParty`
-- ----------------------------
DROP TABLE IF EXISTS `AssociatedParty`;
CREATE TABLE `AssociatedParty` (
  `PrimaryID` varchar(255) DEFAULT NULL,
  `Name` varchar(255) DEFAULT NULL,
  `AccountID` varchar(255) DEFAULT NULL,
  `RoleCode` varchar(255) DEFAULT NULL,
  `Role` varchar(255) DEFAULT NULL,
  `CityName` varchar(255) DEFAULT NULL,
  `CountryID` varchar(255) DEFAULT NULL,
  `AWBNumber` varchar(255) NOT NULL,
  `FlightDate` datetime DEFAULT NULL,
  `FlightNumber` varchar(255) DEFAULT NULL,
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `DefinedTradeContact` varchar(255) DEFAULT NULL,
  `SpecifiedCargoAgentLocation` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
--  Table structure for `attachment`
-- ----------------------------
DROP TABLE IF EXISTS `attachment`;
CREATE TABLE `attachment` (
  `aid` int(11) NOT NULL AUTO_INCREMENT,
  `path` varchar(255) NOT NULL,
  PRIMARY KEY (`aid`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COMMENT='附件表';

-- ----------------------------
--  Records of `attachment`
-- ----------------------------
BEGIN;
INSERT INTO `attachment` VALUES ('1', 'upload/2019-04-02/607656451997404cabe403342847ff40.png'), ('2', 'upload/2019-04-02/55d0cf3718984dac98323a867c99f03a.png'), ('3', 'upload/2019-04-02/a3e26c0220d04454b0725c3d349fd891.png'), ('4', 'upload/2019-04-02/65b32115b204480dbd7c5fd79cd5beed.png'), ('5', 'upload/2019-04-03/9ec801d1f68c4958addb75ce2a3892f8.png'), ('6', 'upload/2019-04-03/2fd82710279e4517b59084d3ac1f96ac.png');
COMMIT;

-- ----------------------------
--  Table structure for `log`
-- ----------------------------
DROP TABLE IF EXISTS `log`;
CREATE TABLE `log` (
  `logId` int(11) NOT NULL AUTO_INCREMENT,
  `userName` varchar(255) NOT NULL,
  `ip` varchar(255) DEFAULT NULL,
  `logCreatTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `methodName` varchar(255) DEFAULT NULL COMMENT '方法名称',
  `parameters` longtext,
  `modelNameCN` varchar(255) NOT NULL COMMENT '模块名称中文描述',
  `operateNameCN` varchar(255) NOT NULL COMMENT '操作方法的中文描述,给前端查询看方便点',
  `className` varchar(255) DEFAULT NULL COMMENT '类名',
  `result` longtext COMMENT '执行结果',
  PRIMARY KEY (`logId`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `log`
-- ----------------------------
BEGIN;
INSERT INTO `log` VALUES ('9', 'admin', '127.0.0.1', '2019-03-25 23:43:41', 'addUser', '[{\"accountNonExpired\":true,\"accountNonLocked\":true,\"address\":\"地址\",\"age\":1,\"authorities\":[],\"credentialsNonExpired\":true,\"email\":\"17966059@qq.com\",\"enabled\":true,\"mobilephone\":\"18903528969\",\"password\":\"newuser\",\"permissions\":null,\"realname\":\"真实姓名\",\"roles\":null,\"sex\":\"1\",\"username\":\"newuser\"}]', '用户管理', '用户添加', 'com.tianbo.warehouse.controller.UserController', '{\"code\":\"200\",\"data\":\"\",\"msg\":\"新建账户成功\"}');
COMMIT;

-- ----------------------------
--  Table structure for `permission`
-- ----------------------------
DROP TABLE IF EXISTS `permission`;
CREATE TABLE `permission` (
  `permission_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL COMMENT '权限名称',
  `path` varchar(255) DEFAULT NULL COMMENT '访问主路径,对应前端vue router的path',
  `url` varchar(255) NOT NULL COMMENT '具体访问路径',
  `parent_id` int(11) DEFAULT '0' COMMENT '父目录ID',
  `permission_order` varchar(255) NOT NULL DEFAULT '1' COMMENT '栏目排序,为0代表跟目录\n',
  `description` varchar(255) DEFAULT '',
  `ismenu` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否是menu,默认否',
  `method` varchar(255) DEFAULT NULL COMMENT 'METHOD',
  `iconCls` varchar(255) DEFAULT NULL COMMENT '栏目图标',
  `component` varchar(255) DEFAULT NULL COMMENT '对应前端vue router的component字段\n绑定前端模板文件配置\nismenu=true时需要绑定',
  `hidden` tinyint(1) COMMENT '前端是否隐藏,默认false',
  PRIMARY KEY (`permission_id`),
  KEY `permName_index` (`name`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8 COMMENT='权限及menu表';

-- ----------------------------
--  Records of `permission`
-- ----------------------------
BEGIN;
INSERT INTO `permission` VALUES ('1', '用户新增', '/user', '/user/add', '6', '1', '增加用户', '0', 'post', null, null, null), ('2', '用户列表查询', '/user', '/user/list', '6', '2', '查询用户', '0', 'get', null, null, null), ('3', '用户编辑', '/user', '/user/update', '6', '3', '编辑用户', '0', 'put', null, null, null), ('4', '用户删除', '/user', '/user/del', '6', '4', '删除用户', '0', 'delete', null, null, null), ('5', '用户查询', '/user', '/user/find', '6', '5', '查询用户', '0', 'get', null, null, null), ('6', '用户管理', '/user', '/user/**', '14', '1', '用户管理二级菜单', '1', '*\n', null, 'User', null), ('10', '角色管理', '/role', '/role/**', '14', '2', '角色管理二级菜单', '1', '*', null, 'Role', null), ('11', '权限管理', '/perm', '/perm/**', '14', '3', '权限管理二级菜单', '1', '*', null, 'Perm', null), ('12', '首页', '/main', '/main/**', '13', '1', '管理系统首页', '1', '*', '', 'Main', null), ('13', '主页', '/', '/', '0', '0', '管理系统主页', '1', '*', 'el-icon-menu', 'Home', null), ('14', '系统设置', '/user', '/user', '0', '0\n', '管理系统主页', '1', '*', 'el-icon-setting', 'Home', null), ('17', '系统日志', '/system/log', '/system/log/list', '14', '4', '系统总日志查看', '1', 'get', null, null, null);
COMMIT;

-- ----------------------------
--  Table structure for `role`
-- ----------------------------
DROP TABLE IF EXISTS `role`;
CREATE TABLE `role` (
  `role_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `role_name` varchar(255) NOT NULL COMMENT '角色名称',
  `role_sign` varchar(255) DEFAULT '' COMMENT '角色编码',
  `description` varchar(255) DEFAULT '' COMMENT '角色描述',
  PRIMARY KEY (`role_id`)
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `role`
-- ----------------------------
BEGIN;
INSERT INTO `role` VALUES ('1', 'ROLE_admin', '1', '超级管理员\n'), ('2', 'ROLE_devloper', '2', '开发者'), ('14', 'ROLE_userManager', '3', '用户管理员'), ('15', 'ROLE_ANONYMOUS', '4\n', '匿名用户'), ('16', 'ROLE_waybillMaster', '4', '运单管理');
COMMIT;

-- ----------------------------
--  Table structure for `role_permission`
-- ----------------------------
DROP TABLE IF EXISTS `role_permission`;
CREATE TABLE `role_permission` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `role_id` int(11) NOT NULL,
  `permission_id` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=64 DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `role_permission`
-- ----------------------------
BEGIN;
INSERT INTO `role_permission` VALUES ('24', '2', '1'), ('25', '2', '2'), ('26', '2', '3'), ('27', '2', '4'), ('28', '2', '5'), ('29', '2', '6'), ('30', '2', '7'), ('31', '2', '8'), ('48', '14', '4'), ('49', '14', '1'), ('50', '14', '5'), ('51', '14', '6'), ('52', '14', '2'), ('53', '14', '3'), ('54', '14', '17'), ('55', '1', '4'), ('56', '1', '3'), ('57', '1', '13'), ('58', '1', '11'), ('59', '1', '6'), ('60', '1', '14'), ('61', '1', '10'), ('62', '1', '12'), ('63', '1', '17');
COMMIT;

-- ----------------------------
--  Table structure for `user_role`
-- ----------------------------
DROP TABLE IF EXISTS `user_role`;
CREATE TABLE `user_role` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `role_id` int(11) NOT NULL,
  PRIMARY KEY (`id`,`user_id`,`role_id`),
  KEY `user_id` (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `user_role`
-- ----------------------------
BEGIN;
INSERT INTO `user_role` VALUES ('1', '27', '1'), ('4', '28', '14'), ('9', '29', '1'), ('10', '29', '14'), ('11', '29', '16'), ('3', '31', '14'), ('2', '35', '1');
COMMIT;

-- ----------------------------
--  Table structure for `users`
-- ----------------------------
DROP TABLE IF EXISTS `users`;
CREATE TABLE `users` (
  `user_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `username` varchar(32) NOT NULL COMMENT '登录账号',
  `password` varchar(32) NOT NULL,
  `birthday` datetime DEFAULT NULL COMMENT '生日',
  `sex` char(1) DEFAULT NULL COMMENT '性别',
  `address` varchar(256) DEFAULT NULL COMMENT '地址',
  `state` bit(1) DEFAULT b'1' COMMENT '是否禁用',
  `mobilePhone` varchar(255) DEFAULT NULL,
  `creatTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updateTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `userFace` varchar(255) DEFAULT NULL COMMENT '头像地址',
  `realName` varchar(255) DEFAULT NULL COMMENT '真实姓名',
  `email` varchar(255) DEFAULT NULL COMMENT 'email',
  `age` int(11) DEFAULT NULL COMMENT '年龄',
  PRIMARY KEY (`user_id`),
  KEY `username_index` (`username`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=48 DEFAULT CHARSET=utf8 COMMENT='用户基本信息表\n';

-- ----------------------------
--  Records of `users`
-- ----------------------------
BEGIN;
INSERT INTO `users` VALUES ('27', 'mrz', 'e10adc3949ba59abbe56e057f20f883e', '2019-11-24 00:00:00', '1', '港区', b'1', '18903528969', '2017-10-16 11:00:00', '2017-10-16 23:12:12', null, '朱兆平', '17966059@qq.com', '0'), ('29', 'zp260', 'e10adc3949ba59abbe56e057f20f883e', '2019-11-24 00:00:00', '1', '山西大同', b'1', '18903528969', '2017-10-14 12:00:42', '2019-03-01 17:49:49', null, '朱兆平', null, '0'), ('33', 'pp', 'E10ADC3949BA59ABBE56E057F20F883E', null, '0', null, b'1', '18903528969', '2017-10-28 12:15:47', '2019-11-24 00:00:00', null, null, null, null), ('35', 'admin', 'e10adc3949ba59abbe56e057f20f883e', '2019-02-19 17:53:27', '1', null, b'1', '18903528969', '2019-02-19 17:53:35', '2019-03-02 17:04:57', '/static/images/faceDefault.jpg', null, null, null), ('45', 'zp26000000', '25f9e794323b453885f5181f1b624d0b', null, '1', '地址', b'1', '18903528969', '2019-03-24 18:51:35', '2019-03-24 18:51:35', null, '真实姓名', '17966059@qq.com', '1'), ('46', 'zp2505', 'ae5e744afdb8e712c051ded2a0229252', null, '1', '达到', b'1', '18903528969', '2019-03-24 18:59:57', '2019-03-24 18:59:57', null, '朱兆平', '179652@13.com', '36'), ('47', 'newuser', '0354d89c28ec399c00d3cb2d094cf093', null, '1', '地址', b'1', '18903528969', '2019-03-25 23:43:40', '2019-03-25 23:43:40', null, '真实姓名', '17966059@qq.com', '1');
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;