feat(saas): implement marketplace and tenant onboarding

This commit is contained in:
2026-07-29 13:58:59 +08:00
parent 76606029e2
commit 6db200a2fc
145 changed files with 16862 additions and 94529 deletions

View File

@@ -0,0 +1,31 @@
namespace Tiku.Application.Security;
public sealed record ReconcileFeatureUsageRequest(
Guid TenantId,
SystemScopeCallerType CallerType,
string Caller,
string Reason,
string CorrelationId);
public sealed record ReconciledFeatureUsage(
string MetricCode,
long ActualValue,
long LimitValue,
bool Warning,
bool Exceeded);
public interface IFeatureUsageReconciliationService
{
Task<IReadOnlyCollection<ReconciledFeatureUsage>> ReconcileTenantAsync(
ReconcileFeatureUsageRequest request,
CancellationToken cancellationToken = default);
Task<int> ProcessDueAsync(CancellationToken cancellationToken = default);
}
public sealed class FeatureUsageReconciliationOptions
{
public bool Enabled { get; set; } = true;
public int BatchSize { get; set; } = 100;
public int IntervalMinutes { get; set; } = 60;
}