- 新增 AdminRolesController 实现角色 CRUD 和权限管理 - 新增 BillingsController 实现账单查询功能 - 新增 SubscriptionsController 实现订阅管理功能 - 新增 TenantPackagesController 实现套餐管理功能 - 新增租户详情、配额使用、账单列表等查询功能 - 新增 TenantPackage、TenantSubscription 等领域实体 - 新增相关枚举:SubscriptionStatus、TenantPackageType 等 - 更新 appsettings 配置文件 - 更新权限授权策略提供者 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
41 lines
950 B
C#
41 lines
950 B
C#
using TakeoutSaaS.Domain.Tenants.Enums;
|
||
using TakeoutSaaS.Shared.Abstractions.Entities;
|
||
|
||
namespace TakeoutSaaS.Domain.Tenants.Entities;
|
||
|
||
/// <summary>
|
||
/// 租户配额使用情况。
|
||
/// </summary>
|
||
public sealed class TenantQuotaUsage : AuditableEntityBase
|
||
{
|
||
/// <summary>
|
||
/// 租户 ID(雪花算法)。
|
||
/// </summary>
|
||
public long TenantId { get; set; }
|
||
|
||
/// <summary>
|
||
/// 配额类型。
|
||
/// </summary>
|
||
public TenantQuotaType QuotaType { get; set; }
|
||
|
||
/// <summary>
|
||
/// 配额上限值。
|
||
/// </summary>
|
||
public decimal LimitValue { get; set; }
|
||
|
||
/// <summary>
|
||
/// 已使用值。
|
||
/// </summary>
|
||
public decimal UsedValue { get; set; }
|
||
|
||
/// <summary>
|
||
/// 重置周期(如 monthly、yearly)。
|
||
/// </summary>
|
||
public string? ResetCycle { get; set; }
|
||
|
||
/// <summary>
|
||
/// 上次重置时间。
|
||
/// </summary>
|
||
public DateTime? LastResetAt { get; set; }
|
||
}
|