57 lines
1.4 KiB
C#
57 lines
1.4 KiB
C#
using MediatR;
|
||
using TakeoutSaaS.Application.App.Tenants.Dto;
|
||
using TakeoutSaaS.Domain.Tenants.Enums;
|
||
|
||
namespace TakeoutSaaS.Application.App.Tenants.Commands;
|
||
|
||
/// <summary>
|
||
/// 创建租户账单命令。
|
||
/// </summary>
|
||
public sealed record CreateTenantBillingCommand : IRequest<TenantBillingDto>
|
||
{
|
||
/// <summary>
|
||
/// 租户 ID(雪花算法)。
|
||
/// </summary>
|
||
public long TenantId { get; init; }
|
||
|
||
/// <summary>
|
||
/// 账单编号。
|
||
/// </summary>
|
||
public string StatementNo { get; init; } = string.Empty;
|
||
|
||
/// <summary>
|
||
/// 计费周期开始时间(UTC)。
|
||
/// </summary>
|
||
public DateTime PeriodStart { get; init; }
|
||
|
||
/// <summary>
|
||
/// 计费周期结束时间(UTC)。
|
||
/// </summary>
|
||
public DateTime PeriodEnd { get; init; }
|
||
|
||
/// <summary>
|
||
/// 应付金额。
|
||
/// </summary>
|
||
public decimal AmountDue { get; init; }
|
||
|
||
/// <summary>
|
||
/// 已付金额。
|
||
/// </summary>
|
||
public decimal AmountPaid { get; init; }
|
||
|
||
/// <summary>
|
||
/// 账单状态。
|
||
/// </summary>
|
||
public TenantBillingStatus Status { get; init; } = TenantBillingStatus.Pending;
|
||
|
||
/// <summary>
|
||
/// 到期日(UTC)。
|
||
/// </summary>
|
||
public DateTime DueDate { get; init; }
|
||
|
||
/// <summary>
|
||
/// 账单明细 JSON。
|
||
/// </summary>
|
||
public string? LineItemsJson { get; init; }
|
||
}
|