没有订单表格Sql
来源:12-2 订单模块一对多数据表设计
JoeWa
2023-09-09
老师,资料里面里面没有订单表格的sql文件
1回答
-
singwa
2023-12-12
-- ----------------------------
-- Table structure for mall_order
-- ----------------------------
DROP TABLE IF EXISTS `mall_order`;
CREATE TABLE `mall_order` (
`id` int unsigned NOT NULL AUTO_INCREMENT,
`user_id` int unsigned NOT NULL DEFAULT '0' COMMENT '用户ID',
`order_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '订单号',
`total_price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '支付金额',
`pay_type` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '支付方式',
`logistics` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '物流名称,比如中通 申通 等信息',
`logistics_order` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '物流订单号',
`message` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '购买者留言信息',
`address_id` int unsigned NOT NULL DEFAULT '0' COMMENT '邮寄地址',
`create_time` int unsigned NOT NULL DEFAULT '0' COMMENT '订单创建时间',
`update_time` int unsigned NOT NULL DEFAULT '0' COMMENT '订单修改时间',
`pay_time` int unsigned NOT NULL DEFAULT '0' COMMENT '支付时间',
`consignment_time` int unsigned NOT NULL DEFAULT '0' COMMENT '发货时间',
`end_time` int unsigned NOT NULL DEFAULT '0' COMMENT '交易完成时间',
`close_time` int unsigned NOT NULL DEFAULT '0' COMMENT '交易关闭时间',
`status` tinyint unsigned NOT NULL DEFAULT '1' COMMENT '1待支付;2已付款; 3已发货; 4已收货; 5已完成; 6退款退货 7已取消\n',
PRIMARY KEY (`id`) USING BTREE,
KEY `user_id` (`user_id`,`order_id`)
) ENGINE=InnoDB AUTO_INCREMENT=58 DEFAULT CHARSET=utf8;
00
相似问题
回答 1
回答 1
回答 2
回答 1
回答 2