CSharp.Template/YuanXuan.IM.Common/Response/BaseResponse.cs

42 lines
896 B
C#
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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; }
}
}