package com.yd.csf.feign.response.expectedfortune;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

@Data
public class ApiExpectedFortunePageResponse {

    /**
     * 主键ID
     */
    @Schema(description = "expected fortune id")
    private Long id;

    /**
     * 是否实际出账：1-预计出账 2-实际出账
     */
    @Schema(description = "是否实际出账：1-预计出账 2-实际出账")
    private Integer type;

    /**
     * 预计出账表唯一业务id
     */
    @Schema(description = "expected fortune biz id")
    private String expectedFortuneBizId;

    /**
     * 应付款类型 R-关联保单应付款 U-非关联保单应付款
     */
    @Schema(description = "应付款类型 R-关联保单应付款 U-非关联保单应付款")
    private String fortuneBizType;

    @Schema(description = "业务编号")
    private String payableNo;

    @Schema(description = "policy no")
    private String policyNo;

    @Schema(description = "转介人")
    private String broker;

    @Schema(description = "转介人业务ID")
    private String brokerBizId;

    @Schema(description = "职级")
    private String brokerGradeName;

    @Schema(description = "关联人员")
    private String associatedPerson;

    @Schema(description = "团队名称")
    private String team;

    @Schema(description = "所属团队业务ID")
    private String teamBizId;

    @Schema(description = "出账项目")
    private String fortuneName;

    @Schema(description = "出账项目类型 字典值: csf_fortune_type")
    private String fortuneType;

    @Schema(description = "出账状态 0=待出账 1=可出帐，待检核 2=完成出账 3=部分出账 4=保留 5=已失效 6=可出账, 已检核 7=未找到当前预计出账对应的来佣 字典值: csf_expected_fortune_status")
    private String status;

    @Schema(description = "出账期数")
    private Integer fortunePeriod;

    @Schema(description = "总期数")
    private Integer fortuneTotalPeriod;

    @Schema(description = "出账年月（估）")
    @JsonFormat(pattern = "yyyy-MM", timezone = "GMT+8")
    private LocalDate payoutDate;

    @Schema(description = "出账年月（实）")
    @JsonFormat(pattern = "yyyy-MM", timezone = "GMT+8")
    private LocalDate actualPayoutDate;

    @Schema(description = "入账检核汇率")
    private BigDecimal exchangeRate;

    @Schema(description = "保单币种->HKD汇率")
    private BigDecimal defaultExchangeRate;

    @Schema(description = "HKD->发放币种汇率")
    private BigDecimal hkdToPayoutRate;

    @Schema(description = "保单币种")
    private String ruleCurrency;

    @Schema(description = "原币种")
    private String originalCurrency;

    @Schema(description = "发放币种")
    private String payoutCurrency;

    @Schema(description = "原币种金额")
    private BigDecimal originalAmount;

    @Schema(description = "应发港币金额（估）")
    private BigDecimal hkdAmount;

    @Schema(description = "应发保单记账金额")
    private BigDecimal ruleAmount;

    @Schema(description = "本次发放保单记账金额")
    private BigDecimal currentPaymentRuleAmount;

    @Schema(description = "本次发放金额")
    private BigDecimal currentPayoutAmount;

    @Schema(description = "本次发放折合港币金额")
    private BigDecimal currentPaymentHkdAmount;

    @Schema(description = "本次发放比例")
    private BigDecimal currentPaymentRatio;

    @Schema(description = "累积已发放保单记账金额")
    private BigDecimal paidRuleAmount;

    @Schema(description = "累积已发放港币金额")
    private BigDecimal paidAmount;

    @Schema(description = "累积已发放比例")
    private BigDecimal paidRatio;

    @Schema(description = "剩余发放比例")
    private BigDecimal unpaidRatio;

    @Schema(description = "剩余保单记账金额")
    private BigDecimal unpaidRuleAmount;

    @Schema(description = "剩余发放折合港币金额")
    private BigDecimal unpaidRuleAmounthHkd;




    @Schema(description = "原币→港币汇率")
    private BigDecimal originalToHkdRate;

    @Schema(description = "发放币种金额")
    private BigDecimal payoutAmount;




    @Schema(description = "期交保费")
    private BigDecimal premium;

    @Schema(description = "产品计划 ID")
    private String productLaunchBizId;

    @Schema(description = "产品计划")
    private String productName;

    @Schema(description = "持有比例")
    private String brokerRatio;

    @Schema(description = "备注")
    private String remark;

    @Schema(description = "创建人")
    private String creatorName;

    @Schema(description = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createTime;

    @Schema(description = "更新时间（操作时间）")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime updateTime;

    /**
     * 发佣率(对应职级)
     */
    @Schema(description = "发佣率(对应职级)")
    private String commissionRatio;
}
