package com.liquidnet.service.goblin.param.shouqianba.callback;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.util.List;

@Data
@ApiModel(value = "OrderCallbackContent", description = "收钱吧订单推送 Content 具体数据")
public class OrderCallbackContent {

    @ApiModelProperty(value = "订单号", example = "71655367906162")
    private String orderSn;

    @ApiModelProperty(value = "支付流水号列表", example = "[\"7894259297368060\"]")
    private List<String> payTsnList;

    @ApiModelProperty(value = "终端号", example = "2101056320290541156")
    private String terminalSn;

    @ApiModelProperty(value = "门店号", example = "21590000000630325")
    private String storeSn;

    @ApiModelProperty(value = "商城名称", example = "智能商城0206-17:35")
    private String mallName;

    @ApiModelProperty(value = "订单金额", example = "2")
    private BigDecimal orderAmount;

    @ApiModelProperty(value = "创建时间", example = "2024-02-20 10:46:32")
    private String createdAt;

    @ApiModelProperty(value = "订单状态码 0:已创建 10:已支付 35:已完成 40:已取消", example = "35")
    private Integer orderStateCode;

    @ApiModelProperty(value = "商品明细列表")
    private List<Item> items;

    @ApiModelProperty(value = "收集的信息 JSON字符串", example = "[{\"type\":\"text\",\"form\":\"basic\",\"fieldName\":\"姓名\",\"content\":\"\"}]")
    private String collectedInfo;

    @ApiModelProperty(value = "预订单编码")
    private List<String> preOrderSns;

    @ApiModelProperty(value = "订单签名")
    private String orderSignature;

    @ApiModelProperty(value = "支付的代客下单数据")
    private List<PreOrder> preOrderList;

    @Data
    @ApiModel(value = "商品明细")
    public static class Item {

        @ApiModelProperty(value = "商品标题")
        private String title;

        @ApiModelProperty(value = "规格描述")
        private String skuDesc;

        @ApiModelProperty(value = "数量")
        private String quantity;

        @ApiModelProperty(value = "单位")
        private String unit;
    }

    @Data
    @ApiModel(value = "采集数据")
    public static class CollectedInfo {
        @ApiModelProperty(value = "控件类型")
        private String type;

        @ApiModelProperty(value = "控件格式")
        private String form;

        @ApiModelProperty(value = "字段名")
        private String fieldName;

        @ApiModelProperty(value = "采集数据内容")
        private String content;
    }

    @Data
    @ApiModel(value = "支付的代客下单数据")
    public static class PreOrder {

        @ApiModelProperty(value = "预订单id")
        private String preOrderId;

        @ApiModelProperty(value = "预订单编号")
        private String preOrderSn;

        @ApiModelProperty(value = "请求号")
        private String requestId;
    }

}
