package com.yiqi.order.domain.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.yiqi.common.annotation.Excel;
import com.yiqi.order.domain.StoreAddressVO;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @Author BKGin
 * @Email libra14xu@gmail.com
 * @Date 2024-09-07
 */
@Data
public class OrderDeliveryVO implements Serializable {

    private Long id;

    private Long storeId;

    @Excel(name = "所属门店")
    private String storeName;

    /**
     * 配送方式 {@link com.yiqi.common.enums.ClothOrderDeliveryWay}
     */
    @Excel(name = "配送方式")
    @ApiModelProperty("配送方式 ")
    private String deliveryWay;

    /**
     * 自配送配送员
     */
    @ApiModelProperty("配送员")
    private Long deliveryManId;

    /**
     * 配送单号
     */
    @Excel(name = "配送单号")
    private String deliverySn;

    /**
     * 商品订单号
     */
    @Excel(name = "商品订单号")
    private String orderSn;

    /**
     * 微信门店id
     */
    @Excel(name = "微信门店id")
    private String wxStoreId;

    /**
     * 衣服订单类型（0=收衣，1=取衣）
     */
    @Excel(name = "衣服订单类型", readConverterExp = "0==收衣，1=取衣")
    private String clothOrderType;

    /**
     * 运力ID
     */
    @Excel(name = "运力ID")
    private String serviceTransId;

    /**
     * 客户ID
     */
    private Long appUserId;
    @Excel(name = "客户姓名")
    private String userName;

    /**
     * 经纬度
     */
    @Excel(name = "经纬度")
    private String userLng;

    /**
     * 经纬度
     */
    @Excel(name = "经纬度")
    private String userLat;

    /**
     * 地址
     */
    @Excel(name = "地址")
    private String userAddress;

    /**
     * 地址
     */
    @Excel(name = "手机号")
    private String userPhone;

    /**
     * 配送距离(整数单位：米)
     */
    @Excel(name = "配送距离(整数单位：米)")
    private String distance;

    /**
     * 实际运费(单位：元)，运费减去优惠券费用
     */
    @Excel(name = "实际运费(单位：元)，运费减去优惠券费用")
    private BigDecimal fee;

    /**
     * 取货码
     */
    @Excel(name = "取货码")
    private String fetchCode;

    /**
     * 收货码
     */
    @Excel(name = "收货码")
    private String recvCode;

    /**
     * 外部订单id
     */
    @Excel(name = "外部订单id")
    private Long transOrderId;

    /**
     * 配送状态，枚举值
     */
    @Excel(name = "配送状态，枚举值")
    private String deliveryStatus;

    /**
     * 状态描述
     */
    @Excel(name = "状态描述")
    private String deliveryStatusMsg;

    /**
     * 创建时间
     */
    @ApiModelProperty("创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    /**
     * 配送员接单时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Excel(name = "配送员接单时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date acceptTime;

    /**
     * 配送员取货时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Excel(name = "配送员取货时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date fetchTime;

    /**
     * 配送员完成时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Excel(name = "配送员完成时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date finishTime;

    /**
     * 取消时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Excel(name = "取消时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date cancelTime;

    /**
     * 配送员姓名
     */
    @Excel(name = "配送员姓名")
    private String transporterName;

    /**
     * 配送员电话
     */
    @Excel(name = "配送员电话")
    private String transporterPhone;

    /**
     * 商家地址
     */
    private StoreAddressVO storeAddress;


    private OrderClothVO orderCloth;

}
