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