/*
 Navicat Premium Data Transfer

 Source Server         : 40.83.126.15mall
 Source Server Type    : MySQL
 Source Server Version : 50649
 Source Host           : 40.83.126.15:3306
 Source Schema         : mall

 Target Server Type    : MySQL
 Target Server Version : 50649
 File Encoding         : 65001

 Date: 04/12/2020 16:53:42
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for category
-- ----------------------------
DROP TABLE IF EXISTS `category`;
CREATE TABLE `category`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `pid` int(11) NULL DEFAULT NULL,
  `name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `details` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `onnav` int(1) NULL DEFAULT 0,
  `sort` int(2) NOT NULL DEFAULT 99,
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `pidpk`(`pid`) USING BTREE,
  CONSTRAINT `pidpk` FOREIGN KEY (`pid`) REFERENCES `category` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 13 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = COMPACT;

-- ----------------------------
-- Records of category
-- ----------------------------
INSERT INTO `category` VALUES (1, NULL, '/', '/', 0, 99);
INSERT INTO `category` VALUES (2, 1, '水果', '新鲜水果', 1, 2);
INSERT INTO `category` VALUES (3, 1, '手机', '二手手机', 1, 1);
INSERT INTO `category` VALUES (4, 2, '苹果', '乐山苹果', 1, 99);
INSERT INTO `category` VALUES (12, 1, '4545415', NULL, 5, 3);

-- ----------------------------
-- Table structure for identity
-- ----------------------------
DROP TABLE IF EXISTS `identity`;
CREATE TABLE `identity`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `identity` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `details` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = COMPACT;

-- ----------------------------
-- Records of identity
-- ----------------------------
INSERT INTO `identity` VALUES (1, '1', 'root');
INSERT INTO `identity` VALUES (2, '2', '快递员');
INSERT INTO `identity` VALUES (3, '3', '普通用户');

-- ----------------------------
-- Table structure for m_account
-- ----------------------------
DROP TABLE IF EXISTS `m_account`;
CREATE TABLE `m_account`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `phone` varchar(11) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `username` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `password` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `email` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `sex` int(1) NOT NULL,
  `birthday` date NULL DEFAULT NULL,
  `identity_id` int(11) NOT NULL,
  `registration_time` datetime(0) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = COMPACT;

-- ----------------------------
-- Records of m_account
-- ----------------------------
INSERT INTO `m_account` VALUES (1, '18283140142', 'clay', '123456789', '20932067@zju.edu.cn', 1, '2000-04-10', 1, '2020-12-03 17:23:11');
INSERT INTO `m_account` VALUES (2, '18283140141', '12354', '123456789', '收到', 1, NULL, 2, '2020-12-02 17:23:15');
INSERT INTO `m_account` VALUES (3, '18283140143', '你好呀', '123456789', '1829446465465649363@qq.com', 2, NULL, 3, '2020-12-02 05:56:51');
INSERT INTO `m_account` VALUES (4, '18283140145', '12354', '123456789', '收到', 1, NULL, 2, '2020-12-02 06:08:19');
INSERT INTO `m_account` VALUES (5, '18283140146', '12354', '123456', '4515@qq.com', 1, NULL, 3, '2020-12-02 06:09:59');

-- ----------------------------
-- Table structure for m_flats
-- ----------------------------
DROP TABLE IF EXISTS `m_flats`;
CREATE TABLE `m_flats`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `flats_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `desc` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 17 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = COMPACT;

-- ----------------------------
-- Records of m_flats
-- ----------------------------
INSERT INTO `m_flats` VALUES (1, '1栋', '测试');
INSERT INTO `m_flats` VALUES (2, '2栋', NULL);
INSERT INTO `m_flats` VALUES (3, '3栋', NULL);
INSERT INTO `m_flats` VALUES (4, '4栋', NULL);
INSERT INTO `m_flats` VALUES (5, '5栋', NULL);
INSERT INTO `m_flats` VALUES (6, '6栋', NULL);
INSERT INTO `m_flats` VALUES (7, '7栋', NULL);
INSERT INTO `m_flats` VALUES (8, '8栋', NULL);
INSERT INTO `m_flats` VALUES (9, '9栋', NULL);
INSERT INTO `m_flats` VALUES (10, '10栋', NULL);
INSERT INTO `m_flats` VALUES (11, '11栋', NULL);
INSERT INTO `m_flats` VALUES (12, '12栋', NULL);
INSERT INTO `m_flats` VALUES (13, '13栋', NULL);
INSERT INTO `m_flats` VALUES (14, '14栋', NULL);
INSERT INTO `m_flats` VALUES (15, '15栋', NULL);

-- ----------------------------
-- Table structure for m_order
-- ----------------------------
DROP TABLE IF EXISTS `m_order`;
CREATE TABLE `m_order`  (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `account_id` int(11) NOT NULL COMMENT '用户id',
  `courier_id` int(11) NULL DEFAULT 0 COMMENT '快递员id',
  `number` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '取单号',
  `company` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '快递公司',
  `name` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '姓名',
  `phone` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '手机号码',
  `flats_id` int(11) NOT NULL COMMENT '公寓id',
  `hostel` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '宿舍号',
  `create_time` datetime(0) NOT NULL COMMENT '创建时间',
  `last_time` datetime(0) NULL DEFAULT NULL COMMENT '最后一次操作时间',
  `status` int(1) NOT NULL COMMENT '状态1:待取件 2:运输 3:送到 4:收取 前端返回值为5->4 6->3 7->2 8->1',
  `type` int(1) NOT NULL COMMENT '大小件 1:大 2:中 3:小',
  `payment_status` int(1) NOT NULL COMMENT '支付状态 1:支付 2:未支付 3:支付失败',
  `decs` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注',
  `price` decimal(10, 2) UNSIGNED NOT NULL COMMENT '价格',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 45 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = COMPACT;

-- ----------------------------
-- Records of m_order
-- ----------------------------
INSERT INTO `m_order` VALUES (1, 3, NULL, '45454', '电脑', '你好', '18283140142', 1, '2322', '2020-12-02 13:17:46', '2020-12-02 13:17:46', 1, 1, 2, '你', 4.00);
INSERT INTO `m_order` VALUES (2, 3, NULL, '45454', '电脑', '你好', '18283140142', 1, '2322', '2020-12-02 13:19:40', '2020-12-02 13:19:40', 1, 1, 2, '你', 4.00);
INSERT INTO `m_order` VALUES (3, 3, NULL, '45454', '电脑', '你好', '18283140142', 1, '2322', '2020-12-02 13:19:41', '2020-12-02 13:19:41', 1, 1, 2, '你', 1.00);
INSERT INTO `m_order` VALUES (4, 3, NULL, '45454', '电脑', '你好', '18283140142', 1, '2322', '2020-12-02 13:19:42', '2020-12-02 13:19:42', 1, 1, 2, '你', 1.00);
INSERT INTO `m_order` VALUES (5, 3, NULL, '45454', '电脑', '你好', '18283140142', 1, '2322', '2020-12-02 13:19:43', '2020-12-02 13:19:43', 1, 1, 2, '你', 1.00);
INSERT INTO `m_order` VALUES (6, 3, NULL, '45454', '电脑', '你好', '18283140142', 1, '2322', '2020-12-02 13:19:44', '2020-12-02 13:19:44', 1, 1, 2, '你', 1.00);
INSERT INTO `m_order` VALUES (7, 3, 2, '45454', '电脑', '张开怀', '18283140142', 1, '2322', '2020-12-02 13:19:44', '2020-12-03 09:40:32', 3, 1, 2, '你', 1.00);
INSERT INTO `m_order` VALUES (8, 3, NULL, '45454', '电脑', '你好', '18283140142', 1, '2322', '2020-12-02 13:19:44', '2020-12-03 07:54:42', 2, 1, 2, '你', 1.00);
INSERT INTO `m_order` VALUES (9, 3, NULL, '45454', '电脑', '你好', '18283140142', 1, '2322', '2020-12-02 13:19:45', '2020-12-02 13:19:45', 2, 1, 2, '你', 1.00);
INSERT INTO `m_order` VALUES (10, 3, NULL, '45454', '电脑', '你好', '18283140142', 1, '2322', '2020-12-02 13:19:45', '2020-12-02 13:19:45', 1, 1, 2, '你', 1.00);
INSERT INTO `m_order` VALUES (11, 3, NULL, '45454', '电脑', '你好', '18283140142', 1, '2322', '2020-12-02 13:19:45', '2020-12-02 13:19:45', 1, 1, 2, '你', 1.00);
INSERT INTO `m_order` VALUES (12, 3, NULL, '45454', '电脑', '你好', '18283140142', 1, '2322', '2020-12-02 13:19:45', '2020-12-02 13:19:45', 1, 1, 2, '你', 1.00);
INSERT INTO `m_order` VALUES (13, 3, NULL, '45454', '电脑', '你好', '18283140142', 1, '2322', '2020-12-02 13:19:45', '2020-12-02 13:19:45', 1, 1, 2, '你', 1.00);
INSERT INTO `m_order` VALUES (14, 3, NULL, '45454', '电脑', '你好', '18283140142', 1, '2322', '2020-12-02 13:19:45', '2020-12-02 13:19:45', 1, 1, 2, '你', 1.00);
INSERT INTO `m_order` VALUES (15, 3, 0, '45454', '电脑', '你好', '18283140142', 1, '2322', '2020-12-02 13:19:46', '2020-12-02 13:19:46', 1, 1, 2, '你', 1.00);
INSERT INTO `m_order` VALUES (16, 3, NULL, '45454', '电脑', '你好', '18283140142', 1, '2322', '2020-12-02 13:19:46', '2020-12-02 13:19:46', 1, 1, 2, '你', 1.00);
INSERT INTO `m_order` VALUES (17, 3, NULL, '45454', '电脑', '你好', '18283140142', 1, '2322', '2020-12-02 13:19:46', '2020-12-02 13:19:46', 1, 1, 2, '你', 1.00);
INSERT INTO `m_order` VALUES (18, 3, NULL, '45454', '电脑', '你好', '18283140142', 1, '2322', '2020-12-02 13:19:46', '2020-12-02 13:19:46', 1, 1, 2, '你', 1.00);
INSERT INTO `m_order` VALUES (19, 3, NULL, '45454', '电脑', '你好', '18283140142', 1, '2322', '2020-12-02 13:19:46', '2020-12-02 13:19:46', 1, 1, 2, '你', 1.00);
INSERT INTO `m_order` VALUES (20, 3, NULL, '45454', '电脑', '你好', '18283140142', 1, '2322', '2020-12-02 13:19:47', '2020-12-02 13:19:47', 1, 1, 2, '你', 1.00);
INSERT INTO `m_order` VALUES (21, 3, NULL, '45454', '电脑', '你好', '18283140142', 1, '2322', '2020-12-02 13:19:47', '2020-12-02 13:19:47', 1, 1, 2, '你', 1.00);
INSERT INTO `m_order` VALUES (22, 3, NULL, '45454', '电脑', '你好', '18283140142', 1, '2322', '2020-12-02 13:19:47', '2020-12-02 13:19:47', 1, 1, 2, '你', 1.00);
INSERT INTO `m_order` VALUES (23, 3, NULL, '45454', '电脑', '你好', '18283140142', 1, '2322', '2020-12-02 13:19:47', '2020-12-02 13:19:47', 1, 1, 2, '你', 1.00);
INSERT INTO `m_order` VALUES (24, 3, NULL, '45454', '电脑', '你好', '18283140142', 1, '2322', '2020-12-02 13:19:47', '2020-12-02 13:19:47', 1, 1, 2, '你', 1.00);
INSERT INTO `m_order` VALUES (25, 3, NULL, '45454', '电脑', '你好', '18283140142', 1, '2322', '2020-12-02 13:19:48', '2020-12-02 13:19:48', 1, 1, 2, '你', 1.00);
INSERT INTO `m_order` VALUES (26, 3, NULL, '45454', '电脑', '你好', '18283140142', 1, '2322', '2020-12-02 13:19:48', '2020-12-02 13:19:48', 1, 1, 2, '你', 1.00);
INSERT INTO `m_order` VALUES (27, 3, NULL, '45454', '电脑', '你好', '18283140142', 1, '2322', '2020-12-02 13:19:48', '2020-12-02 13:19:48', 1, 1, 2, '你', 1.00);
INSERT INTO `m_order` VALUES (28, 3, NULL, '45454', '电脑', '你好', '18283140142', 1, '2322', '2020-12-02 13:19:48', '2020-12-02 13:19:48', 1, 1, 2, '你', 1.00);
INSERT INTO `m_order` VALUES (29, 3, NULL, '45454', '电脑', '你好', '18283140142', 1, '2322', '2020-12-02 13:19:48', '2020-12-02 13:19:48', 1, 1, 2, '你', 1.00);
INSERT INTO `m_order` VALUES (30, 3, NULL, '45454', '电脑', '你好', '18283140142', 1, '2322', '2020-12-02 13:19:49', '2020-12-02 13:19:49', 1, 1, 2, '你', 1.00);
INSERT INTO `m_order` VALUES (31, 3, NULL, '45454', '电脑', '你好', '18283140142', 1, '2322', '2020-12-02 13:19:49', '2020-12-02 13:19:49', 1, 1, 2, '你', 1.00);
INSERT INTO `m_order` VALUES (32, 3, NULL, '45454', '电脑', '你好', '18283140142', 1, '2322', '2020-12-02 13:19:49', '2020-12-02 13:19:49', 1, 1, 2, '你', 1.00);
INSERT INTO `m_order` VALUES (33, 3, NULL, '45454', '电脑', '你好', '18283140142', 1, '2322', '2020-12-02 13:19:49', '2020-12-02 13:19:49', 1, 1, 2, '你', 1.00);
INSERT INTO `m_order` VALUES (34, 3, NULL, '45454', '电脑', '你好', '18283140142', 1, '2322', '2020-12-02 13:19:49', '2020-12-02 13:19:49', 1, 1, 2, '你', 1.00);
INSERT INTO `m_order` VALUES (35, 3, NULL, '45454', '电脑', '你好', '18283140142', 1, '2322', '2020-12-02 13:19:49', '2020-12-02 13:19:49', 1, 1, 2, '你', 1.00);
INSERT INTO `m_order` VALUES (36, 3, NULL, '45454', '电脑', '你好', '18283140142', 1, '2322', '2020-12-02 13:19:50', '2020-12-02 13:19:50', 1, 1, 2, '你', 1.00);
INSERT INTO `m_order` VALUES (37, 3, NULL, '45454', '电脑', '你好', '18283140142', 1, '2322', '2020-12-02 13:19:50', '2020-12-02 13:19:50', 1, 1, 2, '你', 1.00);
INSERT INTO `m_order` VALUES (38, 3, NULL, '45454', '电脑', '你好', '18283140142', 1, '2322', '2020-12-02 13:19:50', '2020-12-02 13:19:50', 1, 1, 2, '你', 1.00);
INSERT INTO `m_order` VALUES (39, 3, NULL, '45454', '电脑', '你好', '18283140142', 1, '2322', '2020-12-02 13:19:50', '2020-12-02 13:19:50', 1, 1, 2, '你', 1.00);
INSERT INTO `m_order` VALUES (40, 3, NULL, '45454', '电脑', '你好', '18283140142', 1, '2322', '2020-12-02 13:19:50', '2020-12-02 13:19:50', 1, 1, 2, '你', 1.00);
INSERT INTO `m_order` VALUES (41, 3, NULL, '45454', '电脑', '你好', '18283140142', 1, '2322', '2020-12-02 13:20:00', '2020-12-02 13:20:00', 1, 1, 2, '你', 1.00);
INSERT INTO `m_order` VALUES (42, 3, NULL, '45454', '电脑', '你好', '18283140142', 12, '2322', '2020-12-03 05:53:10', '2020-12-03 05:53:10', 1, 1, 2, '你', 1.00);
INSERT INTO `m_order` VALUES (43, 4, NULL, '1215454', '顺丰快递', '张三', '15682132183', 1, NULL, '2020-12-03 14:03:58', '2020-12-03 14:03:58', 1, 1, 2, '放在楼下', 1.00);
INSERT INTO `m_order` VALUES (44, 2, NULL, '45454', '顺丰快递', '张开怀', '18283140149', 1, '2322', '2020-12-04 05:26:23', '2020-12-04 05:26:23', 1, 1, 2, '你', 5.00);

-- ----------------------------
-- Table structure for m_price
-- ----------------------------
DROP TABLE IF EXISTS `m_price`;
CREATE TABLE `m_price`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `price` decimal(10, 2) NULL DEFAULT NULL,
  `desc` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = COMPACT;

-- ----------------------------
-- Records of m_price
-- ----------------------------
INSERT INTO `m_price` VALUES (1, 5.00, '大件');
INSERT INTO `m_price` VALUES (2, 3.00, '中件');
INSERT INTO `m_price` VALUES (3, 2.00, '小件');

SET FOREIGN_KEY_CHECKS = 1;
