/**
Source Server Version: 8.0.31
Source Database: backendsys
Date: 2023/09/05 00:20:22
*/

DROP TABLE IF EXISTS `b2c_order_snapshoot_member`;

# 一个订单对应一个用户信息
CREATE TABLE `b2c_order_snapshoot_member` (
    PRIMARY KEY (`id`),
    `id` BIGINT AUTO_INCREMENT,
    `order_id` BIGINT NOT NULL COMMENT '订单ID',
    `member_id` BIGINT COMMENT '会员ID',
    `member_nickname` VARCHAR(20) COMMENT '会员昵称 (快照)',
    `member_phone` VARCHAR(20) COMMENT '会员手机号码 (快照)',
    `recipient_name` VARCHAR(200) COMMENT '收货人 (快照)',
    `recipient_phone` VARCHAR(20) COMMENT '收货手机号码 (快照)',
    `recipient_address` VARCHAR(200) COMMENT '收货地址 (快照)',
    `recipient_point_longitude` VARCHAR(20) COMMENT '收货地址 (坐标-经度) (快照)',
    `recipient_point_latitude` VARCHAR(20) COMMENT '收货地址 (坐标-纬度) (快照)',
    `recipient_price` DECIMAL(10, 2) COMMENT '配送费 (快照)'
) ENGINE=INNODB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='订单商品快照表';

# 经度的范围是 -180°到180°,纬度的范围是 -90°到90°

INSERT INTO b2c_order_snapshoot_member(order_id, member_id, member_nickname, member_phone, recipient_name,
                                       recipient_address, recipient_point_longitude, recipient_point_latitude, recipient_phone, recipient_price) VALUES
    (1, 1, 'Mure', '13670511519', '张三', '广东省深圳市南山区科技中一路123号',
     '113.9333', '22.5431', '13333333390', 10)
;
