package com.red.circle.order.inner.asserts;

import com.red.circle.framework.dto.IResponseErrorCode;
import com.red.circle.framework.dto.ResErrorCode;

/**
 * 支付相关: 8000~8100.
 *
 * @author pengliang on 2021/12/09
 */
@ResErrorCode(describe = "订单相关", minCode = 8000, maxCode = 8100)
public enum PayErrorCode implements IResponseErrorCode {

  /**
   * 没有合适的支付渠道.
   */
  NO_SUITABLE_PAYMENT_CHANNEL(8000, "No suitable payment channel"),

  /**
   * 不支持地区.
   */
  REGION_NOT_SUPPORTED(8001, "Region not supported"),

  /**
   * 未知的应用.
   */
  UNKNOWN_APPLICATION(8002, "Unknown application"),

  /**
   * 重复通知.
   */
  REPEATED_NOTICE(8003, "repeated notice"),
  ;


  private final Integer code;
  private final String message;

  PayErrorCode(Integer code, String message) {
    this.code = code;
    this.message = message;
  }

  @Override
  public Integer getCode() {
    return this.code;
  }

  @Override
  public String getMessage() {
    return message;
  }

  @Override
  public String getErrorCodeName() {
    return this.name();
  }


}
