package com.trade.service.finance.paymentcollection.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.trade.common.core.domain.CommonEntity;
import com.trade.common.validate.ValidatorGroup;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.time.LocalDate;

/**
 * @description: 入账审核Dto
 * @Author: wanglang
 * @Date: 2024/10/22
 * @Version: 1.0
 */
@Data
public class EntryReviewDto extends CommonEntity<EntryReviewDto> {

    @ApiModelProperty(name = "id", value = "申请id")
    @NotNull(message = "申请id不能为空")
    private Long id;
    @ApiModelProperty(name = "id", value = "收款凭证文件id")
    private Long fileId;
    @ApiModelProperty(name = "actualAmount", value = "实际到账金额")
    @NotNull(message = "实际到账金额不能为空")
    private BigDecimal actualAmount;
    @ApiModelProperty(name = "actualRetainedAmount", value = "实际留存人民币金额")
    @NotNull(message = "实际留存人民币金额不能为空", groups = {
            ValidatorGroup.Submit.class
    })
    private BigDecimal actualRetainedAmount;
    @ApiModelProperty(name = "settlementAmount", value = "结汇人民币金额")
    @NotNull(message = "结汇人民币金额不能为空", groups = {
            ValidatorGroup.Submit.class
    })
    private BigDecimal settlementAmount;
    @ApiModelProperty(name = "currencyCode", value = "实际到账金额币种")
    @NotBlank(message = "实际到账金额币种不能为空")
    private String actualCurrency;
    @ApiModelProperty(name = "currencyCode", value = "结汇人民币金额币种")
    @NotBlank(message = "结汇人民币金额币种不能为空", groups = {
            ValidatorGroup.Submit.class
    })
    private String settlementCurrency;
    @ApiModelProperty(name = "currencyCode", value = "实际留存人民币金额币种")
    @NotBlank(message = "实际留存人民币金额币种不能为空", groups = {
            ValidatorGroup.Submit.class
    })
    private String actualRetainedCurrency;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(name = "actualEntryDate", value = "实际入账日期")
    @NotNull(message = "实际入账日期不能为空")
    private LocalDate actualEntryDate;
    @ApiModelProperty(name = "transactionNumber", value = "交易编号")
    // @NotBlank(message = "交易编号不能为空")
    private String transactionNumber;
    @ApiModelProperty(name = "remark", value = "备注")
    private String remark;
    @ApiModelProperty(name = "accountName", value = "账户名称")
    private String accountName;
    @ApiModelProperty(name = "accountNumber", value = "账号")
    private String accountNumber;
    @ApiModelProperty(name = "openingBank", value = "开户行名称")
    private String openingBank;
    @ApiModelProperty(name = "bankName", value = "银行名称")
    private String bankName;
    @ApiModelProperty(name = "voucherNo", value = "凭证号")
    private String voucherNo;
}
