feat: modularize external providers

This commit is contained in:
2026-07-27 17:47:21 +08:00
parent db4c7b4496
commit 70b99e6063
47 changed files with 1219 additions and 667 deletions

View File

@@ -193,15 +193,6 @@ public sealed class CouponRedemption : AuditableTenantEntity
public DateTimeOffset? UsedAt { get; set; }
}
public sealed class TenantPaymentAccount : AuditableTenantEntity
{
public string Provider { get; set; } = string.Empty;
public TenantPaymentMode Mode { get; set; } = TenantPaymentMode.PlatformCollect;
public string? DisplayName { get; set; }
public TenantPaymentAccountStatus Status { get; set; } = TenantPaymentAccountStatus.Disabled;
public JsonElement ConfigPublic { get; set; } = JsonDefaults.Object();
}
public sealed class TenantSubscription : AuditableTenantEntity
{
public string PlanCode { get; set; } = string.Empty;
@@ -364,8 +355,6 @@ 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 TenantPaymentMode { PlatformCollect, TenantCollect, ServiceProvider }
public enum TenantPaymentAccountStatus { Active, Disabled, Pending }
public enum TenantSubscriptionStatus { Trial, Active, PastDue, Cancelled }
public enum CommerceRefundStatus { Requested, Approved, Processing, Succeeded, Failed, Rejected, Cancelled }
public enum RefundEntitlementAction { None, RevokeOnSuccess }