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

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@Data
public class CommonRequest {

    @Data
    @ApiModel(value = "商城信息")
    @JsonIgnoreProperties(ignoreUnknown = true)
    @AllArgsConstructor
    @NoArgsConstructor
    public static class Mall{

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

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

    @Data
    @ApiModel(value = "卖家信息/商户信息")
    @JsonIgnoreProperties(ignoreUnknown = true)
    @AllArgsConstructor
    @NoArgsConstructor
    public static class Seller {
        @ApiModelProperty(required = true, value = "商户ID")
        private String merchantId;

        @ApiModelProperty(required = true, value = "商户userID")
        private String merchantUserId;

        @ApiModelProperty(required = true, value = "角色 固定值（super_admin）")
        private String role;
    }

    @Data
    @ApiModel("买家信息")
    @AllArgsConstructor
    @NoArgsConstructor
    @JsonIgnoreProperties(ignoreUnknown = true)
    public static class Buyer{
        @ApiModelProperty(required = true, value = "买家ID（用户唯一标识）")
        private String buyerId;
    }

    @Data
    @ApiModel("付款人信息")
    @AllArgsConstructor
    @NoArgsConstructor
    @JsonIgnoreProperties(ignoreUnknown = true)
    public static class Payer{
        @ApiModelProperty(required = true, value = "付款人ID")
        private String userId;
    }

    @ApiModel(value = "收单信息")
    @Data
    @JsonIgnoreProperties(ignoreUnknown = true)
    @AllArgsConstructor
    @NoArgsConstructor
    public static class Acquiring{
        @ApiModelProperty(value = "收单号")
        private String acquiringSn;

        @ApiModelProperty(value = "收单密钥")
        private String signature;
    }

    @Data
    @ApiModel(value = "金额构成信息")
    @JsonIgnoreProperties(ignoreUnknown = true)
    public static class AmountComposition {
        @ApiModelProperty(required = true, value = "金额构成项列表")
        private List<CompositionItem> compositionItems;
    }

    @Data
    @ApiModel(value = "金额构成项详情")
    @JsonIgnoreProperties(ignoreUnknown = true)
    public static class CompositionItem {
        @ApiModelProperty(required = true, value = "构成项类目")
        private String category;

        @ApiModelProperty(required = true, value = "构成项金额")
        private Long amount;
    }

    @Data
    @ApiModel(value = "订单信息")
    @AllArgsConstructor
    @NoArgsConstructor
    public static class OrderInfo {
        @ApiModelProperty(required = true, value = "订单ID")
        private String sn;

        @ApiModelProperty(required = true, value = "订单密码")
        private String signature;

    }
}
