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

namespace Nirvana.Common.ApiBase
{
    public class ReturnData<T>
    {
        /// <summary>
        /// 错误码,参考APIResult
        /// </summary>
        public int code { get; set; }

        /// <summary>
        /// 返回的消息
        /// </summary>
        public string message { get; set; }
        /// <summary>
        /// 返回的数据
        /// </summary>
        public T data { get; set; }

        public ReturnData(APIResult code,string message,T returndata)
        {
            this.code = (int)code;
            this.message = message;
            this.data = returndata;
        }
    }

    public class ReturnData1<T>
    {
        /// <summary>
        /// 错误码,参考APIResult
        /// </summary>
        public int code { get; set; }

        /// <summary>
        /// 返回的数据
        /// </summary>
        public T data { get; set; }

        public ReturnData1(APIResult code, string message, T returndata)
        {
            this.code = (int)code;
            this.data = returndata;
        }
    }
}
