package com.ruoyi.credit.domain;

import java.math.BigDecimal;
import java.util.Date;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 融资申请对象 dc_financing
 * 
 * @author ruoyi
 * @date 2025-01-07
 */
public class FinancingApplication extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 融资ID */
    private Long financingId;

    /** 部门ID */
    @Excel(name = "部门ID")
    private Long deptId;

    /** 申请编号 */
    @Excel(name = "申请编号")
    private String applicationNumber;

    /** 债权ID */
    @Excel(name = "债权ID")
    private Long creditId;

    /** 债权编号 */
    @Excel(name = "债权编号")
    private String creditNumber;

    /** 申请人ID(安保公司) */
    @Excel(name = "申请人ID")
    private Long applicantId;

    /** 申请人名称 */
    @Excel(name = "申请人名称")
    private String applicantName;

    /** 金融机构ID */
    @Excel(name = "金融机构ID")
    private Long financialInstitutionId;

    /** 金融机构名称 */
    @Excel(name = "金融机构名称")
    private String financialInstitutionName;

    /** 申请金额 */
    @Excel(name = "申请金额")
    private BigDecimal requestedAmount;

    /** 批准金额 */
    @Excel(name = "批准金额")
    private BigDecimal approvedAmount;

    /** 利率(%) */
    @Excel(name = "利率(%)")
    private BigDecimal interestRate;

    /** 融资期限(天) */
    @Excel(name = "融资期限(天)")
    private Integer financingTerm;

    /** 融资状态 */
    @Excel(name = "融资状态")
    private String financingStatus;

    /** 风险等级 */
    @Excel(name = "风险等级")
    private String riskLevel;

    /** 风险评分 */
    @Excel(name = "风险评分")
    private BigDecimal riskScore;

    /** 申请材料 */
    private String applicationMaterials;

    /** 审批意见 */
    private String approvalOpinion;

    /** 审批人ID */
    private Long approvedBy;

    /** 审批时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "审批时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date approvedTime;

    /** 放款时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "放款时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date disbursementTime;

    /** 放款账户 */
    @Excel(name = "放款账户")
    private String disbursementAccount;

    /** 放款备注 */
    @Excel(name = "放款备注")
    private String disbursementNote;

    /** 还款日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "还款日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date repaymentDate;

    // 融资状态常量
    public static final String STATUS_PENDING = "PENDING";
    public static final String STATUS_APPROVED = "APPROVED";
    public static final String STATUS_REJECTED = "REJECTED";
    public static final String STATUS_DISBURSED = "DISBURSED";
    public static final String STATUS_SETTLED = "SETTLED";

    // 风险等级常量
    public static final String RISK_LOW = "LOW";
    public static final String RISK_MEDIUM = "MEDIUM";
    public static final String RISK_HIGH = "HIGH";

    public void setFinancingId(Long financingId) 
    {
        this.financingId = financingId;
    }

    public Long getFinancingId() 
    {
        return financingId;
    }
    public void setDeptId(Long deptId) 
    {
        this.deptId = deptId;
    }

    public Long getDeptId() 
    {
        return deptId;
    }
    public void setApplicationNumber(String applicationNumber) 
    {
        this.applicationNumber = applicationNumber;
    }

    public String getApplicationNumber() 
    {
        return applicationNumber;
    }
    public void setCreditId(Long creditId) 
    {
        this.creditId = creditId;
    }

    public Long getCreditId() 
    {
        return creditId;
    }
    public void setCreditNumber(String creditNumber) 
    {
        this.creditNumber = creditNumber;
    }

    public String getCreditNumber() 
    {
        return creditNumber;
    }
    public void setApplicantId(Long applicantId) 
    {
        this.applicantId = applicantId;
    }

    public Long getApplicantId() 
    {
        return applicantId;
    }
    public void setApplicantName(String applicantName) 
    {
        this.applicantName = applicantName;
    }

    public String getApplicantName() 
    {
        return applicantName;
    }
    public void setFinancialInstitutionId(Long financialInstitutionId) 
    {
        this.financialInstitutionId = financialInstitutionId;
    }

    public Long getFinancialInstitutionId() 
    {
        return financialInstitutionId;
    }
    public void setFinancialInstitutionName(String financialInstitutionName) 
    {
        this.financialInstitutionName = financialInstitutionName;
    }

    public String getFinancialInstitutionName() 
    {
        return financialInstitutionName;
    }
    public void setRequestedAmount(BigDecimal requestedAmount) 
    {
        this.requestedAmount = requestedAmount;
    }

    public BigDecimal getRequestedAmount() 
    {
        return requestedAmount;
    }
    public void setApprovedAmount(BigDecimal approvedAmount) 
    {
        this.approvedAmount = approvedAmount;
    }

    public BigDecimal getApprovedAmount() 
    {
        return approvedAmount;
    }
    public void setInterestRate(BigDecimal interestRate) 
    {
        this.interestRate = interestRate;
    }

    public BigDecimal getInterestRate() 
    {
        return interestRate;
    }
    public void setFinancingTerm(Integer financingTerm) 
    {
        this.financingTerm = financingTerm;
    }

    public Integer getFinancingTerm() 
    {
        return financingTerm;
    }
    public void setFinancingStatus(String financingStatus) 
    {
        this.financingStatus = financingStatus;
    }

    public String getFinancingStatus() 
    {
        return financingStatus;
    }
    public void setRiskLevel(String riskLevel) 
    {
        this.riskLevel = riskLevel;
    }

    public String getRiskLevel() 
    {
        return riskLevel;
    }
    public void setRiskScore(BigDecimal riskScore) 
    {
        this.riskScore = riskScore;
    }

    public BigDecimal getRiskScore() 
    {
        return riskScore;
    }
    public void setApplicationMaterials(String applicationMaterials) 
    {
        this.applicationMaterials = applicationMaterials;
    }

    public String getApplicationMaterials() 
    {
        return applicationMaterials;
    }
    public void setApprovalOpinion(String approvalOpinion) 
    {
        this.approvalOpinion = approvalOpinion;
    }

    public String getApprovalOpinion() 
    {
        return approvalOpinion;
    }
    public void setApprovedBy(Long approvedBy) 
    {
        this.approvedBy = approvedBy;
    }

    public Long getApprovedBy() 
    {
        return approvedBy;
    }
    public void setApprovedTime(Date approvedTime) 
    {
        this.approvedTime = approvedTime;
    }

    public Date getApprovedTime() 
    {
        return approvedTime;
    }
    public void setDisbursementTime(Date disbursementTime) 
    {
        this.disbursementTime = disbursementTime;
    }

    public Date getDisbursementTime() 
    {
        return disbursementTime;
    }
    public void setDisbursementAccount(String disbursementAccount) 
    {
        this.disbursementAccount = disbursementAccount;
    }

    public String getDisbursementAccount() 
    {
        return disbursementAccount;
    }
    public void setDisbursementNote(String disbursementNote) 
    {
        this.disbursementNote = disbursementNote;
    }

    public String getDisbursementNote() 
    {
        return disbursementNote;
    }
    public void setRepaymentDate(Date repaymentDate) 
    {
        this.repaymentDate = repaymentDate;
    }

    public Date getRepaymentDate() 
    {
        return repaymentDate;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("financingId", getFinancingId())
            .append("deptId", getDeptId())
            .append("applicationNumber", getApplicationNumber())
            .append("creditId", getCreditId())
            .append("creditNumber", getCreditNumber())
            .append("applicantId", getApplicantId())
            .append("applicantName", getApplicantName())
            .append("financialInstitutionId", getFinancialInstitutionId())
            .append("financialInstitutionName", getFinancialInstitutionName())
            .append("requestedAmount", getRequestedAmount())
            .append("approvedAmount", getApprovedAmount())
            .append("interestRate", getInterestRate())
            .append("financingTerm", getFinancingTerm())
            .append("financingStatus", getFinancingStatus())
            .append("riskLevel", getRiskLevel())
            .append("riskScore", getRiskScore())
            .append("applicationMaterials", getApplicationMaterials())
            .append("approvalOpinion", getApprovalOpinion())
            .append("approvedBy", getApprovedBy())
            .append("approvedTime", getApprovedTime())
            .append("disbursementTime", getDisbursementTime())
            .append("disbursementAccount", getDisbursementAccount())
            .append("disbursementNote", getDisbursementNote())
            .append("repaymentDate", getRepaymentDate())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }
}