add login type for auth,add list baseResponse

This commit is contained in:
2020-01-06 12:48:43 +08:00
parent 3edb472bfb
commit e8d5496ef5
4 changed files with 41 additions and 9 deletions
+17 -1
View File
@@ -4,6 +4,9 @@ using System.Text.Json.Serialization;
namespace YYApi.Communications
{
/// <summary>
/// 基础相应
/// </summary>
public class BaseResponse
{
/// <summary>
@@ -37,6 +40,7 @@ namespace YYApi.Communications
SetCode(200);
}
/// <summary>
/// 返回指定代码的描述
/// </summary>
@@ -90,8 +94,20 @@ namespace YYApi.Communications
{
IgnoreReadOnlyProperties = true,
PropertyNamingPolicy = JsonNamingPolicy.CamelCase,
Converters = { new JsonStringEnumConverter() }
Converters = {new JsonStringEnumConverter()}
});
}
}
/// <summary>
/// 动态内容
/// </summary>
/// <typeparam name="T"></typeparam>
public class BaseResponse<T> : BaseResponse
{
/// <summary>
/// 动态内容
/// </summary>
public T Data { get; set; }
}
}