Files
tiku-backend.net/Tiku.Infrastructure/Modules/PlatformModule.cs
xiong 7adcb6a3d5
Some checks failed
ci / release-gate (push) Has been cancelled
refactor(jobs): modularize background job handlers
2026-08-03 13:28:21 +08:00

40 lines
2.3 KiB
C#

using Microsoft.Extensions.DependencyInjection;
using Tiku.Application.PlatformAdmin;
using Tiku.Application.PlatformAdmin.Operations;
using Tiku.Application.PlatformBilling;
using Tiku.Application.Jobs;
using Tiku.Infrastructure.PlatformAdmin;
using Tiku.Infrastructure.PlatformAdmin.Operations;
using Tiku.Infrastructure.PlatformAdmin.TenantProvisioning;
using Tiku.Infrastructure.PlatformBilling;
namespace Tiku.Infrastructure;
internal static class PlatformModule
{
internal static IServiceCollection AddPlatformModule(this IServiceCollection services)
{
services.AddScoped<IPlatformAdminService, PlatformAdminService>();
services.AddScoped<IBackgroundJobHandler, TenantExportJobHandler>();
services.AddScoped<IPlatformOperationsQueryService, PlatformOperationsQueryService>();
services.AddOptions<TenantProvisioningOptions>();
services.AddScoped<IPlatformQuestionBankService, PlatformQuestionBankService>();
services.AddScoped<IPlatformCrmAdminService, PlatformCrmAdminService>();
services.AddScoped<IPlatformSmsAdminService, PlatformSmsAdminService>();
services.AddScoped<IPlatformPaymentSettingsService, PlatformPaymentSettingsService>();
services.AddScoped<IPlatformApprovalService, PlatformApprovalService>();
services.AddScoped<IPlatformGovernanceService, PlatformGovernanceService>();
services.AddScoped<IPlatformTenantPaymentAdminService, PlatformTenantPaymentAdminService>();
services.AddScoped<ISaasCatalogAdminService, SaasCatalogAdminService>();
services.AddScoped<ITenantBillingService, TenantBillingService>();
services.AddScoped<IPlatformBillingAdminService, PlatformBillingAdminService>();
services.AddHttpClient<ICommercialBillingProcessor, CommercialBillingProcessor>();
services.AddScoped<IPlatformBillingPaymentGateway, PlatformBillingPaymentGateway>();
services.AddScoped<IPlatformBillingNotificationService, PlatformBillingNotificationService>();
services.AddScoped<IPlatformBillingSettlementService, PlatformBillingSettlementService>();
services.AddScoped<ISaasSubscriptionLifecycleService, SaasSubscriptionLifecycleService>();
services.AddOptions<SaasSubscriptionLifecycleOptions>();
return services;
}
}