30 lines
982 B
C#
30 lines
982 B
C#
using System.Text.Json.Serialization;
|
|
|
|
namespace WorkerService1.Dto.QueryResponse;
|
|
|
|
public class KSResponse<T>
|
|
{
|
|
[JsonPropertyName("code")] public int Code { get; set; }
|
|
[JsonPropertyName("msg")] public string Msg { get; set; }
|
|
[JsonPropertyName("data")] public T Data { get; set; }
|
|
}
|
|
|
|
public class UserResp : KSResponse<PageData<UserRecord>>
|
|
{
|
|
}
|
|
|
|
public class PageData<T>
|
|
{
|
|
[JsonPropertyName("pageNo")] public int PageNo { get; set; }
|
|
[JsonPropertyName("pageSize")] public int PageSize { get; set; }
|
|
[JsonPropertyName("totalRecords")] public int TotalRecords { get; set; }
|
|
[JsonPropertyName("records")] public T[] Records { get; set; }
|
|
[JsonPropertyName("totalPage")] public int TotalPage { get; set; }
|
|
}
|
|
|
|
public class UserRecord
|
|
{
|
|
[JsonPropertyName("id")] public string Id { get; set; }
|
|
[JsonPropertyName("userName")] public string UserName { get; set; }
|
|
[JsonPropertyName("userRealName")] public string UserRealName { get; set; }
|
|
} |