42 lines
896 B
C#
42 lines
896 B
C#
using System;
|
||
using System.Collections.Generic;
|
||
using System.Linq;
|
||
using System.Text;
|
||
using System.Threading.Tasks;
|
||
|
||
namespace YuanXuan.IM.Common.Response
|
||
{
|
||
public class BaseResponse
|
||
{
|
||
/// <summary>
|
||
/// 业务结果代码
|
||
/// </summary>
|
||
public int code { get; set; }
|
||
|
||
/// <summary>
|
||
/// 返回消息
|
||
/// </summary>
|
||
public string msg { get; set; } = "";
|
||
}
|
||
|
||
|
||
/// <summary>
|
||
/// 基础返回实体类
|
||
/// </summary>
|
||
/// <typeparam name="T"></typeparam>
|
||
public class BaseResponse<T> : BaseResponse
|
||
{
|
||
public BaseResponse(int code, string msg = "", T data = default)
|
||
{
|
||
this.code = code;
|
||
this.msg = msg;
|
||
this.data = data;
|
||
}
|
||
|
||
/// <summary>
|
||
/// 返回实体
|
||
/// </summary>
|
||
public T data { get; set; }
|
||
}
|
||
}
|