Files
TakeoutSaaS.TenantApi/src/Application/TakeoutSaaS.Application/App/Stores/Queries/SearchStoresQuery.cs

43 lines
1009 B
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using MediatR;
using TakeoutSaaS.Application.App.Stores.Dto;
using TakeoutSaaS.Domain.Stores.Enums;
using TakeoutSaaS.Shared.Abstractions.Results;
namespace TakeoutSaaS.Application.App.Stores.Queries;
/// <summary>
/// 门店列表查询。
/// </summary>
public sealed class SearchStoresQuery : IRequest<PagedResult<StoreDto>>
{
/// <summary>
/// 商户 ID可选
/// </summary>
public long? MerchantId { get; init; }
/// <summary>
/// 状态过滤。
/// </summary>
public StoreStatus? Status { get; init; }
/// <summary>
/// 页码。
/// </summary>
public int Page { get; init; } = 1;
/// <summary>
/// 每页条数。
/// </summary>
public int PageSize { get; init; } = 20;
/// <summary>
/// 排序字段name/code/status/createdAt
/// </summary>
public string? SortBy { get; init; }
/// <summary>
/// 是否倒序。
/// </summary>
public bool SortDescending { get; init; } = true;
}