using System;
using System.Collections.Generic;
using System.Text;
namespace Nirvana.Common.ApiBase
{
public class ResultInfo
{
public int code { get; set; }
public string message { get; set; }
public object data { get; set; }
public ResultInfo()
{
}
public ResultInfo(int codes,string msg,object datas=null)
{
this.code = codes;
this.message = msg;
this.data = datas;
}
}
public class ResultState
{
///
/// 失败 1
///
public static readonly int FAIL = 1;
///
/// 成功 0
///
public static readonly int SUCCESS = 0;
///
/// 微信获取不到用户信息
///
public static readonly int WXUNAUTHORITY = 2;
///
/// 登录成功
///
public static readonly int LOGINSUCCESS = 3;
///
/// 今日还未测测量
///
public static readonly int NORESULT = 4;
///
/// 设备未找到
///
public static readonly int DEVNOTFOUND = 5;
///
/// 403 状态码
///
public static readonly int Forbidden = 403;
///
/// 未找到
///
public static readonly int REDIRECT = 404;
///
/// 系统异常
///
public static readonly int SYSTEMERROR = 500;
///
/// 没有访问权限
///
public static readonly int NOAUTH = 40001;
///
/// TOKEN验证未通过
///
public static readonly int TOKEN = -100;
///
/// 请求禁用资源请求
///
public static readonly int DISAblEDRESOURCE = 100001;
///
/// 无资源
///
public static readonly int NORESOURCE = 100002;
}
public class ResultInfoV1
{
public string state { get; set; }
public string message { get; set; }
public object data { get; set; }
}
public enum ResultStateV1
{
//失败
FAIL = 1,
//成功
SUCCESS = 0,
//100段资源相关
//请求禁用资源请求
DISAblEDRESOURCE = 100001,
}
}