54 lines
3.1 KiB
C#
54 lines
3.1 KiB
C#
using Microsoft.Extensions.DependencyInjection;
|
|
using Tiku.Application.Commerce;
|
|
using Tiku.Application.Growth;
|
|
using Tiku.Application.Jobs;
|
|
using Tiku.Application.Notifications;
|
|
using Tiku.Application.Points;
|
|
using Tiku.Infrastructure.Commerce;
|
|
using Tiku.Infrastructure.Commerce.Reconciliation;
|
|
using Tiku.Infrastructure.Growth;
|
|
using Tiku.Infrastructure.Notifications;
|
|
using Tiku.Infrastructure.Points;
|
|
|
|
namespace Tiku.Infrastructure;
|
|
|
|
internal static class CommerceModule
|
|
{
|
|
internal static IServiceCollection AddCommerceModule(this IServiceCollection services)
|
|
{
|
|
services.AddScoped<CommerceServiceDependencies>();
|
|
services.AddScoped<ICommerceOrderService, CommerceOrderService>();
|
|
services.AddScoped<ICommercePaymentService, CommercePaymentService>();
|
|
services.AddScoped<ICommerceEntitlementService, CommerceEntitlementService>();
|
|
services.AddScoped<ICommerceCouponService, CommerceCouponService>();
|
|
services.AddScoped<ICommercePaymentNotificationService, CommercePaymentNotificationService>();
|
|
services.AddScoped<CommerceAdministrationDependencies>();
|
|
services.AddScoped<IPaymentConfigurationService, PaymentConfigurationService>();
|
|
services.AddScoped<ICommerceOrderAdministrationService, CommerceOrderAdministrationService>();
|
|
services.AddScoped<IActivationCodeAdministrationService, ActivationCodeAdministrationService>();
|
|
services.AddScoped<ICouponAdministrationService, CouponAdministrationService>();
|
|
services.AddScoped<IRefundAdministrationService, RefundAdministrationService>();
|
|
services.AddScoped<IReconciliationAdministrationService, ReconciliationAdministrationService>();
|
|
services.AddScoped<ICommerceAdjustmentService, CommerceAdjustmentService>();
|
|
services.AddScoped<IPointAdministrationService, PointAdministrationService>();
|
|
services.AddScoped<IBackgroundJobHandler, CommerceReconciliationJobHandler>();
|
|
services.AddScoped<IPointService, PointService>();
|
|
services.AddScoped<IReferralQrcodeGenerator, ReferralQrcodeGenerator>();
|
|
services.AddScoped<ReferralServiceDependencies>();
|
|
services.AddScoped<IStudentReferralService, StudentReferralService>();
|
|
services.AddScoped<IReferralAdministrationService, ReferralAdministrationService>();
|
|
services.AddScoped<IReferralAnalyticsService, ReferralAnalyticsService>();
|
|
services.AddScoped<ICrmService, CrmService>();
|
|
services.AddScoped<ICommissionService, CommissionService>();
|
|
services.AddScoped<INotificationProvider, InAppNotificationProvider>();
|
|
services.AddSingleton<ITenantSecretProtector, TenantSecretProtector>();
|
|
services.AddScoped<ITenantSecretService, TenantSecretService>();
|
|
services.AddScoped<IPaymentProviderConfigService, PaymentProviderConfigService>();
|
|
services.AddScoped<IPaymentProviderGateway, PaymentProviderGateway>();
|
|
services.AddScoped<IPaymentProvider, ManualPaymentProvider>();
|
|
services.AddScoped<IPaymentProvider, WechatPayProvider>();
|
|
services.AddScoped<IPaymentProvider, AlipayProvider>();
|
|
return services;
|
|
}
|
|
}
|