package com.iformall.enums;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by Stormeye on 2018/08/09.
 */
public enum EnumSubBusiness {

    SUB_BUSINESS_NULL(0,"无" ),
    SUB_BUSINESS_ID1 (1,"西餐"),
    SUB_BUSINESS_ID2 (2,"日本料理"),
    SUB_BUSINESS_ID3 (3,"韩国料理"),
    SUB_BUSINESS_ID4 (4,"东南亚菜"),
    SUB_BUSINESS_ID5 (5,"自助餐"),
    SUB_BUSINESS_ID6 (6,"火锅"),
    SUB_BUSINESS_ID7 (7,"特色菜"),
    SUB_BUSINESS_ID8 (8,"私房菜"),
    SUB_BUSINESS_ID9 (9,"素食"),
    SUB_BUSINESS_ID10(10,"烧烤"),
    SUB_BUSINESS_ID11(11,"小吃快餐"),
    SUB_BUSINESS_ID12(12,"川菜"),
    SUB_BUSINESS_ID13(13,"湘菜"),
    SUB_BUSINESS_ID14(14,"鲁菜"),
    SUB_BUSINESS_ID15(15,"粤菜"),
    SUB_BUSINESS_ID16(16,"湖北菜"),
    SUB_BUSINESS_ID17(17,"云贵菜"),
    SUB_BUSINESS_ID18(18,"东北菜"),
    SUB_BUSINESS_ID19(19,"面包店"),
    SUB_BUSINESS_ID20(20,"咖啡厅"),
    SUB_BUSINESS_ID21(21,"饮品店"),
    SUB_BUSINESS_ID22(22,"男装"),
    SUB_BUSINESS_ID23(23,"女装"),
    SUB_BUSINESS_ID24(24,"童装"),
    SUB_BUSINESS_ID25(25,"鞋帽"),
    SUB_BUSINESS_ID26(26,"配饰"),
    SUB_BUSINESS_ID27(27,"内衣"),
    SUB_BUSINESS_ID28(28,"亲子摄影"),
    SUB_BUSINESS_ID29(29,"亲子游乐"),
    SUB_BUSINESS_ID30(30,"幼儿教育"),
    SUB_BUSINESS_ID31(31,"孕产护理"),
    SUB_BUSINESS_ID32(32,"童车童床"),
    SUB_BUSINESS_ID33(33,"玩具"),
    SUB_BUSINESS_ID34(34,"喂养用品"),
    SUB_BUSINESS_ID35(35,"面部护肤"),
    SUB_BUSINESS_ID36(36,"香水彩妆"),
    SUB_BUSINESS_ID37(37,"男士护肤"),
    SUB_BUSINESS_ID38(38,"营养保健"),
    SUB_BUSINESS_ID39(39,"黄金"),
    SUB_BUSINESS_ID40(40,"钻石"),
    SUB_BUSINESS_ID41(41,"时尚饰品"),
    SUB_BUSINESS_ID42(42,"翡翠玉石"),
    SUB_BUSINESS_ID43(43,"钟表"),
    SUB_BUSINESS_ID44(44,"KTV"),
    SUB_BUSINESS_ID45(45,"轰趴馆"),
    SUB_BUSINESS_ID46(46,"DIY手工"),
    SUB_BUSINESS_ID47(47,"文化艺术"),
    SUB_BUSINESS_ID48(48,"游艺娱乐"),
    SUB_BUSINESS_ID49(49,"桌游"),
    SUB_BUSINESS_ID50(50,"运动健身"),
    SUB_BUSINESS_ID51(51,"婚纱摄影"),
    SUB_BUSINESS_ID52(52,"美容美发"),
    SUB_BUSINESS_ID53(53,"学习培训"),
    SUB_BUSINESS_ID54(54,"家具"),
    SUB_BUSINESS_ID55(55,"家饰"),
    SUB_BUSINESS_ID56(56,"家纺"),
    SUB_BUSINESS_ID57(57,"生活用品"),
    SUB_BUSINESS_ID58(58,"厨具"),
    SUB_BUSINESS_ID59(59,"家用电器"),
    SUB_BUSINESS_ID60(60,"数码产品"),
    SUB_BUSINESS_ID61(61,"手机通信"),
    SUB_BUSINESS_ID62(62,"电脑办公"),
    SUB_BUSINESS_ID63(63,"影音娱乐"),
    ;

    private static Map<Integer,EnumSubBusiness> map
            = new HashMap<Integer,EnumSubBusiness>();
    static {
        for (EnumSubBusiness value : values()) {
            map.put(value.code, value);
        }
    }

    public static EnumSubBusiness getEnum(Integer code) {
        if (code == null) return null;
        return map.get(code);
    }

    public static String getEnumMessage(Integer code) {
        if (code == null) return null;
        if (map.get(code) == null)
            return null;
        return map.get(code).getMessage();
    }

    private Integer code;
    private String message;

    EnumSubBusiness(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
