feat(security): add distributed authorization foundation

This commit is contained in:
2026-07-29 10:40:10 +08:00
parent c7f9a4e3c9
commit df88fa19cb
76 changed files with 22020 additions and 88 deletions

View File

@@ -18,6 +18,30 @@ public sealed class PlatformSaasPlan : AuditableEntity
public int SortOrder { get; set; }
}
public sealed class ProductModule : AuditableEntity
{
public string Code { get; set; } = string.Empty;
public string Name { get; set; } = string.Empty;
public string? Description { get; set; }
public ProductModuleStatus Status { get; set; } = ProductModuleStatus.Active;
public int SortOrder { get; set; }
}
public sealed class PlanModuleEntitlement : Entity
{
public string PlanCode { get; set; } = string.Empty;
public string ModuleCode { get; set; } = string.Empty;
public bool Enabled { get; set; } = true;
}
public sealed class TenantModuleOverride : AuditableTenantEntity
{
public string ModuleCode { get; set; } = string.Empty;
public TenantModuleOverrideMode Mode { get; set; } = TenantModuleOverrideMode.Disabled;
public DateTimeOffset? ExpiresAt { get; set; }
public string? Reason { get; set; }
}
public sealed class TenantBillingProfile : IHasTimestamps, ITenantOwned
{
public Guid TenantId { get; set; }
@@ -177,6 +201,8 @@ public sealed class PlatformDunningNotificationEvent : AuditableTenantEntity
public enum PlatformBillingCycle { Monthly, Quarterly, Yearly, OneTime }
public enum PlatformSaasPlanStatus { Active, Archived }
public enum ProductModuleStatus { Active, Archived }
public enum TenantModuleOverrideMode { Enabled, Disabled }
public enum TenantInvoiceTitleType { None, NormalVat, SpecialVat }
public enum TenantInvoiceType { Subscription, ServiceFee, UsageOverage, ManualAdjustment }
public enum TenantInvoiceStatus { Draft, Issued, Paid, Void, Overdue }