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

public enum ApplicationTypeEnum {

    CONTRACT(1, "合同确认"),
    WAYBILL(2, "调运单确认"),
    TRANSPORT(3, "运输单确认"),
    SLAUGHTER_HOUSE(4, "代宰户确认"),
    WAYBILL_APPROVAL(5, "调运单审核"),
    USER(6, "用户审核"),
    ACCEPT_STAGE(7, "验收数据确认"),
    SLAUGHTER(8, "屠宰场确认代宰户备案单"),
    ;
    private int code;
    private String text;

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

    public int getCode() {
        return code;
    }

    public String getText() {
        return text;
    }

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

}
