1 Star 0 Fork 1

laozudamo/Delivery-Web

forked from super皮皮/Delivery-Web 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
delivery.sql 11.99 KB
一键复制 编辑 原始数据 按行查看 历史
super皮皮 提交于 2023-12-08 09:31 . 数据库文件
-- MySQL dump 10.13 Distrib 8.0.35, for Linux (x86_64)
--
-- Host: localhost Database: delivery
-- ------------------------------------------------------
-- Server version 8.0.35-0ubuntu0.20.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!50503 SET NAMES utf8mb4 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `address`
--
DROP TABLE IF EXISTS `address`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `address` (
`id` bigint NOT NULL AUTO_INCREMENT,
`name` varchar(64) NOT NULL COMMENT '名称',
`network_id` bigint NOT NULL COMMENT '网点id',
`address` varchar(100) DEFAULT NULL COMMENT '详细地址',
`phone` varchar(11) NOT NULL DEFAULT '' COMMENT '手机号',
`email` varchar(255) NOT NULL COMMENT '邮箱',
`customer_id` bigint NOT NULL COMMENT '顾客',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='地址表';
/*!40101 SET character_set_client = @saved_cs_client */;
-- Table structure for table `area`
--
DROP TABLE IF EXISTS `area`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `area` (
`id` bigint NOT NULL AUTO_INCREMENT,
`name` varchar(64) NOT NULL COMMENT '名称',
`city_id` bigint NOT NULL COMMENT '所属市id',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='地区表';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `city`
--
DROP TABLE IF EXISTS `city`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `city` (
`id` bigint NOT NULL AUTO_INCREMENT,
`name` varchar(64) NOT NULL COMMENT '名称',
`province_id` bigint NOT NULL COMMENT '所属省id',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='市表';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `courier`
--
DROP TABLE IF EXISTS `courier`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `courier` (
`id` bigint NOT NULL AUTO_INCREMENT,
`courier_id` varchar(255) NOT NULL COMMENT '快递单号',
`sender` bigint NOT NULL COMMENT '寄件人',
`receiver` bigint NOT NULL COMMENT '收件人',
`type` int NOT NULL COMMENT '类型 0-书籍 1-衣物',
`weight` double NOT NULL DEFAULT '0' COMMENT '重量',
`price` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '价格',
`status` int NOT NULL COMMENT '状态 0-待揽件 1-已揽件 2-已发货 3-运输中 4-派送中 5-待取件 6-已签收 -1-丢失 -2-已取消 -3-取件失败',
`create_time` datetime NOT NULL COMMENT '寄件时间',
`logistics` bigint DEFAULT NULL COMMENT '物流状态(节点)',
`urgency` int NOT NULL COMMENT '紧急程度 0-标快 1-特快',
`end_time` datetime DEFAULT NULL COMMENT '签收时间',
PRIMARY KEY (`id`),
UNIQUE KEY `courier_id` (`courier_id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='快递';
/*!40101 SET character_set_client = @saved_cs_client */;
-- Table structure for table `courier_address`
--
DROP TABLE IF EXISTS `courier_address`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `courier_address` (
`id` bigint NOT NULL AUTO_INCREMENT,
`user_name` varchar(64) NOT NULL COMMENT '用户名',
`network_id` bigint NOT NULL COMMENT '网点id',
`address` varchar(255) NOT NULL COMMENT '用户地址',
`phone` varchar(11) NOT NULL COMMENT '手机号',
`email` varchar(255) NOT NULL COMMENT '邮箱',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='快递地址';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `courier_delivery`
--
DROP TABLE IF EXISTS `courier_delivery`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `courier_delivery` (
`id` bigint NOT NULL AUTO_INCREMENT,
`courier_id` varchar(255) NOT NULL COMMENT '快递单号',
`delivery_man_id` bigint NOT NULL COMMENT '快递员id',
`dest_network` bigint DEFAULT NULL COMMENT '目的网点',
`create_time` datetime NOT NULL COMMENT '开始派送时间',
`end_time` datetime DEFAULT NULL COMMENT '完成派送时间',
`status` int NOT NULL COMMENT '派送状态:0-未完成 1-完成',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='快递派送';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `courier_price`
--
DROP TABLE IF EXISTS `courier_price`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `courier_price` (
`id` bigint NOT NULL AUTO_INCREMENT,
`type` int NOT NULL COMMENT '类型 0-书籍 1-衣物',
`price` decimal(10,2) NOT NULL COMMENT '价格',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='快递单价';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `customer`
--
DROP TABLE IF EXISTS `customer`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `customer` (
`id` bigint NOT NULL AUTO_INCREMENT,
`email` varchar(255) NOT NULL COMMENT '邮箱',
`password` varchar(64) NOT NULL COMMENT '密码,md5加密',
`name` varchar(64) DEFAULT NULL COMMENT '姓名',
`sex` tinyint DEFAULT '-1' COMMENT '性别,-1=保密,0=男,1=女,2=其他',
`birth` date DEFAULT NULL COMMENT '出生年月,2020-01-01',
`phone` varchar(11) NOT NULL DEFAULT '' COMMENT '手机号',
`image_url` text COMMENT '用户人脸图片URL,多张人脸用逗号分隔',
`status` tinyint NOT NULL DEFAULT '0' COMMENT '状态,0=禁用,1=正常,-1=删除',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`id`),
UNIQUE KEY `email` (`email`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='顾客表';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `logistics`
--
DROP TABLE IF EXISTS `logistics`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `logistics` (
`id` bigint NOT NULL AUTO_INCREMENT,
`pid` bigint DEFAULT NULL COMMENT '上级物流节点号',
`network_id` bigint DEFAULT NULL COMMENT '网点id',
`create_time` datetime NOT NULL COMMENT '到达网点时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='物流链';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `network`
--
DROP TABLE IF EXISTS `network`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `network` (
`id` bigint NOT NULL AUTO_INCREMENT,
`name` varchar(64) NOT NULL COMMENT '名称',
`area_id` bigint NOT NULL COMMENT '地区id',
`address` varchar(255) NOT NULL DEFAULT '' COMMENT '详细地址',
`desc` varchar(255) NOT NULL DEFAULT '' COMMENT '备注',
`status` tinyint NOT NULL DEFAULT '0' COMMENT '状态,1=营业,0=不营业,-1=已倒闭',
`create_time` datetime NOT NULL COMMENT '创建时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='网点表';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `network_apply`
--
DROP TABLE IF EXISTS `network_apply`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `network_apply` (
`id` bigint NOT NULL AUTO_INCREMENT,
`pid` bigint DEFAULT NULL COMMENT '上级网点',
`name` varchar(64) NOT NULL COMMENT '名称',
`area_id` bigint NOT NULL COMMENT '地区id',
`address` varchar(255) NOT NULL DEFAULT '' COMMENT '详细地址',
`desc` varchar(255) NOT NULL DEFAULT '' COMMENT '备注',
`applicant_id` bigint NOT NULL COMMENT '申请人id',
`reviewer_id` bigint DEFAULT NULL COMMENT '审核人id',
`status` tinyint NOT NULL DEFAULT '0' COMMENT '状态,-1-未通过 0-审核中 1-已通过',
`create_time` datetime NOT NULL COMMENT '创建时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='网点申请记录表';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `network_day`
--
DROP TABLE IF EXISTS `network_day`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `network_day` (
`id` bigint NOT NULL AUTO_INCREMENT,
`network1` bigint NOT NULL COMMENT '网点1',
`network2` bigint NOT NULL COMMENT '网点2',
`day` int NOT NULL COMMENT '需要天数',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='网点天数表';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `province`
--
DROP TABLE IF EXISTS `province`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `province` (
`id` bigint NOT NULL AUTO_INCREMENT,
`name` varchar(64) NOT NULL COMMENT '名称',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='省表';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `sys_user`
--
DROP TABLE IF EXISTS `sys_user`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sys_user` (
`id` bigint NOT NULL AUTO_INCREMENT,
`email` varchar(255) NOT NULL COMMENT '邮箱',
`password` varchar(64) NOT NULL COMMENT '密码,md5加密',
`name` varchar(64) DEFAULT NULL COMMENT '姓名',
`sex` tinyint NOT NULL DEFAULT '-1' COMMENT '性别,-1=保密,0=男,1=女,2=其他',
`birth` date DEFAULT NULL COMMENT '出生年月,2020-01-01',
`phone` varchar(11) NOT NULL DEFAULT '' COMMENT '手机号',
`address` varchar(255) NOT NULL DEFAULT '' COMMENT '家庭住址',
`image_url` text COMMENT '用户人脸图片URL,多张人脸用逗号分隔',
`type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '3=超级管理员,2=网点管理员,1=快递员',
`status` tinyint NOT NULL DEFAULT '0' COMMENT '状态,1=正常,0=禁用,-1=删除',
`network_id` bigint NOT NULL DEFAULT '0' COMMENT '网点id',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
`ding_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '钉钉id',
PRIMARY KEY (`id`),
UNIQUE KEY `email` (`email`),
KEY `sys_user_ding_id_index` (`ding_id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='用户表';
/*!40101 SET character_set_client = @saved_cs_client */;
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/laozudamo/Delivery-Web.git
git@gitee.com:laozudamo/Delivery-Web.git
laozudamo
Delivery-Web
Delivery-Web
master

搜索帮助