package com.hys.app.service.kuaidiniao.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.Valid;
import javax.validation.constraints.Max;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;

/**
 * 预下单参数
 */
@Data
public class PreOrderModel {

    @ApiModelProperty(value = "门店业务类型 1：商家门店  2：个人即时配")
    private Integer storeBusinessType = 2;

    @ApiModelProperty(value = "1、storeCode平台门店编码(商家自定义门店编码，唯一)，个人即时配编码固定传storeCode；2、merchantCode快递鸟门店编码(商家门店编码映射KDN门店编码)个人即时配编码固传merchantCode”;3、平台门店编码和快递鸟门店编码必填一项，且两者只能同时填一项。")
    private String storeCode;

    @ApiModelProperty(value = "(商家门店编码映射KDN门店编码)个人即时配编码固传merchantCode”;3、平台门店编码和快递鸟门店编码必填一项，且两者只能同时填一项。")
    private String merchantCode = "merchantCode";

    @ApiModelProperty(value = "商户名称")
    private String merchantName = "上海瑞赢旷视科技";

    @ApiModelProperty(value = "产品类型编码，默认:B")
    private String productTypeCode = "B";

    @ApiModelProperty(value = "即时配编码,多个即时配编码用逗号分隔。")
    private String intraCode = "SFTC";

    @ApiModelProperty(value = "预约类型0：立即单、1：预约上门单")
    private Integer appointmentType;

    @ApiModelProperty(value = "预约上门单必填预约上门时间格式：YYYY-MM-DD  hh:mm:ss说明：当前时间+2小时，10分钟间隔向上取整。")
//    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
//    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private String appointmentTime;

    @ApiModelProperty(value = "交通方式，默认0：未指定。指定交通方式会产生额外的费用。暂不支持")
    private Integer travelWay = 0;

    @ApiModelProperty(value = "下单类型1:帮我送 、2:帮我取；默认1")
    private Integer deliveryType = 1;

    @ApiModelProperty(value = "坐标类型1:百度地图、 2:高德地图 、3:腾讯地图")
    private Integer lbsType = 2;

    @ApiModelProperty(value = "物品类型")
    private String goodsType = "99";

    @ApiModelProperty(value = "物品数量1-99的整数")
    private Integer goodsNum;

    @ApiModelProperty(value = "物品总重量单位kg")
    @Max(50)
    private Double totalWeight;

    @ApiModelProperty(value = "物品总体积，单位立方厘米")
    private Double totalVolume;

    @ApiModelProperty(value = "物品声明价值，单位：元。去尾法，保留两位小数。所有物品总计声明价值。")
    private Double declaredValue;

    @ApiModelProperty(value = "是否保价  1：是 0：否 暂不支持保价，默认传0")
    private Integer insured = 0;

    @ApiModelProperty(value = "丢破损保障费用，单位：元。去尾法，保留两位小数。根据声明价值计算需要支付的保障用。暂不支持，默认传0")
    private Double insuranceFee = 0.0;

    @ApiModelProperty(value = "下单人姓名")
    private String orderName;

    @ApiModelProperty(value = "下单人手机号(下单人手机号和下单人座机二选一必填)")
    private String orderMobile;

    @ApiModelProperty(value = "下单人座机号(下单人手机号和下单人座机二选一必填)")
    private String orderPhone;

    @ApiModelProperty(value = "货物信息，最大数量50")
    private List<KdGood> goodsList;

    @ApiModelProperty(value = "发货人信息")
    @Valid
    private ReceiverSender sender;

    @ApiModelProperty(value = "收货人信息")
    @Valid
    private ReceiverSender receiver;

    @ApiModelProperty(value = "商家订单号 全局唯一")
    private String orderCode;

    @ApiModelProperty(value = "备注")
    private String remark;

    private String sendAddress;

    private String receiveAddress;
}
