package com.qs.mp.common.enums;

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

/**
 *
 * 支付订单状态类型
 *
 */
public enum PayOrderStatusEnum implements IEnum<String> {

  SUCCESS("1", "支付成功"),
  WAIT("2", "待支付"),
  REFUND("3", "已退款");


  private final String value;
  private final String desc;

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