forked from xiongyuxing/tiku-backend.net
feat(security): add distributed authorization foundation
This commit is contained in:
@@ -389,7 +389,7 @@ public enum EntitlementScopeType { Tenant, Region, Module, Subject, QuestionBank
|
||||
public enum EntitlementStatus { Active, Revoked, Expired }
|
||||
public enum DiscountType { Percent, Fixed }
|
||||
public enum CouponRedemptionStatus { Claimed, Used, Expired, Cancelled }
|
||||
public enum TenantSubscriptionStatus { Trial, Active, PastDue, Cancelled }
|
||||
public enum TenantSubscriptionStatus { Trial, Active, PastDue, Cancelled, Expired }
|
||||
public enum CommerceRefundStatus { Requested, Approved, Processing, Succeeded, Failed, Rejected, Cancelled }
|
||||
public enum RefundEntitlementAction { None, RevokeOnSuccess }
|
||||
public enum ReconciliationBillType { Payment, Refund, Combined }
|
||||
|
||||
@@ -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 }
|
||||
|
||||
@@ -59,6 +59,14 @@ public sealed class TenantSettings : IHasTimestamps, ITenantOwned
|
||||
public DateTimeOffset UpdatedAt { get; set; } = DateTimeOffset.UtcNow;
|
||||
}
|
||||
|
||||
public sealed class TenantAuthPolicy : IHasTimestamps, ITenantOwned
|
||||
{
|
||||
public Guid TenantId { get; set; }
|
||||
public bool AllowExternalStudentSelfRegistration { get; set; }
|
||||
public DateTimeOffset CreatedAt { get; set; } = DateTimeOffset.UtcNow;
|
||||
public DateTimeOffset UpdatedAt { get; set; } = DateTimeOffset.UtcNow;
|
||||
}
|
||||
|
||||
public sealed class TenantFrontendConfig : AuditableTenantEntity
|
||||
{
|
||||
public int SchemaVersion { get; set; } = 1;
|
||||
|
||||
Reference in New Issue
Block a user