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

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

import java.io.Serializable;
import java.util.List;

/**
 * 收钱吧 - 创建结算明细 请求参数
 *
 * @author liquidnet
 * @since 2026-03-16
 */
@ApiModel(value = "创建结算明细请求参数")
@Data
public class SettlementCreateRequest implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(required = true, value = "应用ID（聚合收单唯一ID，需申请）")
    private String appid;

    @ApiModelProperty(required = true, value = "商城信息")
    private MallInfo mallID;

    @ApiModelProperty(required = true, value = "买家信息")
    private Buyer buyer;

    @ApiModelProperty(required = false, value = "结算明细组（结算条目列表）")
    private List<CheckoutItem> checkoutItems;

    @ApiModelProperty(required = false, value = "结算总金额（单位：分）")
    private Long amount;



    @Data
    @ApiModel(value = "商城信息")
    public static class MallInfo{

        @ApiModelProperty(required = true, value = "商城ID")
        private String mallSn;

        @ApiModelProperty(required = true, value = "商城密码")
        private String signature;
    }

    @Data
    @ApiModel("买家信息")
    public static class Buyer{

        @ApiModelProperty(required = true, value = "买家ID（用户唯一标识）")
        private String buyerId;
    }


    @Data
    @ApiModel(value = "结算明细条目")
    public static class CheckoutItem{

        @ApiModelProperty(required = true, value = "商品识别号（商品唯一标识，如 spuId）")
        private String spuId;

        @ApiModelProperty(required = true, value = "规格识别号（SKU唯一标识，如 skuId）")
        private String skuId;

        @ApiModelProperty(required = true, value = "单价（单位：分）")
        private Long price;

        @ApiModelProperty(required = true, value = "资源编号（对应业务系统中的资源ID）")
        private String quantity;

        @ApiModelProperty(required = true, value = "商品类型（0 正常商品 1 自定义商品）")
        private String type;

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

        @ApiModelProperty(required = true, value = "商品图片链接")
        private String image;
    }
}
