package com.trade.admin.business.separateaccounts.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.validation.annotation.Validated;

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

/**
 * @description:
 * @Author: wanglang
 * @Date: 2024/10/23 20:11
 * @Version: 1.0
 */
@Data
@Validated
public class SubmitSeparateAccountsDto {

    @ApiModelProperty(name = "id", value = "主键id")
    @NotNull(message = "分账主键不能为空")
    private Long id;
    @ApiModelProperty(name = "tradeParticipantsIdentifier", value = "贸易参与方标识")
    @NotBlank(message = "贸易参与方标识不能为空")
    private String tradeParticipantsIdentifier;
    @ApiModelProperty(name = "tradeParticipantsName", value = "贸易参与方名称")
    @NotBlank(message = "贸易参与方名称不能为空")
    private String tradeParticipantsName;
    @ApiModelProperty(name = "ledgerType", value = "分账类型1出口退税款2贸易回款3预收货款4贸易融资款5贷款差额6贷款结汇差额")
    @NotBlank(message = "分账类型不能为空")
    private String ledgerType;
    @ApiModelProperty(name = "ledgerRatio", value = "分账比例单位%")
    @NotNull(message = "分账比例不能为空")
    private Integer ledgerRatio;
    @ApiModelProperty(name = "ledgerAmount", value = "分账金额")
    @NotNull(message = "分账金额不能为空")
    private BigDecimal ledgerAmount;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @ApiModelProperty(name = "planEntryDate", value = "付款日期")
    @NotNull(message = "付款日期不能为空")
    private LocalDate planEntryDate;
    @ApiModelProperty(name = "accountName", value = "账户名称")
    @NotBlank(message = "账户名称不能为空")
    private String accountName;
    @ApiModelProperty(name = "accountNumber", value = "银行账号")
    @NotBlank(message = "银行账号不能为空")
    private String accountNumber;
    @ApiModelProperty(name = "openingBank", value = "开户行名称")
    @NotBlank(message = "开户行名称不能为空")
    private String openingBank;
    @ApiModelProperty(name = "bankName", value = "银行名称")
    @NotBlank(message = "银行名称不能为空")
    private String bankName;
}
