package com.inkasso.factoring.financingmanagement.enums;

/**
 * @Description : 融资申请当前阶段枚举项
 * @Author : L.Jia
 * @Date: 2023-12-27 11:31
 */
public enum FinancingCurrentStageEnum {

    /**
     * 额度支用
     */
    REVIEW_QUOTA_DISBURSE("review_quota_disburse", "额度支用"),

    /**
     * 支用审核
     */
    REVIEW_QUOTA_DISBURSE_APPROVAL("review_quota_disburse_approval", "支用审核"),

    /**
     * 合同制作
     */
    CONTRACT_MAKING("contract_making", "合同制作"),

    /**
     * 合同签署
     */
    CONTRACT_SIGNING("contract_signing", "合同签署"),

    /**
     * 合同审核
     */
    CONTRACT_APPROVAL("contract_approval", "合同审核"),

    /**
     * 付款申请
     */
    PAYMENT_APPLY("payment_apply", "付款申请"),

    /**
     * 付款审核
     */
    PAYMENT_APPROVAL("payment_approval", "付款审核");

    String code;

    String desc;

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    FinancingCurrentStageEnum(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }


    public static FinancingCurrentStageEnum getByCode(String code) {
        for (FinancingCurrentStageEnum ft : values()) {
            if (ft.code.equals(code)) {
                return ft;
            }
        }
        return null;
    }
}
