Files
TakeoutSaaS.TenantApi/src/Application/TakeoutSaaS.Application/App/Billings/Queries/GetBillingListQuery.cs
2026-02-17 12:12:01 +08:00

73 lines
1.8 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.Billings.Dto;
using TakeoutSaaS.Domain.Tenants.Enums;
using TakeoutSaaS.Shared.Abstractions.Results;
namespace TakeoutSaaS.Application.App.Billings.Queries;
/// <summary>
/// 分页查询账单列表。
/// </summary>
public sealed record GetBillingListQuery : IRequest<PagedResult<BillingListDto>>
{
/// <summary>
/// 租户 ID可选默认当前租户禁止跨租户
/// </summary>
public long? TenantId { get; init; }
/// <summary>
/// 账单状态筛选。
/// </summary>
public TenantBillingStatus? Status { get; init; }
/// <summary>
/// 账单类型筛选。
/// </summary>
public BillingType? BillingType { get; init; }
/// <summary>
/// 账单起始时间UTC筛选。
/// </summary>
public DateTime? StartDate { get; init; }
/// <summary>
/// 账单结束时间UTC筛选。
/// </summary>
public DateTime? EndDate { get; init; }
/// <summary>
/// 关键词搜索(账单编号)。
/// </summary>
public string? Keyword { get; init; }
/// <summary>
/// 最小应付金额筛选(包含)。
/// </summary>
public decimal? MinAmount { get; init; }
/// <summary>
/// 最大应付金额筛选(包含)。
/// </summary>
public decimal? MaxAmount { get; init; }
/// <summary>
/// 页码(从 1 开始)。
/// </summary>
public int PageNumber { get; init; } = 1;
/// <summary>
/// 每页条数。
/// </summary>
public int PageSize { get; init; } = 20;
/// <summary>
/// 排序字段DueDate/CreatedAt/AmountDue
/// </summary>
public string? SortBy { get; init; }
/// <summary>
/// 是否降序排序。
/// </summary>
public bool SortDesc { get; init; }
}