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 CommonRequest.Mall mallID;

    @ApiModelProperty(required = true, value = "商户信息")
    private CommonRequest.Seller seller;

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

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

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


    @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 = "购买数量")
        private String quantity;

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

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

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