1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
| create table oms_order ( id bigint not null auto_increment comment '订单id', member_id bigint not null comment '会员id', coupon_id bigint comment '优惠券id', order_sn varchar(64) comment '订单编号', create_time datetime comment '提交时间', member_username varchar(64) comment '用户帐号', total_amount decimal(10,2) comment '订单总金额', pay_amount decimal(10,2) comment '应付金额(实际支付金额)', freight_amount decimal(10,2) comment '运费金额', promotion_amount decimal(10,2) comment '促销优化金额(促销价、满减、阶梯价)', integration_amount decimal(10,2) comment '积分抵扣金额', coupon_amount decimal(10,2) comment '优惠券抵扣金额', discount_amount decimal(10,2) comment '管理员后台调整订单使用的折扣金额', pay_type int(1) comment '支付方式:0->未支付;1->支付宝;2->微信', source_type int(1) comment '订单来源:0->PC订单;1->app订单', status int(1) comment '订单状态:0->待付款;1->待发货;2->已发货;3->已完成;4->已关闭;5->无效订单', order_type int(1) comment '订单类型:0->正常订单;1->秒杀订单', delivery_company varchar(64) comment '物流公司(配送方式)', delivery_sn varchar(64) comment '物流单号', auto_confirm_day int comment '自动确认时间(天)', integration int comment '可以获得的积分', growth int comment '可以活动的成长值', promotion_info varchar(100) comment '活动信息', bill_type int(1) comment '发票类型:0->不开发票;1->电子发票;2->纸质发票', bill_header varchar(200) comment '发票抬头', bill_content varchar(200) comment '发票内容', bill_receiver_phone varchar(32) comment '收票人电话', bill_receiver_email varchar(64) comment '收票人邮箱', receiver_name varchar(100) not null comment '收货人姓名', receiver_phone varchar(32) not null comment '收货人电话', receiver_post_code varchar(32) comment '收货人邮编', receiver_province varchar(32) comment '省份/直辖市', receiver_city varchar(32) comment '城市', receiver_region varchar(32) comment '区', receiver_detail_address varchar(200) comment '详细地址', note varchar(500) comment '订单备注', confirm_status int(1) comment '确认收货状态:0->未确认;1->已确认', delete_status int(1) not null default 0 comment '删除状态:0->未删除;1->已删除', use_integration int comment '下单时使用的积分', payment_time datetime comment '支付时间', delivery_time datetime comment '发货时间', receive_time datetime comment '确认收货时间', comment_time datetime comment '评价时间', modify_time datetime comment '修改时间', primary key (id) );
|