package com.qs.mp.common.enums;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.annotation.IEnum;

/**
 * 微信openid账号类型
 *
 * @author zhongcp
 * @Date 2021/9/2
 */
public enum WxActTypeEnum implements IEnum<String> {

  GZH("gzh", "云管铺公众号"),
  MP("mp", "云管铺小程序");

  private final String value;
  private final String desc;

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

  @Override
  public String 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();
  }
}
