using System.Text.Json.Serialization;
using TakeoutSaaS.Domain.Tenants.Enums;
using TakeoutSaaS.Shared.Abstractions.Serialization;
namespace TakeoutSaaS.Application.App.Tenants.Contracts;
///
/// 租户配额使用情况 DTO。
///
public sealed record TenantQuotaUsageDto
{
///
/// 租户 ID(雪花,序列化为字符串)。
///
[JsonConverter(typeof(SnowflakeIdJsonConverter))]
public long TenantId { get; init; }
///
/// 配额类型。
///
public TenantQuotaType QuotaType { get; init; }
///
/// 配额上限值。
///
public decimal LimitValue { get; init; }
///
/// 已使用值。
///
public decimal UsedValue { get; init; }
///
/// 剩余可用值。
///
public decimal RemainingValue { get; init; }
///
/// 重置周期(如 monthly、yearly)。
///
public string? ResetCycle { get; init; }
///
/// 上次重置时间。
///
public DateTime? LastResetAt { get; init; }
}