package com.ycwl.basic.integration.profitshare.dto;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;
import java.util.Map;

/**
 * 计算分账结果VO
 *
 * @author Claude Code
 * @date 2025-01-11
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@JsonInclude(JsonInclude.Include.NON_NULL)
public class CalculateResultVO {

    /**
     * 总金额
     */
    @JsonProperty("total_amount")
    private Double totalAmount;

    /**
     * 分账明细列表
     */
    @JsonProperty("details")
    private List<CalculateDetailVO> details;

    /**
     * 分账明细VO
     */
    @Data
    @Builder
    @NoArgsConstructor
    @AllArgsConstructor
    @JsonInclude(JsonInclude.Include.NON_NULL)
    public static class CalculateDetailVO {
        /**
         * 接收人名称
         */
        @JsonProperty("recipient_name")
        private String recipientName;

        /**
         * 接收人类型
         */
        @JsonProperty("recipient_type")
        private String recipientType;

        /**
         * 分账金额
         */
        @JsonProperty("share_amount")
        private Double shareAmount;

        /**
         * 分账类型
         */
        @JsonProperty("share_type")
        private String shareType;

        /**
         * 分账值
         */
        @JsonProperty("share_value")
        private Double shareValue;
    }
}
