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

public enum TransportStageEnum {
    //1-合同 2-血检 3-空车 4-装运 5-A票 6-验收
    LOADING(1, "装运"),
    CHECKING(2, "过检"),
    ACCEPTING(3, "验收"),
    ;
    private int code;
    private String text;

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

    public int getCode() {
        return code;
    }

    public String getText() {
        return text;
    }

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

}
