package com.inkasso.factoring.common.enums;

/**
 * @author liutao
 * @date 2021.09.17
 */
public enum BiddingStageEnum {

    /**
     * 业务创建
     */
    CREATE("businessCreateStage", "业务创建"),
    /**
     * 模板审核
     */
    TEMPLATE_REVIEW("businessTemplateReviewStage", "模板审核"),
    /**
     * 保证方式确认
     **/
    GUARANTEE_MODE("businessGuaranteeModeStage", "保证方式确认"),
    /**
     * 保证金收款确认
     */
    BOND_COLLECTION("businessBondCollectionStage", "保证金收款确认"),
    /**
     * 中标确认
     */
    AWARD("businessAwardStage", "中标确认"),
    /**
     * 保证金退款确认
     **/
    REFUND_DEPOSIT("businessRefundDepositStage", "保证金退款确认"),
    /**
     * 无
     */
    EMPTY("businessEmptyStage", "无");
    /**
     * 编码
     */
    private String code;
    /**
     * 名称
     */
    private String cname;


    public String getCode() {
        return code;
    }

    public String getCname() {
        return cname;
    }

    BiddingStageEnum(String code, String cname) {
        this.code = code;
        this.cname = cname;
    }

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