20 lines
541 B
C#
20 lines
541 B
C#
namespace Store.Management.Api.Models;
|
|
|
|
public sealed class ApiResult<T>
|
|
{
|
|
public required int Code { get; init; }
|
|
public string? Msg { get; init; }
|
|
public string? TraceId { get; init; }
|
|
public T? Data { get; init; }
|
|
}
|
|
|
|
public sealed record PageResult<T>(long Total, IReadOnlyList<T> Items);
|
|
|
|
public class PageRequest
|
|
{
|
|
[System.ComponentModel.DataAnnotations.Range(1, 1000000)]
|
|
public int Page { get; set; } = 1;
|
|
[System.ComponentModel.DataAnnotations.Range(1, 200)]
|
|
public int PageSize { get; set; } = 50;
|
|
}
|