package com.qs.mp.common.enums;

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

/**
 *
 * 支付订单枚举类型
 *
 */
public enum BizTypeEnum implements IEnum<Integer> {

  CHANNEL_ORDER(1, "渠道盲票采购订单"),
  TICKET_ORDER(2, "用户盲票购买订单"),
  DELIVER_ORDER(3, "用户提货订单");


  private final int value;
  private final String desc;

  BizTypeEnum(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();
  }
}
