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

public enum TaskModelEnum {

    CONTRACT(1, "备案管理"),
    ORDER(2, "调运单管理"),
    TRANSPORT(3, "运输单管理"),
    SLAUGHTER_HOUSE(4, "代宰户管理"),
    ;
    private int code;
    private String text;

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

    public int getCode() {
        return code;
    }

    public String getText() {
        return text;
    }

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

}
