package org.springblade.modules.app.common.enums;

public enum WaybillClientStateEnum {

//    状态 ：1-进行中 2-已完成 3-已驳回 4-全部
    Going(1, "进行中"),
    FINISH(2, "已完成"),
    REJECT(3, "已驳回"),
    ALL(4, "全部"),
    ;
    private int code;
    private String text;

    WaybillClientStateEnum(int code, String text) {
        this.code = code;
        this.text = text;
    }

    public int getCode() {
        return code;
    }

    public String getText() {
        return text;
    }

    public static WaybillClientStateEnum findByCode(int code) {
        for (WaybillClientStateEnum demoEnum : values()) {
            if (code == demoEnum.getCode()) {
                return demoEnum;
            }
        }
        return null;
    }

}
