package com.inkasso.factoring.common.enums;

import lombok.Getter;

/**
 * @Description 验收单业务阶段枚举类
 * @Author Yafan Wang
 * @Date 2023/12/19 11:30
 */
@Getter
public enum AcceptanceStageEnum {

    ACCEPTANCE_ENTER("acceptance_enter","验收单录入"),

    ACCEPTANCE_BUSINESS_APPROVAL("acceptance_business_approval","验收单业务审核"),

    ACCEPTANCE_APPROVAL("acceptance_approval","验收单法务审核"),

    ACCEPTANCE_SIGN_CONFIRM("acceptance_sign_confirm","签署确认"),

    ACCEPTANCE_SIGN_CONFIRM_APPROVAL("acceptance_sign_confirm_approval","签署确认审核"),

    ACCEPTANCE_PRICE_ADJUST("acceptance_price_adjust","单价调整"),

    ACCEPTANCE_PRICE_ADJUST_APPROVAL("acceptance_price_adjust_approval","单价调整审核");

    String code;

    String desc;

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


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

}
