package com.hw.nativeapp.config.enums;

public enum NoticeCenterEnum {
    TYPE_0(0 , "销售出库"),
    TYPE_1(1, "采购入库"),
    TYPE_2(2 , "调拨出库"),
    TYPE_3(3, "售后"),
    TYPE_4(4 , "盘点"),
    TYPE_5(5, "调拨入库");

    NoticeCenterEnum(Integer code, String type){
        this.code = code;
        this.type = type;
    }

    public static String getTitleByType(Integer code){
        for (NoticeCenterEnum item : NoticeCenterEnum.values()){
            if (item.code.equals(code)){
                return item.getType();
            }
        }
        return "未知类型";
    }

    private Integer code;
    private String type;

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }
}
