package com.ruoyi.loanpricing.domain.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Pattern;
import lombok.Data;

import java.io.Serializable;

/**
 * 企业客户利率定价发起DTO
 *
 * @author ruoyi
 * @date 2025-01-19
 */
@Data
@Schema(description = "企业客户利率定价发起请求")
public class CorporateLoanPricingCreateDTO implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description = "客户内码", requiredMode = Schema.RequiredMode.REQUIRED, example = "CORP001")
    @NotBlank(message = "客户内码不能为空")
    private String custIsn;

    @Schema(description = "客户名称", example = "测试科技有限公司")
    private String custName;

    @Schema(description = "证件类型", example = "统一社会信用代码")
    private String idType;

    @Schema(description = "证件号码", example = "91110000100000000X")
    private String idNum;

    @Schema(description = "担保方式", requiredMode = Schema.RequiredMode.REQUIRED, example = "抵押", allowableValues = {"信用", "保证", "抵押", "质押"})
    @NotBlank(message = "担保方式不能为空")
    @Pattern(regexp = "^(信用|保证|抵押|质押)$", message = "担保方式必须是：信用、保证、抵押、质押之一")
    private String guarType;

    @Schema(description = "申请金额（元）", requiredMode = Schema.RequiredMode.REQUIRED, example = "1000000")
    @NotBlank(message = "申请金额不能为空")
    private String applyAmt;

    @Schema(description = "贷款期限", example = "36")
    private String loanTerm;

    @Schema(description = "省农担担保贷款", example = "false")
    private String isAgriGuar;

    @Schema(description = "绿色贷款", example = "true")
    private String isGreenLoan;

    @Schema(description = "科技型企业", example = "true")
    private String isTechEnt;

    @Schema(description = "贸易和建筑业企业标识", example = "false")
    private String isTradeConstruction;

    @Schema(description = "抵质押类型", example = "一类")
    private String collType;

    @Schema(description = "抵质押物是否三方所有", example = "false")
    private String collThirdParty;
}
