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

73 lines
1.7 KiB
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? TenantId { get; init; }
/// <summary>
/// 商户 ID可选
/// </summary>
public long? MerchantId { get; init; }
/// <summary>
/// 状态过滤。
/// </summary>
public StoreStatus? Status { get; init; }
/// <summary>
/// 审核状态过滤。
/// </summary>
public StoreAuditStatus? AuditStatus { get; init; }
/// <summary>
/// 经营状态过滤。
/// </summary>
public StoreBusinessStatus? BusinessStatus { get; init; }
/// <summary>
/// 主体类型过滤。
/// </summary>
public StoreOwnershipType? OwnershipType { get; init; }
/// <summary>
/// 关键词(名称/编码)。
/// </summary>
public string? Keyword { get; init; }
/// <summary>
/// 是否包含已软删除数据。
/// </summary>
public bool IncludeDeleted { 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;
}