package com.qs.mp.common.enums;

import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.annotation.JSONType;
import com.baomidou.mybatisplus.annotation.IEnum;
import com.qs.mp.common.json.EnumValueDeserializer;

/**
 *
 * 经销商门店类型
 *
 */
@JSONType(deserializer = EnumValueDeserializer.class)
public enum SiteTypeEnum implements IEnum<Integer> {

  CONVENIENCE_STORE(1, "便利店/超市/烟酒店"),
  FAST_FOOD(2,"快餐/正餐"),
  TEA_HOUSE(3, "咖啡/茶馆/甜品/奶茶"),
  KAT_BAR(5,"KTV/酒吧"),
  MASSAGE(6, "按摩/足浴/洗浴"),
  COSMETIC(7,"美容/美发"),
  HOTEL(8,"酒店/民宿"),
  CINEMA(9, "电影院"),
  SPORT(10,"台球/运动/健身"),
  BOARD_GAME(11,"棋牌室/剧本杀/密室/网咖"),
  PARENT_CHILD(12,"亲子/母婴/教育"),
  HOME_APPLIANCES(13,"家电/通信/电动车"),
  SCENIC_SPOT(14,"景区"),
  WECHAT_BUSINESS(15,"线上-微商"),
  OFFLINE_PLATFORM(16,"线下-平台"),
  OTHER(17,"其他"),
  STREET_STORE(18, "临街门店"),
  ENTERTAINMENT(19, "娱乐场所"),
  CHAIN_STORE(20, "品牌连锁店");

  private final int value;
  private final String desc;

  SiteTypeEnum(final int value, final String desc) {
    this.value = value;
    this.desc = desc;
  }

  @Override
  public Integer getValue() {
    return value;
  }

  /**
   * 重写toString，单个转化成json
   * @return
   */
  @Override
  public String toString() {
    JSONObject object = new JSONObject();
    object.put("value",value);
    object.put("desc", desc);
    return object.toString();
  }
}
