using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RMYY_CallCenter_Api.Utility
{

    public class AjaxResult
    {
        /// <summary>
        /// 操作结果类型
        /// </summary>
        public object state { get; set; }
        /// <summary>
        /// 获取 消息内容
        /// </summary>
        public string message { get; set; }
        /// <summary>
        /// 获取 返回数据
        /// </summary>
        public object data { get; set; }
    }
    /// <summary>
    /// 表示 ajax 操作结果类型的枚举
    /// </summary>
    public enum ResultTypes
    {
        /// <summary>
        /// 成功结果类型
        /// </summary>
        success = 200, //请求(或处理)成功,

        /// <summary>
        /// 成功结果类型
        /// </summary>
        redirect = 302, //跳转,

        /// <summary>
        /// 警告结果类型
        /// </summary>
        warning = 402,//警告

        /// <summary>
        /// 未授权
        /// </summary>
        unauthorized = 401,


        /// <summary>
        /// 请求参数不完整或不正确
        /// </summary>
        parameterError = 400,

        /// <summary>
        /// 请求TOKEN失效
        /// </summary>
        tokenInvalid = 403,

        /// <summary>
        /// HTTP请求类型不合法
        /// </summary>
        httpMehtodError = 405,


        /// <summary>
        /// HTTP请求类型不合法
        /// </summary>
        httpRequestError = 406,


        /// <summary>
        /// 该URL已经失效
        /// </summary>
        yrlExpireError = 407,

        /// <summary>
        /// 未登录或登录已过期
        /// </summary>
        notoken = 499,

        /// <summary>
        /// 异常结果类型
        /// </summary>
        error = 500

    }

}
