Skip to content

Commit

Permalink
Merge pull request #4 from zhoushuguang/article-three
Browse files Browse the repository at this point in the history
article three
  • Loading branch information
zhoushuguang authored Jun 9, 2022
2 parents 225fa32 + b0d7777 commit f1fcff8
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions data.sql
Original file line number Diff line number Diff line change
Expand Up @@ -64,24 +64,25 @@ CREATE TABLE `cart` (
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='购物车表';


CREATE DATABASE order;
USE order;
CREATE DATABASE orders;
USE orders;

CREATE TABLE `orders` (
`id` varchar(64) NOT NULL DEFAULT '' COMMENT '订单id',
`userid` bigint(20) UNSIGNED NOT NULL DEFAULT 0 COMMENT '用户id',
`shoppingid` bigint(20) NOT NUMBER DEFAULT 0 COMMENT '收货信息表id',
`shoppingid` bigint(20) NOT NULL DEFAULT 0 COMMENT '收货信息表id',
`payment` decimal(20,2) DEFAULT NULL DEFAULT 0 COMMENT '实际付款金额,单位是元,保留两位小数',
`paymenttype` tinyint(4) NOT NULL DEFAULT 1 COMMENT '支付类型,1-在线支付',
`postage` int(10) NOT NULL DEFAULT 0 COMMENT '运费,单位是元',
`status` smallint(6) NOT NULL DEFAULT 10 COMMENT '订单状态:0-已取消-10-未付款,20-已付款,30-待发货 40-待收货,50-交易成功,60-交易关闭',
`payment_time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '支付时间',
`send_time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '发货时间',
`end_time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '交易完成时间',
`close_time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '交易关闭时间',
`payment_time` timestamp NOT NULL COMMENT '支付时间',
`send_time` timestamp NOT NULL COMMENT '发货时间',
`end_time` timestamp NOT NULL COMMENT '交易完成时间',
`close_time` timestamp NOT NULL COMMENT '交易关闭时间',
`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`)
PRIMARY KEY (`id`),
KEY `ix_userid` (`userid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='订单表';

CREATE TABLE `orderitem` (
Expand Down

0 comments on commit f1fcff8

Please sign in to comment.