package com.qs.mp.common.enums;

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

/**
 *
 * 用户卡券使用状态
 *
 */
public enum CouponSettleStatusEnum implements IEnum<Integer> {

  INIT(1, "待结算"),
  FINISHED(2, "已结算"),;

  private final Integer value;
  private final String desc;

  CouponSettleStatusEnum(final Integer 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();
  }
}
