齐越消息中心
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

34 lines
725 B

using System;
namespace QYMessageCenter.Common.Models
{
public class ApiResponse<T>
{
public bool Success { get { return Code == 200; } }
/// <summary>
/// 接口调用状态
/// </summary>
public int Code { get; set; } = 200;
/// <summary>
/// 返回消息
/// </summary>
public string Msg { get; set; }
/// <summary>
/// 数据内容
/// </summary>
public T Data { get; set; }
public static ApiResponse<T> Error(int code, string msg)
{
return new ApiResponse<T>() { Code = code, Msg = msg };
}
}
public class ApiResponse : ApiResponse<object>
{
}
}