Files
tnsu-approval-route/backend/Tnsu.ApprovalRoute.Application/ApplicationServiceCollectionExtensions.cs
T
gorbenko.pavel 5bf38cd66f Добавить таблицу и API доступа к типу заявок
Настраиваемый список email по типу заявки: кто может видеть все заявки
этого типа, а не только свои. Отдельная ручка со списком email по типу —
её будет дёргать Power Automate.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-25 14:24:30 +05:00

39 lines
1.6 KiB
C#

using System.Reflection;
using FluentValidation;
using Microsoft.Extensions.DependencyInjection;
using Tnsu.ApprovalRoute.Application.Approvals;
using Tnsu.ApprovalRoute.Application.Reminders;
using Tnsu.ApprovalRoute.Application.ListPartitioning;
using Tnsu.ApprovalRoute.Application.Reports;
using Tnsu.ApprovalRoute.Application.RequestManage;
using Tnsu.ApprovalRoute.Application.RequestTypeAccesses;
using Tnsu.ApprovalRoute.Application.RequestTypes;
using Tnsu.ApprovalRoute.Application.TemplateRoutes;
using Tnsu.ApprovalRoute.Application.TemplateRouteSteps;
namespace Tnsu.ApprovalRoute.Application;
public static class ApplicationServiceCollectionExtensions
{
public static IServiceCollection AddApprovalRouteApplication(this IServiceCollection services)
{
services.AddScoped<ReminderService>();
services.AddScoped<RequestTypeService>();
services.AddScoped<RequestTypeAccessService>();
services.AddScoped<RequestManageService>();
services.AddScoped<ListPartitionRegistry>();
services.AddScoped<ListPartitionService>();
// Джоба резолвится Hangfire'ом из scope на каждое выполнение.
services.AddScoped<CreateNextListPartitionJob>();
services.AddScoped<AutoApproveService>();
services.AddScoped<AutoApproveJob>();
services.AddScoped<VacancyReportService>();
services.AddScoped<TemplateRouteService>();
services.AddScoped<TemplateRouteStepService>();
services.AddValidatorsFromAssembly(Assembly.GetExecutingAssembly());
return services;
}
}