|
@@ -0,0 +1,113 @@
|
|
|
|
+/*
|
|
|
|
+SQLyog Ultimate v11.25 (64 bit)
|
|
|
|
+MySQL - 5.7.31 : Database - pig
|
|
|
|
+*********************************************************************
|
|
|
|
+*/
|
|
|
|
+
|
|
|
|
+/*!40101 SET NAMES utf8 */;
|
|
|
|
+
|
|
|
|
+/*!40101 SET SQL_MODE=''*/;
|
|
|
|
+
|
|
|
|
+/*!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 */;
|
|
|
|
+CREATE DATABASE /*!32312 IF NOT EXISTS*/`pig` /*!40100 DEFAULT CHARACTER SET utf8 */;
|
|
|
|
+
|
|
|
|
+USE `pig`;
|
|
|
|
+
|
|
|
|
+/*Table structure for table `pi_p_code` */
|
|
|
|
+
|
|
|
|
+DROP TABLE IF EXISTS `pi_p_code`;
|
|
|
|
+
|
|
|
|
+CREATE TABLE `pi_p_code` (
|
|
|
|
+ `id` int(10) NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
|
|
|
+ `admin_id` int(10) NOT NULL,
|
|
|
|
+ `orderid` varchar(255) DEFAULT '' COMMENT '订单id',
|
|
|
|
+ `content` varchar(512) DEFAULT '' COMMENT '详情',
|
|
|
|
+ `createtime` int(11) DEFAULT NULL COMMENT '创建时间',
|
|
|
|
+ `updatetime` int(11) DEFAULT NULL COMMENT '更新时间',
|
|
|
|
+ `deletetime` int(11) DEFAULT NULL COMMENT '删除时间',
|
|
|
|
+ `status` enum('1','2','3') DEFAULT '1' COMMENT '状态:1=备货,2=发货,3=其他',
|
|
|
|
+ PRIMARY KEY (`id`)
|
|
|
|
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='溯源码';
|
|
|
|
+
|
|
|
|
+/*Table structure for table `pi_p_code_order` */
|
|
|
|
+
|
|
|
|
+DROP TABLE IF EXISTS `pi_p_code_order`;
|
|
|
|
+
|
|
|
|
+CREATE TABLE `pi_p_code_order` (
|
|
|
|
+ `id` int(10) NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
|
|
|
+ `admin_id` int(10) NOT NULL COMMENT '管理员ID',
|
|
|
|
+ `orderid` varchar(255) DEFAULT '' COMMENT '订单id',
|
|
|
|
+ `num` int(10) DEFAULT '1' COMMENT '码个数',
|
|
|
|
+ `createtime` int(11) DEFAULT NULL COMMENT '创建时间',
|
|
|
|
+ `updatetime` int(11) DEFAULT NULL COMMENT '更新时间',
|
|
|
|
+ `deletetime` int(11) DEFAULT NULL COMMENT '删除时间',
|
|
|
|
+ `status` enum('1','2','3') DEFAULT '1' COMMENT '状态:1=正常,2=删除,3=其他',
|
|
|
|
+ PRIMARY KEY (`id`)
|
|
|
|
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='溯源码';
|
|
|
|
+
|
|
|
|
+/*Table structure for table `pi_p_company` */
|
|
|
|
+
|
|
|
|
+DROP TABLE IF EXISTS `pi_p_company`;
|
|
|
|
+
|
|
|
|
+CREATE TABLE `pi_p_company` (
|
|
|
|
+ `id` int(10) NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
|
|
|
+ `admin_id` int(10) NOT NULL COMMENT '管理员ID',
|
|
|
|
+ `name` varchar(255) DEFAULT '' COMMENT '名字',
|
|
|
|
+ `type` enum('1','2','3') DEFAULT '1' COMMENT '类型:1=供应商,2=客户,3=自己',
|
|
|
|
+ `province_id` int(5) DEFAULT '0' COMMENT '省份',
|
|
|
|
+ `address` varchar(512) DEFAULT '' COMMENT '地址',
|
|
|
|
+ `phone` varchar(32) DEFAULT '' COMMENT '电话',
|
|
|
|
+ `images` varchar(1024) DEFAULT '' COMMENT '图片',
|
|
|
|
+ `content` varchar(512) DEFAULT '' COMMENT '详情',
|
|
|
|
+ `createtime` int(11) DEFAULT NULL COMMENT '创建时间',
|
|
|
|
+ `updatetime` int(11) DEFAULT NULL COMMENT '更新时间',
|
|
|
|
+ `deletetime` int(11) DEFAULT NULL COMMENT '删除时间',
|
|
|
|
+ `status` enum('1','2','3') DEFAULT '1' COMMENT '状态:1=正常,2=删除,3=其他',
|
|
|
|
+ PRIMARY KEY (`id`)
|
|
|
|
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='公司';
|
|
|
|
+
|
|
|
|
+/*Table structure for table `pi_p_order` */
|
|
|
|
+
|
|
|
|
+DROP TABLE IF EXISTS `pi_p_order`;
|
|
|
|
+
|
|
|
|
+CREATE TABLE `pi_p_order` (
|
|
|
|
+ `id` int(10) NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
|
|
|
+ `admin_id` int(10) NOT NULL COMMENT '管理员ID',
|
|
|
|
+ `orderid` varchar(64) DEFAULT '' COMMENT '编码',
|
|
|
|
+ `name` varchar(255) DEFAULT '' COMMENT '名字',
|
|
|
|
+ `num` int(10) DEFAULT '1' COMMENT '码个数',
|
|
|
|
+ `code` varchar(512) DEFAULT '' COMMENT '码段',
|
|
|
|
+ `car` varchar(255) DEFAULT '' COMMENT '车辆',
|
|
|
|
+ `driver` varchar(255) DEFAULT '' COMMENT '司机',
|
|
|
|
+ `arrivetime` int(11) DEFAULT NULL COMMENT '到厂时间',
|
|
|
|
+ `leavetime` int(11) DEFAULT NULL COMMENT '出厂时间',
|
|
|
|
+ `province_id` int(5) DEFAULT '0' COMMENT '销售省份',
|
|
|
|
+ `images` varchar(1024) DEFAULT '' COMMENT '图片',
|
|
|
|
+ `content` varchar(512) DEFAULT '' COMMENT '详情',
|
|
|
|
+ `createtime` int(11) DEFAULT NULL COMMENT '创建时间',
|
|
|
|
+ `updatetime` int(11) DEFAULT NULL COMMENT '更新时间',
|
|
|
|
+ `deletetime` int(11) DEFAULT NULL COMMENT '删除时间',
|
|
|
|
+ `status` enum('1','2','3') DEFAULT '1' COMMENT '状态:1=备货,2=发货,3=其他',
|
|
|
|
+ PRIMARY KEY (`id`)
|
|
|
|
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='订单';
|
|
|
|
+
|
|
|
|
+/*Table structure for table `pi_p_province` */
|
|
|
|
+
|
|
|
|
+DROP TABLE IF EXISTS `pi_p_province`;
|
|
|
|
+
|
|
|
|
+CREATE TABLE `pi_p_province` (
|
|
|
|
+ `id` int(10) NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
|
|
|
+ `name` varchar(255) DEFAULT '' COMMENT '名字',
|
|
|
|
+ `createtime` int(11) DEFAULT NULL COMMENT '创建时间',
|
|
|
|
+ `updatetime` int(11) DEFAULT NULL COMMENT '更新时间',
|
|
|
|
+ `deletetime` int(11) DEFAULT NULL COMMENT '删除时间',
|
|
|
|
+ PRIMARY KEY (`id`)
|
|
|
|
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='省份';
|
|
|
|
+
|
|
|
|
+/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
|
|
|
+/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
|
|
|
+/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
|
|
|
|
+/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|