using System.Text.Json.Serialization; using TakeoutSaaS.Domain.Tenants.Enums; using TakeoutSaaS.Shared.Abstractions.Serialization; namespace TakeoutSaaS.Application.App.Tenants.Dto; /// /// 租户账单 DTO。 /// public sealed class TenantBillingDto { /// /// 账单 ID(雪花算法,序列化为字符串)。 /// [JsonConverter(typeof(SnowflakeIdJsonConverter))] public long Id { get; init; } /// /// 租户 ID(雪花算法,序列化为字符串)。 /// [JsonConverter(typeof(SnowflakeIdJsonConverter))] public long TenantId { get; init; } /// /// 账单编号。 /// public string StatementNo { get; init; } = string.Empty; /// /// 计费周期开始时间(UTC)。 /// public DateTime PeriodStart { get; init; } /// /// 计费周期结束时间(UTC)。 /// public DateTime PeriodEnd { get; init; } /// /// 应付金额。 /// public decimal AmountDue { get; init; } /// /// 已付金额。 /// public decimal AmountPaid { get; init; } /// /// 账单状态。 /// public TenantBillingStatus Status { get; init; } /// /// 到期日(UTC)。 /// public DateTime DueDate { get; init; } /// /// 账单明细 JSON。 /// public string? LineItemsJson { get; init; } }