CREATE TABLE `qimall_order_reserve` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID', `order_id` int(11) NOT NULL DEFAULT '0' COMMENT '主订单id', `store_id` int(11) NOT NULL DEFAULT '0' COMMENT '门店id', `mall_id` int(11) NOT NULL DEFAULT '0' COMMENT '商城ID', `user_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '用户id', `time_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '预约时间id', `time_spec_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '预约时间id', `province_id` int(11) NOT NULL COMMENT '省ID', `city_id` int(11) NOT NULL COMMENT '市ID', `district_id` int(11) NOT NULL DEFAULT '0' COMMENT '区县ID', `detail` varchar(1000) NOT NULL DEFAULT '' COMMENT '详细地址', `lat` varchar(64) NOT NULL DEFAULT '' COMMENT '纬度', `lng` varchar(64) NOT NULL DEFAULT '' COMMENT '经度', `service_type` varchar(255) DEFAULT NULL COMMENT '服务方式(1上门 2到店)', `order_status` tinyint(4) DEFAULT '0' COMMENT '订单状态', `pay_status` tinyint(4) DEFAULT '0' COMMENT '订单付款状态', `reserve_status` tinyint(4) DEFAULT '0' COMMENT '订单预约状态', `reserve_code` varchar(32) NOT NULL DEFAULT '' COMMENT '预约码', `created_at` int(10) DEFAULT '0' COMMENT '创建时间', `updated_at` int(10) DEFAULT '0' COMMENT '更新时间', PRIMARY KEY (`id`) USING BTREE ) ENGINE=InnoDB ROW_FORMAT=COMPACT COMMENT='订单表';