64 lines
1.6 KiB
C#
64 lines
1.6 KiB
C#
using System.Text.Json.Serialization;
|
||
using TakeoutSaaS.Domain.Tenants.Enums;
|
||
using TakeoutSaaS.Shared.Abstractions.Serialization;
|
||
|
||
namespace TakeoutSaaS.Application.App.Tenants.Dto;
|
||
|
||
/// <summary>
|
||
/// 租户账单 DTO。
|
||
/// </summary>
|
||
public sealed class TenantBillingDto
|
||
{
|
||
/// <summary>
|
||
/// 账单 ID(雪花算法,序列化为字符串)。
|
||
/// </summary>
|
||
[JsonConverter(typeof(SnowflakeIdJsonConverter))]
|
||
public long Id { get; init; }
|
||
|
||
/// <summary>
|
||
/// 租户 ID(雪花算法,序列化为字符串)。
|
||
/// </summary>
|
||
[JsonConverter(typeof(SnowflakeIdJsonConverter))]
|
||
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; }
|
||
|
||
/// <summary>
|
||
/// 到期日(UTC)。
|
||
/// </summary>
|
||
public DateTime DueDate { get; init; }
|
||
|
||
/// <summary>
|
||
/// 账单明细 JSON。
|
||
/// </summary>
|
||
public string? LineItemsJson { get; init; }
|
||
}
|