diff --git a/PARR.AIHIT/AIHIT/MappingProfiles/RequestToDomain.cs b/PARR.AIHIT/AIHIT/MappingProfiles/RequestToDomain.cs index 7662b1db..08451f73 100644 --- a/PARR.AIHIT/AIHIT/MappingProfiles/RequestToDomain.cs +++ b/PARR.AIHIT/AIHIT/MappingProfiles/RequestToDomain.cs @@ -1,4 +1,5 @@ using AutoMapper; +using PARR.DAL.Models; using PARR.DAL.Models.AIHIT; using PARR.DAL.Models.V1; using System.Xml; @@ -18,7 +19,11 @@ namespace PARR.AIHIT.MappingProfiles .ForMember(d => d.WorkGroup, o => o.MapFrom(s => (s.Attributes!["РАБОЧАЯ_ГР_ОТВ_ЗА_ЭК"] != null) ? s.Attributes!["РАБОЧАЯ_ГР_ОТВ_ЗА_ЭК"]!.Value.Trim() : "")) .ForMember(d => d.Responsible, o => o.MapFrom(s => s.Attributes!["ОТВЕТСТВЕННЫЙ_ЗА_ЭК"]!.Value.Trim())); - CreateMap(); + CreateMap() + .ForMember(d => d.HostName, o => o.MapFrom(s => s.EKFindCode))//TODO Определить имя хоста по + .ForMember(d => d.IP, o => o.MapFrom(s => s.IP)) + .ForMember(d => d.Status, o => o.MapFrom(s => s.Status)) + .ForMember(d => d.WorkGroup, o => o.MapFrom(s => s.WorkGroup)); //CreateMap() // .ForMember(d => d.HostName, o => o.MapFrom(s => s.HostName)) // .ForMember(d => d.IP, o => o.MapFrom(s => s.IP)) diff --git a/PARR.AIHIT/AIHIT/Syncher.cs b/PARR.AIHIT/AIHIT/Syncher.cs index 0298202e..15712106 100644 --- a/PARR.AIHIT/AIHIT/Syncher.cs +++ b/PARR.AIHIT/AIHIT/Syncher.cs @@ -6,9 +6,12 @@ using MimeKit; using PARR.AIHIT.Settings; using PARR.DAL.Contracts; using PARR.DAL.Extensions; +using PARR.DAL.Models; +using PARR.DAL.Models.AIHIT; using PARR.DAL.Models.V1; using PARR.DAL.Services.Interfaces; using PARR.DAL.Services.Interfaces.AIHIT; +using PARR.DAL.Services.Interfaces.V1; using PARR.Mail.Services; using System.Text; using System.Xml; @@ -20,6 +23,10 @@ namespace PARR.AIHIT private readonly ILogger logger; private readonly IMailService mailService; private readonly SyncherSettings syncherSettings; + private readonly V1_IHostService V1_hostService; + private readonly V1_IApplicationTypeService V1_appTypeService; + private readonly V1_IApplicationInHostService V1_appInHostService; + private readonly V1_IApplicationService V1_appService; private readonly IHostService hostService; private readonly IMapper mapper; private readonly IApplicationService appService; @@ -28,12 +35,16 @@ namespace PARR.AIHIT private readonly IRawDataEKService rawDataEKService; private readonly ISettingService settingService; - public List AppTypes { get; private set; } = new List(); + public List AppTypes { get; private set; } = new List(); public Syncher( ILogger logger, IMailService mailService, SyncherSettings syncherSettings, + V1_IHostService V1_hostService, + V1_IApplicationService V1_appService, + V1_IApplicationTypeService V1_appTypeService, + V1_IApplicationInHostService V1_appInHostService, IHostService hostService, IMapper mapper, IApplicationService appService, @@ -53,6 +64,10 @@ namespace PARR.AIHIT this.logger = logger; this.mailService = mailService; this.syncherSettings = syncherSettings; + this.V1_hostService = V1_hostService; + this.V1_appService = V1_appService; + this.V1_appTypeService = V1_appTypeService; + this.V1_appInHostService = V1_appInHostService; } private async Task GetAppTypesAsync() @@ -103,15 +118,15 @@ namespace PARR.AIHIT if (!linkEK.StartsWith("ВРТ")) continue; // var foundHost = await hostService.GetHostAsync(ip, linkEK, regionalEK); - var foundHost = await hostService.GetHostWithAppsAsync(ip, linkEK, regionalEK); + var foundHost = await V1_hostService.GetHostWithAppsAsync(ip, linkEK, regionalEK); var mappedHost = mapper.Map(vm); - var hostApplications = await GetAndFillApplicationsAsync(vm); + var hostApplications = await V1_GetAndFillApplicationsAsync(vm); if (foundHost == null) { // создаем - if (!await hostService.CreateAsync(mappedHost) || !await hostService.CommitAsync()) + if (!await V1_hostService.CreateAsync(mappedHost) || !await V1_hostService.CommitAsync()) { logger.LogError($"Не удалось создать узел {mappedHost.IP} {mappedHost.RegionalEK}"); continue; @@ -121,7 +136,7 @@ namespace PARR.AIHIT // Синхронизация Applications - await SyncApplicationAndHostAsync(foundHost, hostApplications); + await V1_SyncApplicationAndHostAsync(foundHost, hostApplications); } else { @@ -170,14 +185,14 @@ namespace PARR.AIHIT if (isChanged) { foundHost.DateModified = DateTimeOffset.UtcNow; - if (!await hostService.CommitAsync()) + if (!await V1_hostService.CommitAsync()) logger.LogError($"Не удалось обновить узел {mappedHost.IP} {mappedHost.RegionalEK}"); else logger.LogInformation($"----- Обновлён Host: {mappedHost.Id}, {mappedHost.LinkEK} -----"); } // Синхронизация Applications - await SyncApplicationAndHostAsync(foundHost, hostApplications, true); + await V1_SyncApplicationAndHostAsync(foundHost, hostApplications, true); } } } @@ -194,7 +209,7 @@ namespace PARR.AIHIT public async Task InvokeFromDatabase() { - + await GetAppTypesAsync(); /* //Получаем зоны ответственности из БД var respAreas = settingService.Get().Where(ra => ra.Group == AIHTITSettings.RespAreaGroupName).ToList(); @@ -294,11 +309,63 @@ namespace PARR.AIHIT var statusList = settingService.Get().Where(s => s.Group == AIHTITSettings.StatusGroupName).Select(s => s.Value.Trim()).ToList(); if (statusList == null || statusList.Count == 0) return; - var eks = rawDataEKService.Get().Where(e => e.IsActive == "t" && (e.Status != null && statusList.Contains(e.Status.Trim()))).ToList(); + var eks = rawDataEKService.Get().Where(e => e.IsActive == "t" + && (e.Status != null && statusList.Contains(e.Status.Trim())) + ).ToList(); - + foreach (var ek in eks) + { + if (ek.IP == null) continue; + var foundHost = await hostService.GetHostWithAppsAsync(ek.IP); + var mappedHost = mapper.Map(ek); + + var hostApplications = await GetAndFillApplicationsAsync(ek); + + if (foundHost == null) + { + // создаем + if (!await hostService.CreateAsync(mappedHost) || !await hostService.CommitAsync()) + { + logger.LogError($"Не удалось создать узел {mappedHost.IP}"); + continue; + } + else + logger.LogInformation($"----- Создан Host: {mappedHost.Id} -----"); + + + // Синхронизация Applications + await SyncApplicationAndHostAsync(foundHost, hostApplications); + } + else + { + // обновляем + var isChanged = false; + if (!foundHost.Status!.Equals(mappedHost.Status)) + { + foundHost.Status = mappedHost.Status; + isChanged = true; + } + else if (!foundHost.WorkGroup!.Equals(mappedHost.WorkGroup)) + { + foundHost.WorkGroup = mappedHost.WorkGroup; + isChanged = true; + } + + if (isChanged) + { + foundHost.DateModified = DateTimeOffset.UtcNow; + if (!await hostService.CommitAsync()) + logger.LogError($"Не удалось обновить узел {mappedHost.IP}"); + else + logger.LogInformation($"----- Обновлён Host: {mappedHost.Id} -----"); + } + + // Синхронизация Applications + await SyncApplicationAndHostAsync(foundHost, hostApplications, true); + } + } } - private async Task SyncApplicationAndHostAsync(V1_Host? host, List hostApplications, bool isUpdateDateModified = false) + private async Task V1_SyncApplicationAndHostAsync(V1_Host? host, List hostApplications, bool isUpdateDateModified = false) { var isUpdated = false; if (host == null) @@ -316,7 +383,7 @@ namespace PARR.AIHIT logger.LogInformation($"Host: {host.Id}, {host.LinkEK} добавление нового приложения Application {changedHostApp.Name}"); var newAppHost = new V1_ApplicationInHost { Id = Guid.NewGuid(), ApplicationId = changedHostApp.Id, HostId = host.Id }; - if (!await appInHostService.CreateAsync(newAppHost)) + if (!await V1_appInHostService.CreateAsync(newAppHost)) logger.LogError($"Не удалось создать ApplicationInHost {changedHostApp.Name}, host: {host.Id}, {host.LinkEK}"); isUpdated = true; @@ -330,11 +397,11 @@ namespace PARR.AIHIT if (appToRemove == null) { //todo remove appToRemove - var obj = await appInHostService.Get().FirstOrDefaultAsync(t => t.ApplicationId == app.Id && t.HostId == host.Id); + var obj = await V1_appInHostService.Get().FirstOrDefaultAsync(t => t.ApplicationId == app.Id && t.HostId == host.Id); if (obj != null) { logger.LogInformation($"Host: {host.Id}, {host.LinkEK} удаление неактуального приложения Application {app.Application?.Name}"); - appInHostService.Delete(obj); + V1_appInHostService.Delete(obj); isUpdated = true; } @@ -351,7 +418,7 @@ namespace PARR.AIHIT } - private async Task> GetAndFillApplicationsAsync(XmlNode vm) + private async Task> V1_GetAndFillApplicationsAsync(XmlNode vm) { logger.LogInformation($"--- Начало парсинга данных о программном обеспечении(СП, БД, ОС) из Xml документа от АИХ ИТ ---"); var applications = new List(); @@ -362,21 +429,21 @@ namespace PARR.AIHIT var appList = GetAppFromXML(vm?.Attributes?["СП"]?.Value); foreach (var app in appList) { - var created = await CreateAppIfNotExistAsync(app, ApplicationTypesEnum.APP); + var created = await V1_CreateAppIfNotExistAsync(app, ApplicationTypesEnum.APP); if (created != null) applications.Add(created); } var dbList = GetAppFromXML(vm?.Attributes?["СУБД"]?.Value); foreach (var db in dbList) { - var created = await CreateAppIfNotExistAsync(db, ApplicationTypesEnum.DB); + var created = await V1_CreateAppIfNotExistAsync(db, ApplicationTypesEnum.DB); if (created != null) applications.Add(created); } var osList = GetAppFromXML(vm?.Attributes?["ОС"]?.Value); foreach (var os in appList) { - var created = await CreateAppIfNotExistAsync(os, ApplicationTypesEnum.OS); + var created = await V1_CreateAppIfNotExistAsync(os, ApplicationTypesEnum.OS); if (created != null) applications.Add(created); } @@ -386,6 +453,99 @@ namespace PARR.AIHIT return applications; } + private async Task SyncApplicationAndHostAsync(Host? host, List hostApplications, bool isUpdateDateModified = false) + { + var isUpdated = false; + if (host == null) + return; + + logger.LogInformation($"--- Host: {host.Id}, начало синхронизации приложений ({hostApplications.Count()}) ---"); + + foreach (var changedHostApp in hostApplications) + { + var exist = host.ApplicationsInHosts.FirstOrDefault(a => a.ApplicationId == changedHostApp.Id); + + if (exist == null) + { + //add + logger.LogInformation($"Host: {host.Id}, добавление нового приложения Application {changedHostApp.Name}"); + + var newAppHost = new ApplicationInHost { Id = Guid.NewGuid(), ApplicationId = changedHostApp.Id, HostId = host.Id }; + if (!await appInHostService.CreateAsync(newAppHost)) + logger.LogError($"Не удалось создать ApplicationInHost {changedHostApp.Name}, host: {host.Id}"); + + isUpdated = true; + } + } + + foreach (var app in host.ApplicationsInHosts) + { + var appToRemove = hostApplications.FirstOrDefault(a => a.Id == app.Id); + + if (appToRemove == null) + { + //todo remove appToRemove + var obj = await appInHostService.Get().FirstOrDefaultAsync(t => t.ApplicationId == app.Id && t.HostId == host.Id); + if (obj != null) + { + logger.LogInformation($"Host: {host.Id}, удаление неактуального приложения Application {app.Application?.Name}"); + appInHostService.Delete(obj); + + isUpdated = true; + } + } + } + + if (isUpdated && isUpdateDateModified) + host.DateModified = DateTimeOffset.UtcNow; + + if (!await appInHostService.CommitAsync()) + logger.LogError($"Не удалось обновить ApplicationInHost для Host: {host.Id}"); + + logger.LogInformation($"=== Host: {host.Id} конец синхронизации приложений ==="); + + } + private async Task> GetAndFillApplicationsAsync(RawDataEK vm) + { + logger.LogInformation($"--- Начало парсинга данных о программном обеспечении(СП, БД, ОС) из АИХ ИТ ---"); + var applications = new List(); + + if (vm.APPType != null) + { + var appList = vm.APPType.Split(new char[] { ',', ';' }).Distinct().ToList(); + foreach (var app in appList) + { + var created = await CreateAppIfNotExistAsync(app, ApplicationTypesEnum.APP); + if (created != null) + applications.Add(created); + } + } + if (vm.DBType != null) + { + var appList = vm.DBType.Split(new char[] { ',', ';' }).Distinct().ToList(); + foreach (var app in appList) + { + var created = await CreateAppIfNotExistAsync(app, ApplicationTypesEnum.DB); + if (created != null) + applications.Add(created); + } + } + if (vm.ClientOS != null) + { + var appList = vm.ClientOS.Split(new char[] { ',', ';' }).Distinct().ToList(); + foreach (var app in appList) + { + var created = await CreateAppIfNotExistAsync(app, ApplicationTypesEnum.OS); + if (created != null) + applications.Add(created); + } + } + + logger.LogInformation($"=== Конец парсинга данных о программном обеспечении(СП, БД, ОС) из АИХ ИТ ==="); + + return applications; + } + private List GetAppFromXML(string? appField) { if (string.IsNullOrEmpty(appField)) @@ -419,7 +579,38 @@ namespace PARR.AIHIT return osList; } - private async Task CreateAppIfNotExistAsync(string appName, ApplicationTypesEnum type)//Application application) + private async Task V1_CreateAppIfNotExistAsync(string appName, ApplicationTypesEnum type)//Application application) + { + if (string.IsNullOrEmpty(appName) || string.IsNullOrWhiteSpace(appName)) return null; + + var existApp = await V1_appService.GetByNameAsync(appName); + if (existApp != null) + return existApp; + + //Создаем + var appType = GetAppTypeByName(type); + if (appType == null) + { + logger.LogError($"Не удалось создать запись в таблице Applications: {appName}, так как не получил AppType: {type.ToString()}"); + return null; + } + + var app = new V1_Application + { + Id = Guid.NewGuid(), + Name = appName.Trim(), + ApplicationTypeId = appType.Id + }; + + if (!await V1_appService.CreateAsync(app) || !await V1_appService.CommitAsync()) + logger.LogError($"Не удалось создать запись в таблице Application: {appName}, {app.ToJson()}"); + else + logger.LogInformation($"Создана запись а таблице Application: {appName}, {app.ToJson()}"); + + return await V1_appService.GetAsync(app.Id); + } + + private async Task CreateAppIfNotExistAsync(string appName, ApplicationTypesEnum type)//Application application) { if (string.IsNullOrEmpty(appName) || string.IsNullOrWhiteSpace(appName)) return null; @@ -435,7 +626,7 @@ namespace PARR.AIHIT return null; } - var app = new DAL.Models.V1.V1_Application + var app = new Application { Id = Guid.NewGuid(), Name = appName.Trim(), @@ -450,7 +641,7 @@ namespace PARR.AIHIT return await appService.GetAsync(app.Id); } - private V1_ApplicationType? GetAppTypeByName(ApplicationTypesEnum type) + private ApplicationType? GetAppTypeByName(ApplicationTypesEnum type) { var existType = AppTypes.FirstOrDefault(t => t.Name == type.ToString()); if (existType == null) diff --git a/PARR.API/Controllers/V1/JobController.cs b/PARR.API/Controllers/V1/JobController.cs index 7afee1c1..90be2188 100644 --- a/PARR.API/Controllers/V1/JobController.cs +++ b/PARR.API/Controllers/V1/JobController.cs @@ -11,31 +11,32 @@ using PARR.API.Services.Interfaces; using PARR.DAL.DomainModels; using PARR.DAL.Models.V1; using PARR.DAL.Services.Interfaces; +using PARR.DAL.Services.Interfaces.V1; namespace PARR.API.Controllers.V1 { public class JobController : BaseApiController { private readonly IMapper mapper; - private readonly IJobService jobService; + private readonly V1_IJobService jobService; //private readonly ISchedulerService schedulerService; private readonly IClientService clientService; - private readonly IHostService hostService; - private readonly IJobJournalService jobJournalService; + private readonly V1_IHostService v1_hostService; + private readonly V1_IJobJournalService jobJournalService; public JobController( IMapper mapper, - IJobService jobService, + V1_IJobService jobService, IClientService clientService, - IHostService hostService, - IJobJournalService jobJournalService + V1_IHostService v1_hostService, + V1_IJobJournalService jobJournalService ) { this.mapper = mapper; this.jobService = jobService; //this.schedulerService = schedulerService; this.clientService = clientService; - this.hostService = hostService; + this.v1_hostService = v1_hostService; this.jobJournalService = jobJournalService; } @@ -84,7 +85,7 @@ namespace PARR.API.Controllers.V1 var date = requestQuery.Date ?? DateTimeOffset.UtcNow; // С одним IP может быть несколько информационных систем, соответственного а таблице храниться несколько записей хостов с одинаковым IP - var hosts = await hostService.Get().Where(h => h.IP == ip).ToListAsync(); + var hosts = await v1_hostService.Get().Where(h => h.IP == ip).ToListAsync(); var hostJobsDict = new Dictionary>(); foreach (var host in hosts) diff --git a/PARR.DAL/Context/DataContext.cs b/PARR.DAL/Context/DataContext.cs index 6f6dd822..af2d143b 100644 --- a/PARR.DAL/Context/DataContext.cs +++ b/PARR.DAL/Context/DataContext.cs @@ -1,5 +1,6 @@ using Microsoft.EntityFrameworkCore; using PARR.DAL.Contracts; +using PARR.DAL.Models; using PARR.DAL.Models.AIHIT; using PARR.DAL.Models.V1; @@ -13,12 +14,16 @@ namespace PARR.DAL.Context public DbSet JobCategories { get; set; } public DbSet JobModes { get; set; } public DbSet JobStatuses { get; set; } - public DbSet Hosts { get; set; } + public DbSet V1_Hosts { get; set; } + public DbSet Hosts { get; set; } public DbSet Jobs { get; set; } public DbSet JobJournals { get; set; } - public DbSet Applications { get; set; } - public DbSet ApplicationTypes { get; set; } - public DbSet ApplicationsInHosts { get; set; } + public DbSet Applications { get; set; } + public DbSet ApplicationTypes { get; set; } + public DbSet ApplicationsInHosts { get; set; } + public DbSet V1_Applications { get; set; } + public DbSet V1_ApplicationTypes { get; set; } + public DbSet V1_ApplicationsInHosts { get; set; } public DbSet Settings { get; set; } public DbSet RawDataEKs { get; set; } //public DbSet Schedulers { get; set; } @@ -48,7 +53,7 @@ namespace PARR.DAL.Context }); - modelBuilder.Entity(f => + modelBuilder.Entity(f => { f.HasData( new() { Id = new Guid("32c28386-6f13-4f7b-8508-be165b7fabdb"), DateCreated = dateCreated, DateModified = null, Name = ApplicationTypesEnum.APP.ToString(), Description = "Поле СП xml АИХ ИТ" }, @@ -64,7 +69,6 @@ namespace PARR.DAL.Context new() { Id = new Guid("50F66704-4D26-4587-BB1E-DCA70C8F4B89"), DateCreated = dateCreated, DateModified = null, Group = AIHTITSettings.RespAreaGroupName, Name = "ZAB", Value = "94-ЗАБ", Description = "Зона ответственности" }, new() { Id = new Guid("1FD43634-4A06-4237-9727-EDFA6F3EEBE8"), DateCreated = dateCreated, DateModified = null, Group = AIHTITSettings.RespAreaGroupName, Name = "DVS", Value = "96-ДВС", Description = "Зона ответственности" }, new() { Id = new Guid("77C73C0A-8E4D-4676-B6E2-6A112F20E346"), DateCreated = dateCreated, DateModified = null, Group = AIHTITSettings.StatusGroupName, Name = "Exploitation", Value = "3-В эксплуатации", Description = "Статус актуальных ЭК" } - ); }); } diff --git a/PARR.DAL/Migrations/DataContextModelSnapshot.cs b/PARR.DAL/Migrations/DataContextModelSnapshot.cs index 5f36f793..7e2f641c 100644 --- a/PARR.DAL/Migrations/DataContextModelSnapshot.cs +++ b/PARR.DAL/Migrations/DataContextModelSnapshot.cs @@ -239,6 +239,141 @@ namespace PARR.DAL.Migrations }); }); + modelBuilder.Entity("PARR.DAL.Models.Application", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("ApplicationTypeId") + .HasColumnType("uuid"); + + b.Property("DateCreated") + .HasColumnType("timestamp with time zone"); + + b.Property("DateModified") + .HasColumnType("timestamp with time zone"); + + b.Property("Name") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("Id"); + + b.HasIndex("ApplicationTypeId"); + + b.ToTable("Applications"); + }); + + modelBuilder.Entity("PARR.DAL.Models.ApplicationInHost", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("ApplicationId") + .HasColumnType("uuid"); + + b.Property("DateCreated") + .HasColumnType("timestamp with time zone"); + + b.Property("DateModified") + .HasColumnType("timestamp with time zone"); + + b.Property("HostId") + .HasColumnType("uuid"); + + b.HasKey("Id"); + + b.HasIndex("ApplicationId"); + + b.HasIndex("HostId"); + + b.ToTable("ApplicationsInHost"); + }); + + modelBuilder.Entity("PARR.DAL.Models.ApplicationType", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("ApplicationTypeId") + .HasColumnType("uuid"); + + b.Property("DateCreated") + .HasColumnType("timestamp with time zone"); + + b.Property("DateModified") + .HasColumnType("timestamp with time zone"); + + b.Property("Description") + .HasColumnType("text"); + + b.Property("Name") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("Id"); + + b.HasIndex("ApplicationTypeId"); + + b.ToTable("ApplicationTypes"); + + b.HasData( + new + { + Id = new Guid("32c28386-6f13-4f7b-8508-be165b7fabdb"), + DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), + Description = "Поле СП xml АИХ ИТ", + Name = "APP" + }, + new + { + Id = new Guid("7848a96c-cdee-48c1-a786-de9cb889723a"), + DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), + Description = "Поле ОС xml АИХ ИТ", + Name = "OS" + }, + new + { + Id = new Guid("aae2636f-b93a-42dc-873e-0764a90a0a40"), + DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), + Description = "Поле СУБД xml АИХ ИТ", + Name = "DB" + }); + }); + + modelBuilder.Entity("PARR.DAL.Models.Host", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("DateCreated") + .HasColumnType("timestamp with time zone"); + + b.Property("DateModified") + .HasColumnType("timestamp with time zone"); + + b.Property("HostName") + .HasColumnType("text"); + + b.Property("IP") + .IsRequired() + .HasColumnType("text"); + + b.Property("Status") + .HasColumnType("text"); + + b.Property("WorkGroup") + .HasColumnType("text"); + + b.HasKey("Id"); + + b.ToTable("Hosts"); + }); + modelBuilder.Entity("PARR.DAL.Models.V1.V1_Application", b => { b.Property("Id") @@ -283,12 +418,17 @@ namespace PARR.DAL.Migrations b.Property("HostId") .HasColumnType("uuid"); + b.Property("V1_ApplicationId") + .HasColumnType("uuid"); + b.HasKey("Id"); b.HasIndex("ApplicationId"); b.HasIndex("HostId"); + b.HasIndex("V1_ApplicationId"); + b.ToTable("V1_ApplicationsInHost"); }); @@ -319,29 +459,6 @@ namespace PARR.DAL.Migrations b.HasIndex("V1_ApplicationTypeId"); b.ToTable("V1_ApplicationTypes"); - - b.HasData( - new - { - Id = new Guid("32c28386-6f13-4f7b-8508-be165b7fabdb"), - DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), - Description = "Поле СП xml АИХ ИТ", - Name = "APP" - }, - new - { - Id = new Guid("7848a96c-cdee-48c1-a786-de9cb889723a"), - DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), - Description = "Поле ОС xml АИХ ИТ", - Name = "OS" - }, - new - { - Id = new Guid("aae2636f-b93a-42dc-873e-0764a90a0a40"), - DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), - Description = "Поле СУБД xml АИХ ИТ", - Name = "DB" - }); }); modelBuilder.Entity("PARR.DAL.Models.V1.V1_Host", b => @@ -604,6 +721,43 @@ namespace PARR.DAL.Migrations b.ToTable("V1_JobTypes"); }); + modelBuilder.Entity("PARR.DAL.Models.Application", b => + { + b.HasOne("PARR.DAL.Models.ApplicationType", "ApplicationType") + .WithMany() + .HasForeignKey("ApplicationTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ApplicationType"); + }); + + modelBuilder.Entity("PARR.DAL.Models.ApplicationInHost", b => + { + b.HasOne("PARR.DAL.Models.Application", "Application") + .WithMany("ApplicationsInHosts") + .HasForeignKey("ApplicationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("PARR.DAL.Models.Host", "Host") + .WithMany("ApplicationsInHosts") + .HasForeignKey("HostId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Application"); + + b.Navigation("Host"); + }); + + modelBuilder.Entity("PARR.DAL.Models.ApplicationType", b => + { + b.HasOne("PARR.DAL.Models.ApplicationType", null) + .WithMany("ApplicationTypes") + .HasForeignKey("ApplicationTypeId"); + }); + modelBuilder.Entity("PARR.DAL.Models.V1.V1_Application", b => { b.HasOne("PARR.DAL.Models.V1.V1_ApplicationType", "ApplicationType") @@ -617,8 +771,8 @@ namespace PARR.DAL.Migrations modelBuilder.Entity("PARR.DAL.Models.V1.V1_ApplicationInHost", b => { - b.HasOne("PARR.DAL.Models.V1.V1_Application", "Application") - .WithMany("ApplicationsInHosts") + b.HasOne("PARR.DAL.Models.Application", "Application") + .WithMany() .HasForeignKey("ApplicationId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); @@ -629,6 +783,10 @@ namespace PARR.DAL.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); + b.HasOne("PARR.DAL.Models.V1.V1_Application", null) + .WithMany("V1_ApplicationsInHosts") + .HasForeignKey("V1_ApplicationId"); + b.Navigation("Application"); b.Navigation("Host"); @@ -637,13 +795,13 @@ namespace PARR.DAL.Migrations modelBuilder.Entity("PARR.DAL.Models.V1.V1_ApplicationType", b => { b.HasOne("PARR.DAL.Models.V1.V1_ApplicationType", null) - .WithMany("ApplicationTypes") + .WithMany("V1_ApplicationTypes") .HasForeignKey("V1_ApplicationTypeId"); }); modelBuilder.Entity("PARR.DAL.Models.V1.V1_Job", b => { - b.HasOne("PARR.DAL.Models.V1.V1_Application", "Application") + b.HasOne("PARR.DAL.Models.Application", "Application") .WithMany() .HasForeignKey("ApplicationId") .OnDelete(DeleteBehavior.Cascade) @@ -699,16 +857,31 @@ namespace PARR.DAL.Migrations b.Navigation("Status"); }); - modelBuilder.Entity("PARR.DAL.Models.V1.V1_Application", b => + modelBuilder.Entity("PARR.DAL.Models.Application", b => { b.Navigation("ApplicationsInHosts"); }); - modelBuilder.Entity("PARR.DAL.Models.V1.V1_ApplicationType", b => + modelBuilder.Entity("PARR.DAL.Models.ApplicationType", b => { b.Navigation("ApplicationTypes"); }); + modelBuilder.Entity("PARR.DAL.Models.Host", b => + { + b.Navigation("ApplicationsInHosts"); + }); + + modelBuilder.Entity("PARR.DAL.Models.V1.V1_Application", b => + { + b.Navigation("V1_ApplicationsInHosts"); + }); + + modelBuilder.Entity("PARR.DAL.Models.V1.V1_ApplicationType", b => + { + b.Navigation("V1_ApplicationTypes"); + }); + modelBuilder.Entity("PARR.DAL.Models.V1.V1_Host", b => { b.Navigation("ApplicationsInHosts"); diff --git a/PARR.DAL/ParrDalInstaller.cs b/PARR.DAL/ParrDalInstaller.cs index 9bd41adb..2f6341e8 100644 --- a/PARR.DAL/ParrDalInstaller.cs +++ b/PARR.DAL/ParrDalInstaller.cs @@ -2,10 +2,13 @@ using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using PARR.DAL.Context; +using PARR.DAL.Services.Implementation; using PARR.DAL.Services.Implementations; using PARR.DAL.Services.Implementations.AIHIT; +using PARR.DAL.Services.Implementations.V1; using PARR.DAL.Services.Interfaces; using PARR.DAL.Services.Interfaces.AIHIT; +using PARR.DAL.Services.Interfaces.V1; namespace PARR.DAL { @@ -17,12 +20,16 @@ namespace PARR.DAL opt.UseNpgsql(configuration.GetConnectionString("DefaultConnection")) ); + services.AddTransient(); services.AddTransient(); services.AddTransient(); services.AddTransient(); services.AddTransient(); - services.AddTransient(); - services.AddTransient(); + services.AddTransient(); + services.AddTransient(); + services.AddTransient(); + services.AddTransient(); + services.AddTransient(); services.AddTransient(); services.AddTransient(); //services.AddTransient(); diff --git a/PARR.DAL/Services/Implementations/ApplicationInHostService.cs b/PARR.DAL/Services/Implementations/ApplicationInHostService.cs index caeae063..52d87dd1 100644 --- a/PARR.DAL/Services/Implementations/ApplicationInHostService.cs +++ b/PARR.DAL/Services/Implementations/ApplicationInHostService.cs @@ -1,13 +1,13 @@ using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Logging; using PARR.DAL.Context; -using PARR.DAL.Models.V1; +using PARR.DAL.Models; using PARR.DAL.Services.Abstracts; using PARR.DAL.Services.Interfaces; namespace PARR.DAL.Services.Implementations { - internal class ApplicationInHostService : BaseService, IApplicationInHostService + internal class ApplicationInHostService : BaseService, IApplicationInHostService { private readonly DataContext dataContext; private readonly ILogger logger; @@ -18,7 +18,7 @@ namespace PARR.DAL.Services.Implementations this.logger = logger; } - protected override DbSet EntitySet => dataContext.ApplicationsInHosts; + protected override DbSet EntitySet => dataContext.ApplicationsInHosts; protected override DataContext EntitiContext => dataContext; } diff --git a/PARR.DAL/Services/Implementations/ApplicationService.cs b/PARR.DAL/Services/Implementations/ApplicationService.cs index 42562063..bdfae542 100644 --- a/PARR.DAL/Services/Implementations/ApplicationService.cs +++ b/PARR.DAL/Services/Implementations/ApplicationService.cs @@ -1,13 +1,13 @@ using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Logging; using PARR.DAL.Context; -using PARR.DAL.Models.V1; +using PARR.DAL.Models; using PARR.DAL.Services.Abstracts; using PARR.DAL.Services.Interfaces; namespace PARR.DAL.Services.Implementations { - internal class ApplicationService : BaseService, IApplicationService + internal class ApplicationService : BaseService, IApplicationService { private readonly DataContext dataContext; private readonly ILogger logger; @@ -18,11 +18,11 @@ namespace PARR.DAL.Services.Implementations this.logger = logger; } - protected override DbSet EntitySet => dataContext.Applications; + protected override DbSet EntitySet => dataContext.Applications; protected override DataContext EntitiContext => dataContext; - public async Task GetByNameAsync(string appName) + public async Task GetByNameAsync(string appName) { return await EntitySet.FirstOrDefaultAsync(t => t.Name.ToLower() == appName.Trim().ToLower()); } diff --git a/PARR.DAL/Services/Implementations/ApplicationTypeService.cs b/PARR.DAL/Services/Implementations/ApplicationTypeService.cs index 5d446c91..552f176d 100644 --- a/PARR.DAL/Services/Implementations/ApplicationTypeService.cs +++ b/PARR.DAL/Services/Implementations/ApplicationTypeService.cs @@ -1,13 +1,13 @@ using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Logging; using PARR.DAL.Context; -using PARR.DAL.Models.V1; +using PARR.DAL.Models; using PARR.DAL.Services.Abstracts; using PARR.DAL.Services.Interfaces; -namespace PARR.DAL.Services.Implementations +namespace PARR.DAL.Services.Implementation { - internal class ApplicationTypeService : BaseService, IApplicationTypeService + internal class ApplicationTypeService : BaseService, IApplicationTypeService { private readonly DataContext dataContext; private readonly ILogger logger; @@ -18,7 +18,7 @@ namespace PARR.DAL.Services.Implementations this.logger = logger; } - protected override DbSet EntitySet => dataContext.ApplicationTypes; + protected override DbSet EntitySet => dataContext.ApplicationTypes; protected override DataContext EntitiContext => dataContext; } diff --git a/PARR.DAL/Services/Implementations/HostService.cs b/PARR.DAL/Services/Implementations/HostService.cs index ed95a003..34fdd3fb 100644 --- a/PARR.DAL/Services/Implementations/HostService.cs +++ b/PARR.DAL/Services/Implementations/HostService.cs @@ -1,18 +1,18 @@ using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Logging; using PARR.DAL.Context; -using PARR.DAL.Models.V1; +using PARR.DAL.Models; using PARR.DAL.Services.Abstracts; using PARR.DAL.Services.Interfaces; namespace PARR.DAL.Services.Implementations { - internal class HostService : BaseService, IHostService + internal class HostService : BaseService, IHostService { private readonly DataContext dataContext; private readonly ILogger logger; - protected override DbSet EntitySet => dataContext.Hosts; + protected override DbSet EntitySet => dataContext.Hosts; protected override DataContext EntitiContext => dataContext; public HostService(DataContext dataContext, ILogger logger) : base(logger) @@ -21,7 +21,7 @@ namespace PARR.DAL.Services.Implementations this.logger = logger; } - public async Task GetHostWithAppsAsync(string IP, string RegionalEK) + public async Task GetHostWithAppsAsync(string IP) { //try @@ -37,21 +37,7 @@ namespace PARR.DAL.Services.Implementations return await EntitySet .Include(t => t.ApplicationsInHosts).ThenInclude(a => a.Application).ThenInclude(t => t.ApplicationType) .AsSplitQuery() - .FirstOrDefaultAsync(h => h.IP == IP && h.RegionalEK == RegionalEK); - } - - public async Task GetHostWithAppsAsync(string IP, string linkEK, string regionalEK) - { - return await EntitySet - .Include(t => t.ApplicationsInHosts).ThenInclude(a => a.Application).ThenInclude(t => t.ApplicationType) - .AsSplitQuery() - .FirstOrDefaultAsync(h => h.IP == IP && h.LinkEK == linkEK && h.RegionalEK == regionalEK); - } - - - public async Task GetHostByIPAndRegionalEKAsync(string IP, string RegionalEK) - { - return await EntitySet.FirstOrDefaultAsync(h => h.IP == IP && h.RegionalEK == RegionalEK); + .FirstOrDefaultAsync(h => h.IP == IP); } //public async Task GetHostByRegionalEKAsync(string RegionalEK)И diff --git a/PARR.DAL/Services/Implementations/JobCategoryService.cs b/PARR.DAL/Services/Implementations/JobCategoryService.cs deleted file mode 100644 index f685d3a9..00000000 --- a/PARR.DAL/Services/Implementations/JobCategoryService.cs +++ /dev/null @@ -1,24 +0,0 @@ -using Microsoft.EntityFrameworkCore; -using Microsoft.Extensions.Logging; -using PARR.DAL.Context; -using PARR.DAL.Models.V1; -using PARR.DAL.Services.Abstracts; -using PARR.DAL.Services.Interfaces; - -namespace PARR.DAL.Services.Implementations -{ - internal class JobCategoryService : BaseService, IJobCategoryService - { - private readonly DataContext dataContext; - private readonly ILogger logger; - - public JobCategoryService(DataContext dataContext, ILogger logger) : base(logger) - { - this.dataContext = dataContext; - this.logger = logger; - } - protected override DbSet EntitySet => dataContext.JobCategories; - - protected override DataContext EntitiContext => dataContext; - } -} diff --git a/PARR.DAL/Services/Implementations/JobJournalService.cs b/PARR.DAL/Services/Implementations/JobJournalService.cs deleted file mode 100644 index 1b55731e..00000000 --- a/PARR.DAL/Services/Implementations/JobJournalService.cs +++ /dev/null @@ -1,41 +0,0 @@ -using Microsoft.EntityFrameworkCore; -using Microsoft.Extensions.Logging; -using PARR.DAL.Context; -using PARR.DAL.Extensions; -using PARR.DAL.Models.V1; -using PARR.DAL.Services.Abstracts; -using PARR.DAL.Services.Interfaces; - -namespace PARR.DAL.Services.Implementations -{ - internal class JobJournalService : BaseService, IJobJournalService - { - private readonly DataContext dataContext; - private readonly ILogger logger; - - public JobJournalService(DataContext dataContext, ILogger logger) : base(logger) - { - this.dataContext = dataContext; - this.logger = logger; - } - protected override DbSet EntitySet => dataContext.JobJournals; - - protected override DataContext EntitiContext => dataContext; - - public async Task GetLastAsync(Guid jobId, Guid hostId, DateTimeOffset date) - { - //var n=DateTimeOffset.UtcNow; - //var opers = await EntitySet - // .Where(j => j.JobId == jobId && j.HostId == hostId && (j.DateOper!=DateTimeOffset.MinValue))/*date.StartOfDay()*/// && j.DateOper < date.EndOfDay())) - // .OrderBy(t => t.DateOper) - // .LastOrDefaultAsync(); - - var opers = await EntitySet - .Where(j => j.JobId == jobId && j.HostId == hostId && j.DateOper.DateTime.Date == date.DateTime.Date) - .OrderBy(t => t.DateOper) - .LastOrDefaultAsync(); - - return opers; - } - } -} diff --git a/PARR.DAL/Services/Implementations/JobModeService.cs b/PARR.DAL/Services/Implementations/JobModeService.cs deleted file mode 100644 index 9fab17f1..00000000 --- a/PARR.DAL/Services/Implementations/JobModeService.cs +++ /dev/null @@ -1,24 +0,0 @@ -using Microsoft.EntityFrameworkCore; -using Microsoft.Extensions.Logging; -using PARR.DAL.Context; -using PARR.DAL.Models.V1; -using PARR.DAL.Services.Abstracts; -using PARR.DAL.Services.Interfaces; - -namespace PARR.DAL.Services.Implementations -{ - internal class JobModeService : BaseService, IJobModeService - { - private readonly DataContext dataContext; - private readonly ILogger logger; - - public JobModeService(DataContext dataContext, ILogger logger) : base(logger) - { - this.dataContext = dataContext; - this.logger = logger; - } - protected override DbSet EntitySet => dataContext.JobModes; - - protected override DataContext EntitiContext => dataContext; - } -} diff --git a/PARR.DAL/Services/Implementations/JobService.cs b/PARR.DAL/Services/Implementations/JobService.cs deleted file mode 100644 index 707d7680..00000000 --- a/PARR.DAL/Services/Implementations/JobService.cs +++ /dev/null @@ -1,30 +0,0 @@ -using Microsoft.EntityFrameworkCore; -using Microsoft.Extensions.Logging; -using PARR.DAL.Context; -using PARR.DAL.Models.V1; -using PARR.DAL.Services.Abstracts; -using PARR.DAL.Services.Interfaces; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace PARR.DAL.Services.Implementations -{ - internal class JobService : BaseService, IJobService - { - private readonly DataContext dataContext; - private readonly ILogger logger; - - public JobService(DataContext dataContext,ILogger logger):base(logger) - { - this.dataContext = dataContext; - this.logger = logger; - } - protected override DbSet EntitySet => dataContext.Jobs; - - protected override DataContext EntitiContext => dataContext; - - } -} diff --git a/PARR.DAL/Services/Implementations/JobStatusService.cs b/PARR.DAL/Services/Implementations/JobStatusService.cs deleted file mode 100644 index 17c09ce2..00000000 --- a/PARR.DAL/Services/Implementations/JobStatusService.cs +++ /dev/null @@ -1,24 +0,0 @@ -using Microsoft.EntityFrameworkCore; -using Microsoft.Extensions.Logging; -using PARR.DAL.Context; -using PARR.DAL.Models.V1; -using PARR.DAL.Services.Abstracts; -using PARR.DAL.Services.Interfaces; - -namespace PARR.DAL.Services.Implementations -{ - internal class JobStatusService : BaseService, IJobStatusService - { - private readonly DataContext dataContext; - private readonly ILogger logger; - - public JobStatusService(DataContext dataContext, ILogger logger) : base(logger) - { - this.dataContext = dataContext; - this.logger = logger; - } - protected override DbSet EntitySet => dataContext.JobStatuses; - - protected override DataContext EntitiContext => dataContext; - } -} diff --git a/PARR.DAL/Services/Implementations/SchedulerService.cs b/PARR.DAL/Services/Implementations/SchedulerService.cs deleted file mode 100644 index 1bbf1b18..00000000 --- a/PARR.DAL/Services/Implementations/SchedulerService.cs +++ /dev/null @@ -1,22 +0,0 @@ -using Microsoft.EntityFrameworkCore; -using Microsoft.Extensions.Logging; -using PARR.DAL.Context; -using PARR.DAL.Models; -using PARR.DAL.Services.Abstracts; -using PARR.DAL.Services.Interfaces; - -namespace PARR.DAL.Services.Implementations -{ - //internal class SchedulerService : BaseService, ISchedulerService - //{ - // private readonly DataContext dataContext; - - // public SchedulerService(DataContext dataContext, ILogger logger) : base(logger) - // { - // this.dataContext = dataContext; - // } - // protected override DbSet EntitySet => dataContext.Schedulers; - - // protected override DataContext EntitiContext => dataContext; - //} -} diff --git a/PARR.DAL/Services/Interfaces/IApplicationInHostService.cs b/PARR.DAL/Services/Interfaces/IApplicationInHostService.cs index 0b5c67d3..c1dc02b3 100644 --- a/PARR.DAL/Services/Interfaces/IApplicationInHostService.cs +++ b/PARR.DAL/Services/Interfaces/IApplicationInHostService.cs @@ -1,9 +1,9 @@ -using PARR.DAL.Models.V1; +using PARR.DAL.Models; using PARR.DAL.Services.Interfaces.Base; namespace PARR.DAL.Services.Interfaces { - public interface IApplicationInHostService : IBaseService + public interface IApplicationInHostService : IBaseService { } } diff --git a/PARR.DAL/Services/Interfaces/IApplicationService.cs b/PARR.DAL/Services/Interfaces/IApplicationService.cs index 263cce09..4834fc61 100644 --- a/PARR.DAL/Services/Interfaces/IApplicationService.cs +++ b/PARR.DAL/Services/Interfaces/IApplicationService.cs @@ -1,10 +1,10 @@ -using PARR.DAL.Models.V1; +using PARR.DAL.Models; using PARR.DAL.Services.Interfaces.Base; namespace PARR.DAL.Services.Interfaces { - public interface IApplicationService : IBaseService + public interface IApplicationService : IBaseService { - Task GetByNameAsync(string appName); + Task GetByNameAsync(string appName); } } diff --git a/PARR.DAL/Services/Interfaces/IApplicationTypeService.cs b/PARR.DAL/Services/Interfaces/IApplicationTypeService.cs index 6f9373f2..93f6622e 100644 --- a/PARR.DAL/Services/Interfaces/IApplicationTypeService.cs +++ b/PARR.DAL/Services/Interfaces/IApplicationTypeService.cs @@ -1,9 +1,9 @@ -using PARR.DAL.Models.V1; +using PARR.DAL.Models; using PARR.DAL.Services.Interfaces.Base; namespace PARR.DAL.Services.Interfaces { - public interface IApplicationTypeService : IBaseService + public interface IApplicationTypeService : IBaseService { } } diff --git a/PARR.DAL/Services/Interfaces/IHostService.cs b/PARR.DAL/Services/Interfaces/IHostService.cs index 264c3371..2ae00399 100644 --- a/PARR.DAL/Services/Interfaces/IHostService.cs +++ b/PARR.DAL/Services/Interfaces/IHostService.cs @@ -1,13 +1,11 @@ -using PARR.DAL.Models.V1; +using PARR.DAL.Models; +using PARR.DAL.Models.V1; using PARR.DAL.Services.Interfaces.Base; namespace PARR.DAL.Services.Interfaces { - public interface IHostService : IBaseService + public interface IHostService : IBaseService { - Task GetHostByIPAndRegionalEKAsync(string IP, string RegionalEK); - Task GetHostWithAppsAsync(string IP, string linkEK, string regionalEK); - //Task GetHostByRegionalEKAsync(string LinkEK); - //Task UpdateAsync(Host host); + Task GetHostWithAppsAsync(string IP); } } diff --git a/PARR.DAL/Services/Interfaces/IJobCategoryService.cs b/PARR.DAL/Services/Interfaces/IJobCategoryService.cs deleted file mode 100644 index 21125a99..00000000 --- a/PARR.DAL/Services/Interfaces/IJobCategoryService.cs +++ /dev/null @@ -1,9 +0,0 @@ -using PARR.DAL.Models.V1; -using PARR.DAL.Services.Interfaces.Base; - -namespace PARR.DAL.Services.Interfaces -{ - internal interface IJobCategoryService : IBaseService - { - } -} diff --git a/PARR.DAL/Services/Interfaces/IJobJournalService.cs b/PARR.DAL/Services/Interfaces/IJobJournalService.cs deleted file mode 100644 index a08c4b12..00000000 --- a/PARR.DAL/Services/Interfaces/IJobJournalService.cs +++ /dev/null @@ -1,9 +0,0 @@ -using PARR.DAL.Models.V1; - -namespace PARR.DAL.Services.Interfaces -{ - public interface IJobJournalService - { - Task GetLastAsync(Guid jobId, Guid hostId, DateTimeOffset date); - } -} diff --git a/PARR.DAL/Services/Interfaces/IJobModeService.cs b/PARR.DAL/Services/Interfaces/IJobModeService.cs deleted file mode 100644 index 7d35c788..00000000 --- a/PARR.DAL/Services/Interfaces/IJobModeService.cs +++ /dev/null @@ -1,9 +0,0 @@ -using PARR.DAL.Models.V1; -using PARR.DAL.Services.Interfaces.Base; - -namespace PARR.DAL.Services.Interfaces -{ - internal interface IJobModeService : IBaseService - { - } -} diff --git a/PARR.DAL/Services/Interfaces/IJobService.cs b/PARR.DAL/Services/Interfaces/IJobService.cs deleted file mode 100644 index 620367aa..00000000 --- a/PARR.DAL/Services/Interfaces/IJobService.cs +++ /dev/null @@ -1,9 +0,0 @@ -using PARR.DAL.Models.V1; -using PARR.DAL.Services.Interfaces.Base; - -namespace PARR.DAL.Services.Interfaces -{ - public interface IJobService : IBaseService - { - } -} diff --git a/PARR.DAL/Services/Interfaces/IJobStatusService.cs b/PARR.DAL/Services/Interfaces/IJobStatusService.cs deleted file mode 100644 index 78af4cb2..00000000 --- a/PARR.DAL/Services/Interfaces/IJobStatusService.cs +++ /dev/null @@ -1,9 +0,0 @@ -using PARR.DAL.Models.V1; -using PARR.DAL.Services.Interfaces.Base; - -namespace PARR.DAL.Services.Interfaces -{ - internal interface IJobStatusService : IBaseService - { - } -} diff --git a/PARR.DAL/Services/Interfaces/ISchedulerService.cs b/PARR.DAL/Services/Interfaces/ISchedulerService.cs deleted file mode 100644 index b8fcfb83..00000000 --- a/PARR.DAL/Services/Interfaces/ISchedulerService.cs +++ /dev/null @@ -1,9 +0,0 @@ -using PARR.DAL.Models; -using PARR.DAL.Services.Interfaces.Base; - -namespace PARR.DAL.Services.Interfaces -{ - //public interface ISchedulerService : IBaseService - //{ - //} -}