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 TenantSubscriptionDto
{
///
/// 订阅 ID。
///
[JsonConverter(typeof(SnowflakeIdJsonConverter))]
public long Id { get; init; }
///
/// 租户 ID。
///
[JsonConverter(typeof(SnowflakeIdJsonConverter))]
public long TenantId { get; init; }
///
/// 套餐 ID。
///
[JsonConverter(typeof(SnowflakeIdJsonConverter))]
public long TenantPackageId { get; init; }
///
/// 状态。
///
public SubscriptionStatus Status { get; init; }
///
/// 生效时间。
///
public DateTime EffectiveFrom { get; init; }
///
/// 到期时间。
///
public DateTime EffectiveTo { get; init; }
///
/// 下次扣费时间。
///
public DateTime? NextBillingDate { get; init; }
///
/// 是否自动续费。
///
public bool AutoRenew { get; init; }
}