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

namespace Txgy.RBS.Framework.Api
{
    public class ApiResult
    {
        /// <summary>
        /// 是否成功
        /// </summary>
        public bool Success
        {
            get
            {
                return string.IsNullOrWhiteSpace(Message);
            }
        }

        public HttpStatusCode Code { get; set; }

        /// <summary>
        /// 特指错误消息
        /// </summary>
        public string? Message { get; set; }

        /// <summary>
        /// 数据源
        /// </summary>
        public object? Data { get; set; }

        /// <summary>
        /// 额外数据
        /// </summary>
        public object? Tag { get; set; }
    }

    public enum ReponseCodeEnum
    {
        NoAuthorize = 1
    }
}
