1.
DROP TABLE IF EXISTS `sys_warehouse_area`;
CREATE TABLE `sys_warehouse_area` (
`id` bigint(20) NOT NULL COMMENT '仓库区域编号',
`name` varchar(50) NOT NULL DEFAULT '' COMMENT '仓库区域名称',
`lang_code` varchar(20) NOT NULL DEFAULT '' COMMENT '多语言代码',
`status` bit(1) NOT NULL DEFAULT b'0' COMMENT '状态',
`type` int(11) NOT NULL DEFAULT '0' COMMENT '仓库区域类型,1 大包裹区域,2小包裹区域',
`create_user` varchar(150) NOT NULL DEFAULT '' COMMENT '创建人',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_user` varchar(150) NOT NULL DEFAULT '' COMMENT '更新人',
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`delete_status` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
`delete_user` varchar(150) NOT NULL DEFAULT '' COMMENT '删除人',
`delete_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '删除时间',
`remarks` varchar(200) NOT NULL DEFAULT '' COMMENT '备注',
`pass_no` varchar(30) NOT NULL DEFAULT '' COMMENT '格口号',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='仓库区域表';
2.
CREATE TABLE `Testuser` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`username` varchar(64) NOT NULL DEFAULT '',
`mobile` int(10) unsigned NOT NULL DEFAULT '0',
`shijian` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
3.
/*
Navicat MySQL Data Transfer
Source Server : Pcs_Dev 开发
Source Server Version : 50508
Source Host : 172.16.30.47:8066
Source Database : pcs_order
Target Server Type : MYSQL
Target Server Version : 50508
File Encoding : 65001
Date: 2018-07-02 15:05:09
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for prealert_order
-- ----------------------------
DROP TABLE IF EXISTS `prealert_order`;
CREATE TABLE `prealert_order` (
`id` bigint(18) NOT NULL COMMENT '主键',
`source` varchar(32) NOT NULL DEFAULT '' COMMENT '订单来源(平台)',
`refer_order_id` varchar(50) NOT NULL COMMENT '交易订单ID',
`refer_carriage_order_id` varchar(32) DEFAULT '' COMMENT '二段订单的交易订单号',
`order_value` decimal(20,5) DEFAULT '0.00000' COMMENT '订单金额(不包括邮费),单位为”元“',
`total_shipping_fee` decimal(20,5) DEFAULT '0.00000' COMMENT '订单邮费, 单位为''元''',
`total_payment_amount` decimal(20,5) DEFAULT '0.00000' COMMENT '订单的总价格(orderValue + totalShippingFee) 单位为元',
`currency` varchar(16) DEFAULT '' COMMENT '币种',
`units` varchar(20) DEFAULT NULL COMMENT '金额计量单位',
`category_feature` varchar(32) DEFAULT '' COMMENT '交易单品类特征',
`seller_id` bigint(18) DEFAULT NULL COMMENT '卖家ID',
`buyer_id` bigint(18) DEFAULT NULL COMMENT '买家ID',
`order_remark` varchar(256) DEFAULT NULL COMMENT '交易订单备注信息',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`send_inbounded_message` enum('Y','N') DEFAULT 'N',
PRIMARY KEY (`id`),
UNIQUE KEY `unique_referOrderId_source` (`source`,`refer_order_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='交易订单表';
4.
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for prealert_order_item
-- ----------------------------
DROP TABLE IF EXISTS `prealert_order_item`;
CREATE TABLE `prealert_order_item` (
`id` bigint(11) NOT NULL COMMENT '主键',
`order_id` bigint(18) DEFAULT NULL COMMENT '交易订单的ID(关联prealert_order表的ID字段)',
`package_id` bigint(20) DEFAULT NULL COMMENT '包裹id',
`refer_item_id` varchar(32) NOT NULL DEFAULT '' COMMENT '商品ID',
`refer_sku_id` varchar(32) DEFAULT NULL,
`item_name` varchar(256) NOT NULL DEFAULT '' COMMENT '商品名称',
`item_category_name` varchar(32) DEFAULT '' COMMENT '商品类目ID+名称 格式为“id-name”',
`first_category_id` bigint(32) DEFAULT NULL COMMENT '一级品类ID',
`second_category_id` bigint(32) DEFAULT NULL COMMENT '二级(末级)品类ID',
`item_quantity` int(11) NOT NULL DEFAULT '0' COMMENT '商品购买数量',
`item_unit_price` decimal(20,5) DEFAULT '0.00000' COMMENT '商品单价,单位为元',
`total_item_actual_price` decimal(20,5) NOT NULL DEFAULT '0.00000' COMMENT '商品的实付金额,单位为:”元”',
`currency` varchar(16) DEFAULT NULL COMMENT '币种',
`units` varchar(20) DEFAULT NULL COMMENT '金额计量单位',
`item_remark` varchar(256) DEFAULT '' COMMENT '购买商品的sku属性描述,比如颜色、尺寸',
`item_pic_url` varchar(512) DEFAULT '' COMMENT '商品描述URL',
`item_detail_url` varchar(512) DEFAULT NULL COMMENT '商品详情url',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`id`),
KEY `fk_trade_order_id` (`order_id`) USING BTREE,
KEY `idx_package_id` (`package_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='订单商品表';