diff --git a/PARR.API.sln b/PARR.API.sln index f9bf7d73..80777162 100644 --- a/PARR.API.sln +++ b/PARR.API.sln @@ -96,6 +96,12 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PARR.TemplateUpdater", "PAR EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PARR.DAL.IntegrationTests", "PARR.DAL.IntegrationTests\PARR.DAL.IntegrationTests.csproj", "{D1C65DB8-77BC-00FD-5BA1-6C7303FD093C}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PARR.Core", "PARR.Core\PARR.Core.csproj", "{E93DFC30-9886-486A-9F67-F782ABE0D1E0}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PARR.Domain", "PARR.Domain\PARR.Domain.csproj", "{3740461A-7235-4C26-81F3-3977529D646D}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PARR.Infrastructure", "PARR.Infrastructure\PARR.Infrastructure.csproj", "{8EB3BC72-2EFA-48AA-A305-C28ABEDB03AD}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -268,6 +274,18 @@ Global {D1C65DB8-77BC-00FD-5BA1-6C7303FD093C}.Debug|Any CPU.Build.0 = Debug|Any CPU {D1C65DB8-77BC-00FD-5BA1-6C7303FD093C}.Release|Any CPU.ActiveCfg = Release|Any CPU {D1C65DB8-77BC-00FD-5BA1-6C7303FD093C}.Release|Any CPU.Build.0 = Release|Any CPU + {E93DFC30-9886-486A-9F67-F782ABE0D1E0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E93DFC30-9886-486A-9F67-F782ABE0D1E0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E93DFC30-9886-486A-9F67-F782ABE0D1E0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E93DFC30-9886-486A-9F67-F782ABE0D1E0}.Release|Any CPU.Build.0 = Release|Any CPU + {3740461A-7235-4C26-81F3-3977529D646D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3740461A-7235-4C26-81F3-3977529D646D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3740461A-7235-4C26-81F3-3977529D646D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3740461A-7235-4C26-81F3-3977529D646D}.Release|Any CPU.Build.0 = Release|Any CPU + {8EB3BC72-2EFA-48AA-A305-C28ABEDB03AD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8EB3BC72-2EFA-48AA-A305-C28ABEDB03AD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8EB3BC72-2EFA-48AA-A305-C28ABEDB03AD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8EB3BC72-2EFA-48AA-A305-C28ABEDB03AD}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/PARR.API/Contracts/V1/Requests/AgentHistoryRequest.cs b/PARR.API/Contracts/V1/Requests/AgentHistoryRequest.cs index 0ae12b55..7620f616 100644 --- a/PARR.API/Contracts/V1/Requests/AgentHistoryRequest.cs +++ b/PARR.API/Contracts/V1/Requests/AgentHistoryRequest.cs @@ -1,4 +1,4 @@ -using PARR.DAL.Contracts; +using PARR.Domain.Enums; namespace PARR.API.Contracts.V1.Requests { diff --git a/PARR.API/Contracts/V1/Requests/JobAutoControlRequest.cs b/PARR.API/Contracts/V1/Requests/JobAutoControlRequest.cs index d4584e3a..8f2f3113 100644 --- a/PARR.API/Contracts/V1/Requests/JobAutoControlRequest.cs +++ b/PARR.API/Contracts/V1/Requests/JobAutoControlRequest.cs @@ -1,4 +1,4 @@ -using PARR.DAL.Contracts; +using PARR.Domain.Enums; namespace PARR.API.Contracts.V1.Requests { diff --git a/PARR.API/Contracts/V1/Requests/Queries/RobotHistoryQuery.cs b/PARR.API/Contracts/V1/Requests/Queries/RobotHistoryQuery.cs index 1f68b7cd..40440021 100644 --- a/PARR.API/Contracts/V1/Requests/Queries/RobotHistoryQuery.cs +++ b/PARR.API/Contracts/V1/Requests/Queries/RobotHistoryQuery.cs @@ -1,5 +1,5 @@ using PARR.Constants; -using PARR.DAL.Contracts; +using PARR.Domain.Enums; namespace PARR.API.Contracts.V1.Requests.Queries { diff --git a/PARR.API/Contracts/V1/Requests/Queries/StatRobotHistoryQuery.cs b/PARR.API/Contracts/V1/Requests/Queries/StatRobotHistoryQuery.cs index 88b53c5e..a616e7bf 100644 --- a/PARR.API/Contracts/V1/Requests/Queries/StatRobotHistoryQuery.cs +++ b/PARR.API/Contracts/V1/Requests/Queries/StatRobotHistoryQuery.cs @@ -1,4 +1,4 @@ -using PARR.DAL.Contracts; +using PARR.Domain.Enums; namespace PARR.API.Contracts.V1.Requests.Queries { diff --git a/PARR.API/Contracts/V1/Requests/Queries/TemplateHistoryQuery.cs b/PARR.API/Contracts/V1/Requests/Queries/TemplateHistoryQuery.cs index 994b2578..49d9e73c 100644 --- a/PARR.API/Contracts/V1/Requests/Queries/TemplateHistoryQuery.cs +++ b/PARR.API/Contracts/V1/Requests/Queries/TemplateHistoryQuery.cs @@ -1,4 +1,4 @@ -using PARR.Constants; +using PARR.Domain.Enums; namespace PARR.API.Contracts.V1.Requests.Queries { diff --git a/PARR.API/Contracts/V1/Requests/RobotHistoryRequest.cs b/PARR.API/Contracts/V1/Requests/RobotHistoryRequest.cs index 5bb30e25..872f2e54 100644 --- a/PARR.API/Contracts/V1/Requests/RobotHistoryRequest.cs +++ b/PARR.API/Contracts/V1/Requests/RobotHistoryRequest.cs @@ -1,4 +1,4 @@ -using PARR.DAL.Contracts; +using PARR.Domain.Enums; namespace PARR.API.Contracts.V1.Requests { diff --git a/PARR.API/Contracts/V1/Requests/RobotTaskChangeRobotStatusRequest.cs b/PARR.API/Contracts/V1/Requests/RobotTaskChangeRobotStatusRequest.cs index 3c81f652..5af28fdc 100644 --- a/PARR.API/Contracts/V1/Requests/RobotTaskChangeRobotStatusRequest.cs +++ b/PARR.API/Contracts/V1/Requests/RobotTaskChangeRobotStatusRequest.cs @@ -1,4 +1,4 @@ -using PARR.DAL.Contracts; +using PARR.Domain.Enums; namespace PARR.API.Contracts.V1.Requests { diff --git a/PARR.API/Contracts/V1/Responses/JobGroupTypeResponse.cs b/PARR.API/Contracts/V1/Responses/JobGroupTypeResponse.cs index ea2e0f28..ab36b909 100644 --- a/PARR.API/Contracts/V1/Responses/JobGroupTypeResponse.cs +++ b/PARR.API/Contracts/V1/Responses/JobGroupTypeResponse.cs @@ -1,4 +1,4 @@ -using PARR.DAL.Contracts; +using PARR.Domain.Enums; namespace PARR.API.Contracts.V1.Responses { diff --git a/PARR.API/Controllers/V1/DistributorController.cs b/PARR.API/Controllers/V1/DistributorController.cs index 10dce4f5..f97d71cc 100644 --- a/PARR.API/Controllers/V1/DistributorController.cs +++ b/PARR.API/Controllers/V1/DistributorController.cs @@ -9,10 +9,9 @@ using PARR.API.Services.Interfaces; using PARR.API.Settings; using PARR.BLL.Domain.Mq; using PARR.BLL.Services.Interfaces; -using PARR.Common.Domain; using PARR.Constants; -using System.Text.Encodings.Web; -using System.Text.Json; +using PARR.Domain.Entities.Base.History; +using PARR.Domain.Enums; namespace PARR.API.Controllers.V1 { diff --git a/PARR.API/Controllers/V1/GeneratorTemplateController.cs b/PARR.API/Controllers/V1/GeneratorTemplateController.cs index 18ff6243..11d69836 100644 --- a/PARR.API/Controllers/V1/GeneratorTemplateController.cs +++ b/PARR.API/Controllers/V1/GeneratorTemplateController.cs @@ -9,9 +9,9 @@ using PARR.API.Services.Interfaces; using PARR.API.Settings; using PARR.BLL.Domain.Mq; using PARR.BLL.Services.Interfaces; -using PARR.Common.Domain; using PARR.Constants; -using System.Text.Json; +using PARR.Domain.Entities.Base.History; +using PARR.Domain.Enums; namespace PARR.API.Controllers.V1 { diff --git a/PARR.API/Controllers/V1/JobController.cs b/PARR.API/Controllers/V1/JobController.cs index d358c7bf..24ddf246 100644 --- a/PARR.API/Controllers/V1/JobController.cs +++ b/PARR.API/Controllers/V1/JobController.cs @@ -15,10 +15,7 @@ using PARR.API.Settings; using PARR.BLL.Domain.Mq; using PARR.BLL.Helpers; using PARR.BLL.Services.Interfaces; -using PARR.Common.Domain; using PARR.Constants; -using PARR.DAL.Cache.Services; -using PARR.DAL.Contracts; using PARR.DAL.DomainModels; using PARR.DAL.DomainServices.Interfaces; using PARR.DAL.DomainServices.UnitFilterService; @@ -27,7 +24,8 @@ using PARR.DAL.Models.Job; using PARR.DAL.Services.Interfaces; using PARR.DAL.Services.Interfaces.Job; using PARR.DAL.Services.Interfaces.Unit; -using System.Text.Json; +using PARR.Domain.Entities.Base.History; +using PARR.Domain.Enums; namespace PARR.API.Controllers.V1 { diff --git a/PARR.API/Controllers/V1/JobGroupController.cs b/PARR.API/Controllers/V1/JobGroupController.cs index 07cc0edc..0e3fb20b 100644 --- a/PARR.API/Controllers/V1/JobGroupController.cs +++ b/PARR.API/Controllers/V1/JobGroupController.cs @@ -15,9 +15,7 @@ using PARR.API.Settings; using PARR.BLL.Domain.Mq; using PARR.BLL.Helpers; using PARR.BLL.Services.Interfaces; -using PARR.Common.Domain; using PARR.Constants; -using PARR.DAL.Contracts; using PARR.DAL.DomainModels; using PARR.DAL.DomainServices.Interfaces; using PARR.DAL.Models; @@ -25,6 +23,8 @@ using PARR.DAL.Models.Job; using PARR.DAL.Services.Interfaces; using PARR.DAL.Services.Interfaces.Job; using PARR.DAL.Services.Interfaces.Schedule; +using PARR.Domain.Entities.Base.History; +using PARR.Domain.Enums; namespace PARR.API.Controllers.V1 { diff --git a/PARR.API/Controllers/V1/JobGroupUpdateNextRunController.cs b/PARR.API/Controllers/V1/JobGroupUpdateNextRunController.cs index 588f004d..76c3f4be 100644 --- a/PARR.API/Controllers/V1/JobGroupUpdateNextRunController.cs +++ b/PARR.API/Controllers/V1/JobGroupUpdateNextRunController.cs @@ -7,10 +7,10 @@ using PARR.API.Controllers.V1.Base; using PARR.API.Settings; using PARR.BLL.Domain.Mq; using PARR.BLL.Services.Interfaces; -using PARR.Common.Domain; using PARR.Constants; using PARR.DAL.Services.Interfaces.Job; -using Serilog.Core; +using PARR.Domain.Entities.Base.History; +using PARR.Domain.Enums; namespace PARR.API.Controllers.V1 { diff --git a/PARR.API/Controllers/V1/RobotTaskController.cs b/PARR.API/Controllers/V1/RobotTaskController.cs index 2fd2f87d..ffcbe9c7 100644 --- a/PARR.API/Controllers/V1/RobotTaskController.cs +++ b/PARR.API/Controllers/V1/RobotTaskController.cs @@ -9,7 +9,6 @@ using PARR.API.Contracts.V1.Responses.Base; using PARR.API.Controllers.V1.Base; using PARR.API.Services.Interfaces; using PARR.BLL.Helpers; -using PARR.Common.Domain; using PARR.Constants; using PARR.DAL.Contracts; using PARR.DAL.DomainServices.Shortcodes; @@ -17,6 +16,8 @@ using PARR.DAL.Models; using PARR.DAL.NextRunServices; using PARR.DAL.Services.Interfaces; using PARR.DAL.Services.Interfaces.Schedule; +using PARR.Domain.Entities.Base.History; +using PARR.Domain.Enums; namespace PARR.API.Controllers.V1 { diff --git a/PARR.API/Controllers/V1/RobotTaskRobotStatusController.cs b/PARR.API/Controllers/V1/RobotTaskRobotStatusController.cs index 3fbb3ded..e643b182 100644 --- a/PARR.API/Controllers/V1/RobotTaskRobotStatusController.cs +++ b/PARR.API/Controllers/V1/RobotTaskRobotStatusController.cs @@ -12,6 +12,7 @@ using PARR.Constants; using PARR.DAL.Contracts; using PARR.DAL.Models; using PARR.DAL.Services.Interfaces; +using PARR.Domain.Enums; namespace PARR.API.Controllers.V1 { diff --git a/PARR.API/Controllers/V1/Statistics/StatRobotTaskController.cs b/PARR.API/Controllers/V1/Statistics/StatRobotTaskController.cs index adc5874d..d68d36e1 100644 --- a/PARR.API/Controllers/V1/Statistics/StatRobotTaskController.cs +++ b/PARR.API/Controllers/V1/Statistics/StatRobotTaskController.cs @@ -11,6 +11,7 @@ using PARR.API.Controllers.V1.Base; using PARR.Constants; using PARR.DAL.Contracts; using PARR.DAL.Services.Interfaces; +using PARR.Domain.Enums; namespace PARR.API.Controllers.V1.Statistics { diff --git a/PARR.API/Controllers/V1/Statistics/StatTemplateAutoControlController.cs b/PARR.API/Controllers/V1/Statistics/StatTemplateAutoControlController.cs index a760b350..0f002a26 100644 --- a/PARR.API/Controllers/V1/Statistics/StatTemplateAutoControlController.cs +++ b/PARR.API/Controllers/V1/Statistics/StatTemplateAutoControlController.cs @@ -9,6 +9,7 @@ using PARR.API.Helpers; using PARR.Constants; using PARR.DAL.NextRunServices; using PARR.DAL.Services.Interfaces; +using PARR.Domain.Enums; namespace PARR.API.Controllers.V1.Statistics { @@ -50,7 +51,7 @@ namespace PARR.API.Controllers.V1.Statistics var templates = await templateService.Get() .Where(t => - t.InitiatorParrComponentId == Constants.ParrComponentsEnum.JobAutoControl + t.InitiatorParrComponentId == ParrComponentsEnum.JobAutoControl && (( // измененные @@ -87,7 +88,7 @@ namespace PARR.API.Controllers.V1.Statistics //&& t.DateCreated.DateTime.AddHours(timeZoneQuery.TimeZoneOffsetHours).Date <= endPeriod.Date t.DateCreated.UtcDateTime >= utcStartPeriod && t.DateCreated.UtcDateTime <= utcEndPeriod - && t.TemplateHistories.Any(x => x.InitiatorParrComponentId == Constants.ParrComponentsEnum.JobAutoControl) + && t.TemplateHistories.Any(x => x.InitiatorParrComponentId == ParrComponentsEnum.JobAutoControl) ) .ToListAsync(); @@ -97,14 +98,14 @@ namespace PARR.API.Controllers.V1.Statistics x.InitiatorComment != null && !x.InitiatorComment.Contains(TemplateActivatorActionsEnum.ActivateAllForAutoControl.ToString()) && !x.InitiatorComment.Contains(TemplateActivatorActionsEnum.DeactivateAllForAutoControl.ToString()) - && x.InitiatorParrComponentId == Constants.ParrComponentsEnum.JobAutoControl + && x.InitiatorParrComponentId == ParrComponentsEnum.JobAutoControl )).ToList(); //TODO: createdTemplatesAndMoveToHistory - возможно тут ошибка. Не убираются дубли шаблонов из template #endregion var history = await templateHistoryService.Get() .Where(t => - t.InitiatorParrComponentId == Constants.ParrComponentsEnum.JobAutoControl + t.InitiatorParrComponentId == ParrComponentsEnum.JobAutoControl && t.DateModified.HasValue //&& t.DateModified.Value.DateTime.AddHours(timeZoneQuery.TimeZoneOffsetHours).Date >= startPeriod.Date //&& t.DateModified.Value.DateTime.AddHours(timeZoneQuery.TimeZoneOffsetHours).Date <= endPeriod.Date diff --git a/PARR.API/Controllers/V1/Statistics/StatTemplateController.cs b/PARR.API/Controllers/V1/Statistics/StatTemplateController.cs index 28863f45..c78412fb 100644 --- a/PARR.API/Controllers/V1/Statistics/StatTemplateController.cs +++ b/PARR.API/Controllers/V1/Statistics/StatTemplateController.cs @@ -11,6 +11,7 @@ using PARR.Constants; using PARR.DAL.Contracts; using PARR.DAL.NextRunServices; using PARR.DAL.Services.Interfaces; +using PARR.Domain.Enums; namespace PARR.API.Controllers.V1.Statistics { diff --git a/PARR.API/Controllers/V1/SyncTaskController.cs b/PARR.API/Controllers/V1/SyncTaskController.cs index ec7767ef..1894fa3c 100644 --- a/PARR.API/Controllers/V1/SyncTaskController.cs +++ b/PARR.API/Controllers/V1/SyncTaskController.cs @@ -7,11 +7,9 @@ using PARR.API.Services.Interfaces; using PARR.API.Settings; using PARR.BLL.Domain.Mq; using PARR.BLL.Services.Interfaces; -using PARR.Common.Domain; -using PARR.Constants; -using PARR.DAL.Cache.Services; using PARR.DAL.DomainServices.Interfaces; -using System.Text.Json; +using PARR.Domain.Entities.Base.History; +using PARR.Domain.Enums; namespace PARR.API.Controllers.V1 { diff --git a/PARR.API/Controllers/V1/TemplateActivatorController.cs b/PARR.API/Controllers/V1/TemplateActivatorController.cs index e006910b..f6e45a49 100644 --- a/PARR.API/Controllers/V1/TemplateActivatorController.cs +++ b/PARR.API/Controllers/V1/TemplateActivatorController.cs @@ -9,10 +9,10 @@ using PARR.API.Services.Interfaces; using PARR.API.Settings; using PARR.BLL.Domain.Mq; using PARR.BLL.Services.Interfaces; -using PARR.Common.Domain; using PARR.Constants; using PARR.DAL.Services.Interfaces.Job; -using System.Text.Json; +using PARR.Domain.Entities.Base.History; +using PARR.Domain.Enums; namespace PARR.API.Controllers.V1 { diff --git a/PARR.API/Controllers/V1/TemplateController.cs b/PARR.API/Controllers/V1/TemplateController.cs index a92915cf..f1ee5cb6 100644 --- a/PARR.API/Controllers/V1/TemplateController.cs +++ b/PARR.API/Controllers/V1/TemplateController.cs @@ -11,7 +11,6 @@ using PARR.API.Controllers.V1.Base; using PARR.API.Extensions; using PARR.API.Services.Interfaces; using PARR.BLL.Helpers; -using PARR.Common.Domain; using PARR.Constants; using PARR.DAL.Contracts; using PARR.DAL.DomainModels; @@ -19,6 +18,8 @@ using PARR.DAL.DomainServices.Shortcodes; using PARR.DAL.Models; using PARR.DAL.Services.Interfaces; using PARR.DAL.Services.Interfaces.Schedule; +using PARR.Domain.Entities.Base.History; +using PARR.Domain.Enums; namespace PARR.API.Controllers.V1 { diff --git a/PARR.API/Controllers/V1/TemplateSyncStateController.cs b/PARR.API/Controllers/V1/TemplateSyncStateController.cs index 232f47b8..572b867b 100644 --- a/PARR.API/Controllers/V1/TemplateSyncStateController.cs +++ b/PARR.API/Controllers/V1/TemplateSyncStateController.cs @@ -9,6 +9,7 @@ using PARR.API.Controllers.V1.Base; using PARR.Constants; using PARR.DAL.Contracts; using PARR.DAL.Services.Interfaces; +using PARR.Domain.Enums; namespace PARR.API.Controllers.V1 { diff --git a/PARR.API/Controllers/V1/WorkGroupController.cs b/PARR.API/Controllers/V1/WorkGroupController.cs index 54319953..009769d8 100644 --- a/PARR.API/Controllers/V1/WorkGroupController.cs +++ b/PARR.API/Controllers/V1/WorkGroupController.cs @@ -13,6 +13,7 @@ using PARR.DAL.Contracts; using PARR.DAL.DomainModels; using PARR.DAL.Models; using PARR.DAL.Services.Interfaces; +using PARR.Domain.Enums; namespace PARR.API.Controllers.V1 { diff --git a/PARR.API/MappingProfiles/DomainToResponseProfile.cs b/PARR.API/MappingProfiles/DomainToResponseProfile.cs index fed65fd9..92b652c7 100644 --- a/PARR.API/MappingProfiles/DomainToResponseProfile.cs +++ b/PARR.API/MappingProfiles/DomainToResponseProfile.cs @@ -2,12 +2,12 @@ using PARR.API.Authentication.Models; using PARR.API.Contracts.V1.Responses; using PARR.API.MappingProfiles.Resolvers; -using PARR.Common.Domain; using PARR.DAL.DomainModels; using PARR.DAL.Models; using PARR.DAL.Models.Job; using PARR.DAL.Models.Schedule; using PARR.DAL.Models.Unit; +using PARR.Domain.Entities.Base.History; namespace PARR.API.MappingProfiles { diff --git a/PARR.API/MappingProfiles/Resolvers/HistoryInitiatorParrComponentResolver.cs b/PARR.API/MappingProfiles/Resolvers/HistoryInitiatorParrComponentResolver.cs index c7d7e421..4cdf5e07 100644 --- a/PARR.API/MappingProfiles/Resolvers/HistoryInitiatorParrComponentResolver.cs +++ b/PARR.API/MappingProfiles/Resolvers/HistoryInitiatorParrComponentResolver.cs @@ -1,8 +1,8 @@ using AutoMapper; using Microsoft.EntityFrameworkCore; using PARR.API.Contracts.V1.Responses; -using PARR.Common.Domain; using PARR.DAL.Services.Interfaces; +using PARR.Domain.Entities.Base.History; namespace PARR.API.MappingProfiles.Resolvers { diff --git a/PARR.API/MappingProfiles/Resolvers/HistoryInitiatorUserResolver.cs b/PARR.API/MappingProfiles/Resolvers/HistoryInitiatorUserResolver.cs index 0abd76e4..abae719c 100644 --- a/PARR.API/MappingProfiles/Resolvers/HistoryInitiatorUserResolver.cs +++ b/PARR.API/MappingProfiles/Resolvers/HistoryInitiatorUserResolver.cs @@ -1,8 +1,8 @@ using AutoMapper; using Microsoft.EntityFrameworkCore; using PARR.API.Contracts.V1.Responses; -using PARR.Common.Domain; using PARR.DAL.Services.Interfaces; +using PARR.Domain.Entities.Base.History; namespace PARR.API.MappingProfiles.Resolvers { diff --git a/PARR.API/PARR.API.csproj b/PARR.API/PARR.API.csproj index 51b89c58..33f4068a 100644 --- a/PARR.API/PARR.API.csproj +++ b/PARR.API/PARR.API.csproj @@ -35,7 +35,9 @@ + + diff --git a/PARR.API/Program.cs b/PARR.API/Program.cs index c428e934..4961ac2b 100644 --- a/PARR.API/Program.cs +++ b/PARR.API/Program.cs @@ -4,7 +4,9 @@ using Microsoft.AspNetCore.HttpOverrides; using PARR.API.Authentication; using PARR.API.Installers; using PARR.BLL; +using PARR.Core; using PARR.DAL; +using PARR.Infrastructure; using Serilog; using System.Reflection; @@ -22,6 +24,8 @@ builder.Host.UseSerilog((context, config) => // Add services to the container. builder.Services.InstallDalServices(builder.Configuration); +builder.Services.AddCoreServices(builder.Configuration); +builder.Services.AddInfrastructureServices(builder.Configuration); builder.Services.InstallBllServices(builder.Configuration); builder.Services.InstallApiServices(builder.Configuration); builder.Services.InstallSettings(builder.Configuration); diff --git a/PARR.API/Settings/MqSettings.cs b/PARR.API/Settings/MqSettings.cs index 1211d6d2..5763bd1a 100644 --- a/PARR.API/Settings/MqSettings.cs +++ b/PARR.API/Settings/MqSettings.cs @@ -1,5 +1,5 @@ using PARR.BLL.Contracts.Interfaces; -using PARR.DAL.Contracts; +using PARR.Domain.Enums; namespace PARR.API.Settings { diff --git a/PARR.API/Validators/AgentHistoryRequestValidator.cs b/PARR.API/Validators/AgentHistoryRequestValidator.cs index a07952b3..037bdc95 100644 --- a/PARR.API/Validators/AgentHistoryRequestValidator.cs +++ b/PARR.API/Validators/AgentHistoryRequestValidator.cs @@ -1,6 +1,6 @@ using FluentValidation; using PARR.API.Contracts.V1.Requests; -using PARR.DAL.Contracts; +using PARR.Domain.Enums; namespace PARR.API.Validators { diff --git a/PARR.API/Validators/JobAutoControlRequestValidator.cs b/PARR.API/Validators/JobAutoControlRequestValidator.cs index b3865889..826f1e5a 100644 --- a/PARR.API/Validators/JobAutoControlRequestValidator.cs +++ b/PARR.API/Validators/JobAutoControlRequestValidator.cs @@ -1,6 +1,6 @@ using FluentValidation; using PARR.API.Contracts.V1.Requests; -using PARR.DAL.Contracts; +using PARR.Domain.Enums; namespace PARR.API.Validators { diff --git a/PARR.API/Validators/JobGroupValidator.cs b/PARR.API/Validators/JobGroupValidator.cs index 7e5afb1d..993459f7 100644 --- a/PARR.API/Validators/JobGroupValidator.cs +++ b/PARR.API/Validators/JobGroupValidator.cs @@ -7,6 +7,7 @@ using PARR.DAL.Services.Interfaces; using PARR.DAL.Services.Interfaces.Job; using PARR.DAL.Services.Interfaces.Schedule; using PARR.DAL.Services.Interfaces.Unit; +using PARR.Domain.Enums; namespace PARR.API.Validators { diff --git a/PARR.API/Validators/RobotHistoryRequestValidator.cs b/PARR.API/Validators/RobotHistoryRequestValidator.cs index b609f60d..91053b1f 100644 --- a/PARR.API/Validators/RobotHistoryRequestValidator.cs +++ b/PARR.API/Validators/RobotHistoryRequestValidator.cs @@ -1,6 +1,7 @@ using FluentValidation; using PARR.API.Contracts.V1.Requests; using PARR.DAL.Contracts; +using PARR.Domain.Enums; namespace PARR.API.Validators { diff --git a/PARR.API/Validators/TemplateRobotStatusRequestValidator.cs b/PARR.API/Validators/TemplateRobotStatusRequestValidator.cs index bbf2839e..f79fe2a1 100644 --- a/PARR.API/Validators/TemplateRobotStatusRequestValidator.cs +++ b/PARR.API/Validators/TemplateRobotStatusRequestValidator.cs @@ -1,6 +1,7 @@ using FluentValidation; using PARR.API.Contracts.V1.Requests; using PARR.DAL.Contracts; +using PARR.Domain.Enums; namespace PARR.API.Validators { diff --git a/PARR.BLL/Domain/Mq/GeneratorTemplateMq.cs b/PARR.BLL/Domain/Mq/GeneratorTemplateMq.cs index 750e4c5b..26657081 100644 --- a/PARR.BLL/Domain/Mq/GeneratorTemplateMq.cs +++ b/PARR.BLL/Domain/Mq/GeneratorTemplateMq.cs @@ -1,4 +1,4 @@ -using PARR.Common.Domain; +using PARR.Domain.Entities.Base.History; namespace PARR.BLL.Domain.Mq { diff --git a/PARR.BLL/Domain/Mq/NextRunUpdateMq.cs b/PARR.BLL/Domain/Mq/NextRunUpdateMq.cs index 170f9819..f70247cd 100644 --- a/PARR.BLL/Domain/Mq/NextRunUpdateMq.cs +++ b/PARR.BLL/Domain/Mq/NextRunUpdateMq.cs @@ -1,4 +1,4 @@ -using PARR.Common.Domain; +using PARR.Domain.Entities.Base.History; namespace PARR.BLL.Domain.Mq { diff --git a/PARR.BLL/Domain/Mq/TemplateActivatorMq.cs b/PARR.BLL/Domain/Mq/TemplateActivatorMq.cs index ec2c1d4f..226284ff 100644 --- a/PARR.BLL/Domain/Mq/TemplateActivatorMq.cs +++ b/PARR.BLL/Domain/Mq/TemplateActivatorMq.cs @@ -1,5 +1,5 @@ -using PARR.Common.Domain; -using PARR.Constants; +using PARR.Constants; +using PARR.Domain.Entities.Base.History; namespace PARR.BLL.Domain.Mq { diff --git a/PARR.BLL/Domain/Mq/TemplateDistributorMq.cs b/PARR.BLL/Domain/Mq/TemplateDistributorMq.cs index 63b88e5f..abee7836 100644 --- a/PARR.BLL/Domain/Mq/TemplateDistributorMq.cs +++ b/PARR.BLL/Domain/Mq/TemplateDistributorMq.cs @@ -1,4 +1,4 @@ -using PARR.Common.Domain; +using PARR.Domain.Entities.Base.History; namespace PARR.BLL.Domain.Mq { diff --git a/PARR.BLL/Domain/Mq/TemplateGeneratorMq.cs b/PARR.BLL/Domain/Mq/TemplateGeneratorMq.cs index 372c2ffc..ceb6c11b 100644 --- a/PARR.BLL/Domain/Mq/TemplateGeneratorMq.cs +++ b/PARR.BLL/Domain/Mq/TemplateGeneratorMq.cs @@ -1,4 +1,4 @@ -using PARR.Common.Domain; +using PARR.Domain.Entities.Base.History; namespace PARR.BLL.Domain.Mq { diff --git a/PARR.BLL/Domain/Mq/TemplateMatcherMq.cs b/PARR.BLL/Domain/Mq/TemplateMatcherMq.cs index 0f829ad2..ba9f13ce 100644 --- a/PARR.BLL/Domain/Mq/TemplateMatcherMq.cs +++ b/PARR.BLL/Domain/Mq/TemplateMatcherMq.cs @@ -1,5 +1,5 @@ -using PARR.Common.Domain; -using PARR.Constants; +using PARR.Constants; +using PARR.Domain.Entities.Base.History; namespace PARR.BLL.Domain.Mq { diff --git a/PARR.BLL/Domain/Mq/TemplateUpdaterMq.cs b/PARR.BLL/Domain/Mq/TemplateUpdaterMq.cs index e28a5c1d..cd6928e1 100644 --- a/PARR.BLL/Domain/Mq/TemplateUpdaterMq.cs +++ b/PARR.BLL/Domain/Mq/TemplateUpdaterMq.cs @@ -1,5 +1,5 @@ -using PARR.Common.Domain; -using PARR.Constants; +using PARR.Constants; +using PARR.Domain.Entities.Base.History; namespace PARR.BLL.Domain.Mq { diff --git a/PARR.BLL/PARR.BLL.csproj b/PARR.BLL/PARR.BLL.csproj index 719f7fcf..c3766c2b 100644 --- a/PARR.BLL/PARR.BLL.csproj +++ b/PARR.BLL/PARR.BLL.csproj @@ -18,6 +18,7 @@ + diff --git a/PARR.Common/DateResolver.cs b/PARR.Common/DateResolver.cs index a93c38dc..5dd99b1c 100644 --- a/PARR.Common/DateResolver.cs +++ b/PARR.Common/DateResolver.cs @@ -1,5 +1,7 @@ namespace PARR.Common { + //TODO:!!! Удалить этот класс !!! + /// /// Даты и часовые пояса /// diff --git a/PARR.Core/DependencyInjection.cs b/PARR.Core/DependencyInjection.cs new file mode 100644 index 00000000..dcb197e5 --- /dev/null +++ b/PARR.Core/DependencyInjection.cs @@ -0,0 +1,44 @@ +using FluentValidation; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; + +namespace PARR.Core +{ + public static class DependencyInjection + { + + /// + /// Регистрация Core (BLL) сервисов + /// + /// + /// + /// + public static IServiceCollection AddCoreServices(this IServiceCollection services, IConfiguration configuration) + { + // Регим профили AutoMapper + services.AddBllMapping(); + + // Регим все валидаторы в Core + services.AddValidatorsFromAssembly(typeof(DependencyInjection).Assembly, includeInternalTypes: true); + + // Регистрируем сревисы Core + //services.AddScoped(); + + return services; + } + + + private static IServiceCollection AddBllMapping(this IServiceCollection services) + { + // AutoMapper + services.AddAutoMapper(cfg => + { + // регим все в Core + cfg.AddMaps(typeof(DependencyInjection).Assembly); + }); + + return services; + } + + } +} diff --git a/PARR.Core/PARR.Core.csproj b/PARR.Core/PARR.Core.csproj new file mode 100644 index 00000000..4535c00c --- /dev/null +++ b/PARR.Core/PARR.Core.csproj @@ -0,0 +1,27 @@ + + + + net7.0 + enable + enable + + + + + + + + + + + + + + + + + + + + + diff --git a/PARR.DAL.IntegrationTests/TestDataGenerator.cs b/PARR.DAL.IntegrationTests/TestDataGenerator.cs index 5e79e4fd..3119e6e1 100644 --- a/PARR.DAL.IntegrationTests/TestDataGenerator.cs +++ b/PARR.DAL.IntegrationTests/TestDataGenerator.cs @@ -2,6 +2,7 @@ using PARR.DAL.Contracts; using PARR.DAL.Models.Job; using PARR.DAL.Models.Unit; +using PARR.Domain.Enums; using System; using System.Collections.Generic; using System.Text; diff --git a/PARR.DAL.Tests/TestDataGenerator.cs b/PARR.DAL.Tests/TestDataGenerator.cs index bec55608..bb8acac4 100644 --- a/PARR.DAL.Tests/TestDataGenerator.cs +++ b/PARR.DAL.Tests/TestDataGenerator.cs @@ -3,6 +3,7 @@ using PARR.DAL.Context; using PARR.DAL.Contracts; using PARR.DAL.Models.Job; using PARR.DAL.Models.Unit; +using PARR.Domain.Enums; using System; using System.Collections.Generic; using System.Linq; diff --git a/PARR.DAL.Tests/TransformServices/EsppScheduleTransformServiceTests.cs b/PARR.DAL.Tests/TransformServices/EsppScheduleTransformServiceTests.cs index d490cfca..479b6ab8 100644 --- a/PARR.DAL.Tests/TransformServices/EsppScheduleTransformServiceTests.cs +++ b/PARR.DAL.Tests/TransformServices/EsppScheduleTransformServiceTests.cs @@ -1,10 +1,10 @@ using Microsoft.Extensions.Logging; using Moq; -using PARR.DAL.Contracts; using PARR.DAL.DomainModels; using PARR.DAL.Models; using PARR.DAL.NextRunServices.Subservices; using PARR.DAL.Services.Interfaces; +using PARR.Domain.Enums; namespace PARR.DAL.Tests.TransformServices { diff --git a/PARR.DAL/Context/DataContext.cs b/PARR.DAL/Context/DataContext.cs index 944bc2ac..6dbf8aa4 100644 --- a/PARR.DAL/Context/DataContext.cs +++ b/PARR.DAL/Context/DataContext.cs @@ -6,8 +6,9 @@ using PARR.DAL.Extensions; using PARR.DAL.Models; using PARR.DAL.Models.Job; using PARR.DAL.Models.Schedule; -using PARR.DAL.Models.TaskModels; using PARR.DAL.Models.Unit; +using PARR.Domain.Entities.TaskEntities; +using PARR.Domain.Enums; namespace PARR.DAL.Context { @@ -121,7 +122,7 @@ namespace PARR.DAL.Context #region Tasks public DbSet Tasks { get; set; } - public DbSet TaskStatus { get; set; } + public DbSet TaskStatus { get; set; } public DbSet TaskTypes { get; set; } public DbSet TaskErrors { get; set; } @@ -581,9 +582,9 @@ namespace PARR.DAL.Context #region TaskStatus - modelBuilder.Entity(f => + modelBuilder.Entity(f => { - f.HasData(new PARR.DAL.Models.TaskModels.TaskStatus[] + f.HasData(new Domain.Entities.TaskEntities.TaskStatus[] { new(){Code=TaskItemStatusEnum.Pending, Name=TaskItemStatusEnum.Pending.ToString(), Description="Ожидание"}, new(){Code=TaskItemStatusEnum.Processing, Name=TaskItemStatusEnum.Processing.ToString(), Description="В работе"}, diff --git a/PARR.DAL/DomainServices/Shortcodes/ShortcodesService.cs b/PARR.DAL/DomainServices/Shortcodes/ShortcodesService.cs index 1c3b6150..1e942e27 100644 --- a/PARR.DAL/DomainServices/Shortcodes/ShortcodesService.cs +++ b/PARR.DAL/DomainServices/Shortcodes/ShortcodesService.cs @@ -11,6 +11,7 @@ using PARR.DAL.Models.Job; using PARR.DAL.Services.Interfaces; using PARR.DAL.Services.Interfaces.Job; using PARR.DAL.Services.Interfaces.Unit; +using PARR.Domain.Enums; using System.Runtime.CompilerServices; using System.Text.RegularExpressions; diff --git a/PARR.DAL/DomainServices/UnitFilterService/UnitFilterService.cs b/PARR.DAL/DomainServices/UnitFilterService/UnitFilterService.cs index 19040d7f..51eb2fce 100644 --- a/PARR.DAL/DomainServices/UnitFilterService/UnitFilterService.cs +++ b/PARR.DAL/DomainServices/UnitFilterService/UnitFilterService.cs @@ -9,6 +9,7 @@ using PARR.DAL.Models.Job; using PARR.DAL.Models.Unit; using PARR.DAL.Services.Interfaces.Job; using PARR.DAL.Services.Interfaces.Unit; +using PARR.Domain.Enums; using System.Diagnostics; namespace PARR.DAL.DomainServices.UnitFilterService; diff --git a/PARR.DAL/Models/AgentHistory.cs b/PARR.DAL/Models/AgentHistory.cs index af1d8ec0..2dd1868b 100644 --- a/PARR.DAL/Models/AgentHistory.cs +++ b/PARR.DAL/Models/AgentHistory.cs @@ -1,4 +1,4 @@ -using PARR.DAL.Models.Base; +using PARR.Domain.Entities.Base; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; @@ -8,7 +8,7 @@ namespace PARR.DAL.Models /// История работы агентов /// [Table("AgentHistories")] - public class AgentHistory : IBase + public class AgentHistory : IBaseEntity { [Key] public Guid Id { get; set; } diff --git a/PARR.DAL/Models/Application.cs b/PARR.DAL/Models/Application.cs index 2348d07a..e70f3cca 100644 --- a/PARR.DAL/Models/Application.cs +++ b/PARR.DAL/Models/Application.cs @@ -1,5 +1,5 @@ using Microsoft.EntityFrameworkCore; -using PARR.DAL.Models.Base; +using PARR.Domain.Entities.Base; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; @@ -7,7 +7,7 @@ namespace PARR.DAL.Models { [Table("Applications")] [Index(nameof(Name), nameof(ApplicationTypeId), IsUnique = true)] - public class Application : IBase + public class Application : IBaseEntity { [Key] public Guid Id { get; set; } diff --git a/PARR.DAL/Models/ApplicationInHost.cs b/PARR.DAL/Models/ApplicationInHost.cs index 720471b6..b0401157 100644 --- a/PARR.DAL/Models/ApplicationInHost.cs +++ b/PARR.DAL/Models/ApplicationInHost.cs @@ -1,10 +1,10 @@ -using PARR.DAL.Models.Base; +using PARR.Domain.Entities.Base; using System.ComponentModel.DataAnnotations.Schema; namespace PARR.DAL.Models { [Table("ApplicationsInHost")] - public class ApplicationInHost : IBase + public class ApplicationInHost : IBaseEntity { public Guid Id { get; set; } public DateTimeOffset DateCreated { get; set; } diff --git a/PARR.DAL/Models/ApplicationType.cs b/PARR.DAL/Models/ApplicationType.cs index 64396d98..62803486 100644 --- a/PARR.DAL/Models/ApplicationType.cs +++ b/PARR.DAL/Models/ApplicationType.cs @@ -1,10 +1,10 @@ -using PARR.DAL.Models.Base; +using PARR.Domain.Entities.Base; using System.ComponentModel.DataAnnotations.Schema; namespace PARR.DAL.Models { [Table("ApplicationTypes")] - public class ApplicationType : IBase + public class ApplicationType : IBaseEntity { public Guid Id { get; set; } public DateTimeOffset DateCreated { get; set; } diff --git a/PARR.DAL/Models/ApplicationsInWork.cs b/PARR.DAL/Models/ApplicationsInWork.cs index 029eeb35..9337019e 100644 --- a/PARR.DAL/Models/ApplicationsInWork.cs +++ b/PARR.DAL/Models/ApplicationsInWork.cs @@ -1,6 +1,6 @@ using Microsoft.EntityFrameworkCore; -using PARR.DAL.Models.Base; using PARR.DAL.Settings; +using PARR.Domain.Entities.Base; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; @@ -8,7 +8,7 @@ namespace PARR.DAL.Models { [Table("ApplicationsInWorks")] [Index(nameof(WorkId), nameof(ApplicationId), IsUnique = true)] - public class ApplicationsInWork : IBase + public class ApplicationsInWork : IBaseEntity { [Key] public Guid Id { get; set; } diff --git a/PARR.DAL/Models/Base/IBase.cs b/PARR.DAL/Models/Base/IBase.cs deleted file mode 100644 index 98a7f8a5..00000000 --- a/PARR.DAL/Models/Base/IBase.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace PARR.DAL.Models.Base -{ - public interface IBase: IBaseDateCreated, IBaseDateModified - { - Guid Id { get; set; } - - //DateTimeOffset DateCreated { get; set; } - - //DateTimeOffset? DateModified { get; set; } - } -} diff --git a/PARR.DAL/Models/Base/IBaseDateCreated.cs b/PARR.DAL/Models/Base/IBaseDateCreated.cs deleted file mode 100644 index 7494a327..00000000 --- a/PARR.DAL/Models/Base/IBaseDateCreated.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace PARR.DAL.Models.Base -{ - public interface IBaseDateCreated - { - DateTimeOffset DateCreated { get; set; } - } -} diff --git a/PARR.DAL/Models/Base/IBaseDateModified.cs b/PARR.DAL/Models/Base/IBaseDateModified.cs deleted file mode 100644 index 984c372d..00000000 --- a/PARR.DAL/Models/Base/IBaseDateModified.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace PARR.DAL.Models.Base -{ - public interface IBaseDateModified - { - DateTimeOffset? DateModified { get; set; } - } -} diff --git a/PARR.DAL/Models/DistributionPeriod.cs b/PARR.DAL/Models/DistributionPeriod.cs index 823217af..d7aec67e 100644 --- a/PARR.DAL/Models/DistributionPeriod.cs +++ b/PARR.DAL/Models/DistributionPeriod.cs @@ -1,7 +1,6 @@ -using PARR.Constants; -using PARR.DAL.Context; -using PARR.DAL.Models.Base; +using PARR.DAL.Context; using PARR.DAL.Models.Job; +using PARR.Domain.Entities.Base; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; @@ -11,7 +10,7 @@ namespace PARR.DAL.Models /// Период автоматического распеделения РР /// [Table("DistributionPeriods", Schema = DataContextSettings.Schedule)] - public class DistributionPeriod : IBase + public class DistributionPeriod : IBaseEntity { [Key] public Guid Id { get; set; } diff --git a/PARR.DAL/Models/EsppSchTypeConfig.cs b/PARR.DAL/Models/EsppSchTypeConfig.cs index 2bfaaf9a..fefb9287 100644 --- a/PARR.DAL/Models/EsppSchTypeConfig.cs +++ b/PARR.DAL/Models/EsppSchTypeConfig.cs @@ -1,6 +1,6 @@ using Microsoft.EntityFrameworkCore; using PARR.DAL.Context; -using PARR.DAL.Models.Base; +using PARR.Domain.Entities.Base; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; @@ -11,7 +11,7 @@ namespace PARR.DAL.Models /// [Table("EsppSchTypeConfigs", Schema = DataContextSettings.Schedule)] [Index(nameof(TypeScheduleId), nameof(TypeId), IsUnique = true)] - public class EsppSchTypeConfig : IBase + public class EsppSchTypeConfig : IBaseEntity { [Key] public Guid Id { get; set; } diff --git a/PARR.DAL/Models/EsppSchTypeValue.cs b/PARR.DAL/Models/EsppSchTypeValue.cs index 18e70ada..5abb1671 100644 --- a/PARR.DAL/Models/EsppSchTypeValue.cs +++ b/PARR.DAL/Models/EsppSchTypeValue.cs @@ -1,5 +1,5 @@ using PARR.DAL.Context; -using PARR.DAL.Models.Base; +using PARR.Domain.Entities.Base; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; @@ -9,7 +9,7 @@ namespace PARR.DAL.Models /// Расписание ЕСПП: значения типов повторений /// [Table("EsppSchTypeValues", Schema = DataContextSettings.Schedule)] - public class EsppSchTypeValue : IBase + public class EsppSchTypeValue : IBaseEntity { [Key] public Guid Id { get; set; } diff --git a/PARR.DAL/Models/Host.cs b/PARR.DAL/Models/Host.cs index 0c505265..ba4f7bc9 100644 --- a/PARR.DAL/Models/Host.cs +++ b/PARR.DAL/Models/Host.cs @@ -1,5 +1,5 @@ using Microsoft.EntityFrameworkCore; -using PARR.DAL.Models.Base; +using PARR.Domain.Entities.Base; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; @@ -8,7 +8,7 @@ namespace PARR.DAL.Models [Table("Hosts")] [Index(nameof(IP))] [Index(nameof(Ek), IsUnique = true)] - public class Host : IBase + public class Host : IBaseEntity { [Key] public Guid Id { get; set; } diff --git a/PARR.DAL/Models/Job/Job.cs b/PARR.DAL/Models/Job/Job.cs index 8a1e931d..9e33c38f 100644 --- a/PARR.DAL/Models/Job/Job.cs +++ b/PARR.DAL/Models/Job/Job.cs @@ -1,6 +1,6 @@ using Microsoft.EntityFrameworkCore; using PARR.DAL.Context; -using PARR.DAL.Models.Base; +using PARR.Domain.Entities.Base; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; @@ -8,7 +8,7 @@ namespace PARR.DAL.Models.Job { [Table("Jobs", Schema = DataContextSettings.Job)] [Comment("Таблица видов работ")] - public class Job : IBase + public class Job : IBaseEntity { [Key] public Guid Id { get; set; } diff --git a/PARR.DAL/Models/Job/JobFieldFilter.cs b/PARR.DAL/Models/Job/JobFieldFilter.cs index c1ebc9e7..4be41a7d 100644 --- a/PARR.DAL/Models/Job/JobFieldFilter.cs +++ b/PARR.DAL/Models/Job/JobFieldFilter.cs @@ -1,7 +1,7 @@ using Microsoft.EntityFrameworkCore; using PARR.DAL.Context; -using PARR.DAL.Models.Base; using PARR.DAL.Models.Unit; +using PARR.Domain.Entities.Base; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; @@ -9,7 +9,7 @@ namespace PARR.DAL.Models.Job { [Table("FieldFilters", Schema = DataContextSettings.Job)] [Comment("Таблица описания критериев выборки аттрибутов ЭК")] - public class JobFieldFilter : IBase + public class JobFieldFilter : IBaseEntity { [Key] public Guid Id { get; set; } diff --git a/PARR.DAL/Models/Job/JobGroup.cs b/PARR.DAL/Models/Job/JobGroup.cs index 1c70785e..0b11d5e5 100644 --- a/PARR.DAL/Models/Job/JobGroup.cs +++ b/PARR.DAL/Models/Job/JobGroup.cs @@ -1,9 +1,9 @@ using Microsoft.EntityFrameworkCore; using PARR.DAL.Context; -using PARR.DAL.Models.Base; using PARR.DAL.Models.Schedule; using PARR.DAL.Models.Unit; using PARR.DAL.Settings; +using PARR.Domain.Entities.Base; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; @@ -11,7 +11,7 @@ namespace PARR.DAL.Models.Job { [Table("Groups", Schema = DataContextSettings.Job)] [Comment("Таблица описания групп работ, для реализации зонтиков")] - public class JobGroup : IBase + public class JobGroup : IBaseEntity { [Key] public Guid Id { get; set; } diff --git a/PARR.DAL/Models/Job/JobGroupType.cs b/PARR.DAL/Models/Job/JobGroupType.cs index 23e878b9..9c9e86ee 100644 --- a/PARR.DAL/Models/Job/JobGroupType.cs +++ b/PARR.DAL/Models/Job/JobGroupType.cs @@ -1,7 +1,7 @@ using Microsoft.EntityFrameworkCore; using PARR.DAL.Context; -using PARR.DAL.Contracts; -using PARR.DAL.Models.Base; +using PARR.Domain.Entities.Base; +using PARR.Domain.Enums; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; @@ -9,7 +9,7 @@ namespace PARR.DAL.Models.Job { [Table("GroupTypes", Schema = DataContextSettings.Job)] [Comment("Таблица типов групп работ")] - public class JobGroupType : IBase + public class JobGroupType : IBaseEntity { [Key] public Guid Id { get; set; } diff --git a/PARR.DAL/Models/Job/JobUnitFilter.cs b/PARR.DAL/Models/Job/JobUnitFilter.cs index e4607dbb..5a62d2e5 100644 --- a/PARR.DAL/Models/Job/JobUnitFilter.cs +++ b/PARR.DAL/Models/Job/JobUnitFilter.cs @@ -1,6 +1,6 @@ using Microsoft.EntityFrameworkCore; using PARR.DAL.Context; -using PARR.DAL.Models.Base; +using PARR.Domain.Entities.Base; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; @@ -8,7 +8,7 @@ namespace PARR.DAL.Models.Job { [Table("UnitFilters", Schema = DataContextSettings.Job)] [Comment("Таблица описания критериев выборки ЭК, описание полей в АСУ ЕСПП")] - public class JobUnitFilter : IBase + public class JobUnitFilter : IBaseEntity { [Key] public Guid Id { get; set; } diff --git a/PARR.DAL/Models/Order.cs b/PARR.DAL/Models/Order.cs index 0307afce..820f9509 100644 --- a/PARR.DAL/Models/Order.cs +++ b/PARR.DAL/Models/Order.cs @@ -1,5 +1,5 @@ using Microsoft.EntityFrameworkCore; -using PARR.DAL.Models.Base; +using PARR.Domain.Entities.Base; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; @@ -10,7 +10,7 @@ namespace PARR.DAL.Models /// [Table("Orders")] [Index(nameof(Number), IsUnique = true)] - public class Order : IBase + public class Order : IBaseEntity { [Key] public Guid Id { get; set; } diff --git a/PARR.DAL/Models/ParrComponent.cs b/PARR.DAL/Models/ParrComponent.cs index ede94800..53488140 100644 --- a/PARR.DAL/Models/ParrComponent.cs +++ b/PARR.DAL/Models/ParrComponent.cs @@ -1,5 +1,5 @@ using Microsoft.EntityFrameworkCore; -using PARR.Constants; +using PARR.Domain.Enums; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; diff --git a/PARR.DAL/Models/Process.cs b/PARR.DAL/Models/Process.cs index ccae2aad..8979ac57 100644 --- a/PARR.DAL/Models/Process.cs +++ b/PARR.DAL/Models/Process.cs @@ -1,5 +1,5 @@ using Microsoft.EntityFrameworkCore; -using PARR.DAL.Models.Base; +using PARR.Domain.Entities.Base; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; @@ -7,7 +7,7 @@ namespace PARR.DAL.Models { [Table("Processes")] [Index(nameof(EsppId), IsUnique = true)] - public class Process : IBase + public class Process : IBaseEntity { [Key] public Guid Id { get; set; } diff --git a/PARR.DAL/Models/RobotConfiguration.cs b/PARR.DAL/Models/RobotConfiguration.cs index 42ca53bb..dd9ef26e 100644 --- a/PARR.DAL/Models/RobotConfiguration.cs +++ b/PARR.DAL/Models/RobotConfiguration.cs @@ -1,5 +1,5 @@ using Microsoft.EntityFrameworkCore; -using PARR.DAL.Models.Base; +using PARR.Domain.Entities.Base; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; @@ -9,7 +9,7 @@ namespace PARR.DAL.Models [Index(nameof(TemplateId), nameof(RobotCode), IsUnique = true)] [Index(nameof(TemplateId), nameof(TaskStatusCode))] [Index(nameof(TemplateId), nameof(RobotStatusCode))] - public class RobotConfiguration : IBase + public class RobotConfiguration : IBaseEntity { [Key] public Guid Id { get; set; } diff --git a/PARR.DAL/Models/RobotHistory.cs b/PARR.DAL/Models/RobotHistory.cs index 58642fbd..9bbbfd78 100644 --- a/PARR.DAL/Models/RobotHistory.cs +++ b/PARR.DAL/Models/RobotHistory.cs @@ -1,10 +1,10 @@ -using PARR.DAL.Models.Base; +using PARR.Domain.Entities.Base; using System.ComponentModel.DataAnnotations.Schema; namespace PARR.DAL.Models { [Table("RobotHistories")] - public class RobotHistory : IBase + public class RobotHistory : IBaseEntity { public Guid Id { get; set; } diff --git a/PARR.DAL/Models/Role.cs b/PARR.DAL/Models/Role.cs index 84369046..1d453c25 100644 --- a/PARR.DAL/Models/Role.cs +++ b/PARR.DAL/Models/Role.cs @@ -1,11 +1,11 @@ -using PARR.DAL.Models.Base; +using PARR.Domain.Entities.Base; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; namespace PARR.DAL.Models { [Table("Roles")] - public class Role : IBase + public class Role : IBaseEntity { [Key] public Guid Id { get; set; } diff --git a/PARR.DAL/Models/Schedule/ScheduleExcludeType.cs b/PARR.DAL/Models/Schedule/ScheduleExcludeType.cs index 32f4d37d..ab53e68e 100644 --- a/PARR.DAL/Models/Schedule/ScheduleExcludeType.cs +++ b/PARR.DAL/Models/Schedule/ScheduleExcludeType.cs @@ -1,7 +1,7 @@ using Microsoft.EntityFrameworkCore; using PARR.DAL.Context; -using PARR.DAL.Models.Base; using PARR.DAL.Models.Job; +using PARR.Domain.Entities.Base; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; @@ -12,7 +12,7 @@ namespace PARR.DAL.Models.Schedule /// [Table("ExcludeTypes", Schema = DataContextSettings.Schedule)] [Comment("Расписание регламентной работы - Тип исключения")] - public class ScheduleExcludeType : IBase + public class ScheduleExcludeType : IBaseEntity { [Key] public Guid Id { get; set; } diff --git a/PARR.DAL/Models/Schedule/ScheduleExcludeTypeCalendar.cs b/PARR.DAL/Models/Schedule/ScheduleExcludeTypeCalendar.cs index 5f724234..3a57adfb 100644 --- a/PARR.DAL/Models/Schedule/ScheduleExcludeTypeCalendar.cs +++ b/PARR.DAL/Models/Schedule/ScheduleExcludeTypeCalendar.cs @@ -1,7 +1,7 @@ using Microsoft.EntityFrameworkCore; using PARR.DAL.Context; -using PARR.DAL.Models.Base; using PARR.DAL.Models.Job; +using PARR.Domain.Entities.Base; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; @@ -12,7 +12,7 @@ namespace PARR.DAL.Models.Schedule /// [Table("ExcludeTypeCalendars", Schema = DataContextSettings.Schedule)] [Comment("Расписание регламентной работы, исключение - Календарь")] - public class ScheduleExcludeTypeCalendar : IBase + public class ScheduleExcludeTypeCalendar : IBaseEntity { [Key] public Guid Id { get; set; } diff --git a/PARR.DAL/Models/Subprocess.cs b/PARR.DAL/Models/Subprocess.cs index 172de8dd..20fa96f5 100644 --- a/PARR.DAL/Models/Subprocess.cs +++ b/PARR.DAL/Models/Subprocess.cs @@ -1,5 +1,5 @@ using Microsoft.EntityFrameworkCore; -using PARR.DAL.Models.Base; +using PARR.Domain.Entities.Base; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; @@ -7,7 +7,7 @@ namespace PARR.DAL.Models { [Table("Subprocesses")] [Index(nameof(EsppId), IsUnique = true)] - public class Subprocess : IBase + public class Subprocess : IBaseEntity { [Key] public Guid Id { get; set; } diff --git a/PARR.DAL/Models/Template.cs b/PARR.DAL/Models/Template.cs index 989ad0b9..5b63b2c9 100644 --- a/PARR.DAL/Models/Template.cs +++ b/PARR.DAL/Models/Template.cs @@ -1,9 +1,9 @@ using Microsoft.EntityFrameworkCore; -using PARR.Common.Domain; using PARR.Constants; -using PARR.DAL.Models.Base; -using PARR.DAL.Models.Base.History; -using PARR.DAL.Models.Base.History.Base; +using PARR.Domain.Entities.Base; +using PARR.Domain.Entities.Base.History; +using PARR.Domain.Entities.Base.History.Base; +using PARR.Domain.Enums; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; @@ -11,7 +11,7 @@ namespace PARR.DAL.Models { [Table("Templates")] [Index(nameof(Name), nameof(Index), IsUnique = true)] - public class Template : IBase, ITemplateGeneralProps, IHistoryInitiator, IMyHistory + public class Template : IBaseEntity, ITemplateGeneralProps, IHistoryInitiator, IMyHistory { [Key] public Guid Id { get; set; } diff --git a/PARR.DAL/Models/TemplateHistory.cs b/PARR.DAL/Models/TemplateHistory.cs index cc4078f4..d7f1baa7 100644 --- a/PARR.DAL/Models/TemplateHistory.cs +++ b/PARR.DAL/Models/TemplateHistory.cs @@ -1,15 +1,15 @@ -using PARR.Common.Domain; -using PARR.Constants; -using PARR.DAL.Models.Base; -using PARR.DAL.Models.Base.History; -using PARR.DAL.Models.Base.History.Base; +using PARR.Constants; +using PARR.Domain.Entities.Base; +using PARR.Domain.Entities.Base.History; +using PARR.Domain.Entities.Base.History.Base; +using PARR.Domain.Enums; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; namespace PARR.DAL.Models { [Table("TemplateHistories")] - public class TemplateHistory : IBase, ITemplateGeneralProps, IHistoryInitiator, IHistoryTable + public class TemplateHistory : IBaseEntity, ITemplateGeneralProps, IHistoryInitiator, IHistoryTable { [Key] public Guid Id { get; set; } diff --git a/PARR.DAL/Models/Tnk.cs b/PARR.DAL/Models/Tnk.cs index 2de0f100..f397759d 100644 --- a/PARR.DAL/Models/Tnk.cs +++ b/PARR.DAL/Models/Tnk.cs @@ -1,4 +1,4 @@ -using PARR.DAL.Models.Base; +using PARR.Domain.Entities.Base; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; @@ -6,7 +6,7 @@ namespace PARR.DAL.Models { [Table("Tnks")] //[Index(nameof(EsppId), IsUnique = true)] - public class Tnk : IBase + public class Tnk : IBaseEntity { [Key] public Guid Id { get; set; } diff --git a/PARR.DAL/Models/Unit/Unit.cs b/PARR.DAL/Models/Unit/Unit.cs index db012a74..537b2622 100644 --- a/PARR.DAL/Models/Unit/Unit.cs +++ b/PARR.DAL/Models/Unit/Unit.cs @@ -1,6 +1,6 @@ using Microsoft.EntityFrameworkCore; using PARR.DAL.Context; -using PARR.DAL.Models.Base; +using PARR.Domain.Entities.Base; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; @@ -9,7 +9,7 @@ namespace PARR.DAL.Models.Unit [Table("Units", Schema = DataContextSettings.Unit)] [Comment("Таблица с ЭК")] [Index(nameof(Name), IsUnique = true)] - public class Unit : IBase + public class Unit : IBaseEntity { [Key] public Guid Id { get; set; } diff --git a/PARR.DAL/Models/Unit/UnitField.cs b/PARR.DAL/Models/Unit/UnitField.cs index 64c321e3..cac81f4d 100644 --- a/PARR.DAL/Models/Unit/UnitField.cs +++ b/PARR.DAL/Models/Unit/UnitField.cs @@ -1,7 +1,7 @@ using Microsoft.EntityFrameworkCore; using PARR.DAL.Context; -using PARR.DAL.Models.Base; using PARR.DAL.Models.Job; +using PARR.Domain.Entities.Base; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; @@ -14,7 +14,7 @@ namespace PARR.DAL.Models.Unit [Comment("Справочник полей ЭК")] [Index(nameof(AihitName))] [Index(nameof(EsppName))] - public class UnitField : IBase + public class UnitField : IBaseEntity { [Key] public Guid Id { get; set; } diff --git a/PARR.DAL/Models/Unit/UnitFieldInUnitFieldValue.cs b/PARR.DAL/Models/Unit/UnitFieldInUnitFieldValue.cs index 9799c916..63963124 100644 --- a/PARR.DAL/Models/Unit/UnitFieldInUnitFieldValue.cs +++ b/PARR.DAL/Models/Unit/UnitFieldInUnitFieldValue.cs @@ -1,6 +1,6 @@ using Microsoft.EntityFrameworkCore; using PARR.DAL.Context; -using PARR.DAL.Models.Base; +using PARR.Domain.Entities.Base; using System.ComponentModel.DataAnnotations.Schema; namespace PARR.DAL.Models.Unit @@ -8,7 +8,7 @@ namespace PARR.DAL.Models.Unit [Table("FieldInFieldValues", Schema = DataContextSettings.Unit)] [Comment("Значения полей ЭК")] [PrimaryKey(nameof(FieldId), nameof(FieldValueId))] - public class UnitFieldInUnitFieldValue : IBaseDateCreated + public class UnitFieldInUnitFieldValue : IBaseEntityDateCreated { public Guid FieldId { get; set; } diff --git a/PARR.DAL/Models/Unit/UnitFieldValue.cs b/PARR.DAL/Models/Unit/UnitFieldValue.cs index 004896a6..80a4514b 100644 --- a/PARR.DAL/Models/Unit/UnitFieldValue.cs +++ b/PARR.DAL/Models/Unit/UnitFieldValue.cs @@ -1,6 +1,6 @@ using Microsoft.EntityFrameworkCore; using PARR.DAL.Context; -using PARR.DAL.Models.Base; +using PARR.Domain.Entities.Base; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; @@ -9,7 +9,7 @@ namespace PARR.DAL.Models.Unit [Table("FieldValues", Schema = DataContextSettings.Unit)] [Comment("Значения полей ЭК")] [Index(nameof(Value), IsUnique = true)] - public class UnitFieldValue : IBase + public class UnitFieldValue : IBaseEntity { [Key] public Guid Id { get; set; } diff --git a/PARR.DAL/Models/Unit/UnitInValue.cs b/PARR.DAL/Models/Unit/UnitInValue.cs index 6c22319e..dd66ea41 100644 --- a/PARR.DAL/Models/Unit/UnitInValue.cs +++ b/PARR.DAL/Models/Unit/UnitInValue.cs @@ -1,6 +1,6 @@ using Microsoft.EntityFrameworkCore; using PARR.DAL.Context; -using PARR.DAL.Models.Base; +using PARR.Domain.Entities.Base; using System.ComponentModel.DataAnnotations.Schema; namespace PARR.DAL.Models.Unit @@ -12,7 +12,7 @@ namespace PARR.DAL.Models.Unit [Index(nameof(FieldId), nameof(ValueId))] [Index(nameof(UnitId), nameof(FieldId))] [Index(nameof(FieldId), nameof(UnitId))] - public class UnitInValue : IBaseDateModified, IBaseDateCreated + public class UnitInValue : IBaseEntityDateModified, IBaseEntityDateCreated { public Guid UnitId { get; set; } diff --git a/PARR.DAL/Models/User.cs b/PARR.DAL/Models/User.cs index 1ad64541..e799b300 100644 --- a/PARR.DAL/Models/User.cs +++ b/PARR.DAL/Models/User.cs @@ -1,5 +1,5 @@ using Microsoft.EntityFrameworkCore; -using PARR.DAL.Models.Base; +using PARR.Domain.Entities.Base; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; @@ -7,7 +7,7 @@ namespace PARR.DAL.Models { [Table("Users")] [Index(nameof(Ip), IsUnique = true)] - public class User : IBase + public class User : IBaseEntity { [Key] public Guid Id { get; set; } diff --git a/PARR.DAL/Models/WeekendDay.cs b/PARR.DAL/Models/WeekendDay.cs index b047a642..ef80d84f 100644 --- a/PARR.DAL/Models/WeekendDay.cs +++ b/PARR.DAL/Models/WeekendDay.cs @@ -1,6 +1,6 @@ using Microsoft.EntityFrameworkCore; using PARR.DAL.Context; -using PARR.DAL.Models.Base; +using PARR.Domain.Entities.Base; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; @@ -8,7 +8,7 @@ namespace PARR.DAL.Models { [Table("WeekendDays", Schema = DataContextSettings.Schedule)] [Index(nameof(Date), IsUnique = true)] - public class WeekendDay : IBase + public class WeekendDay : IBaseEntity { [Key] public Guid Id { get; set; } diff --git a/PARR.DAL/Models/WorkGroup.cs b/PARR.DAL/Models/WorkGroup.cs index 4b027470..f05c6e74 100644 --- a/PARR.DAL/Models/WorkGroup.cs +++ b/PARR.DAL/Models/WorkGroup.cs @@ -1,11 +1,11 @@ -using PARR.DAL.Models.Base; +using PARR.Domain.Entities.Base; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; namespace PARR.DAL.Models { [Table("WorkGroups")] - public class WorkGroup : IBase + public class WorkGroup : IBaseEntity { [Key] public Guid Id { get; set; } diff --git a/PARR.DAL/NextRunServices/Subservices/EsppScheduleTransformService.cs b/PARR.DAL/NextRunServices/Subservices/EsppScheduleTransformService.cs index c78caabf..3df9683c 100644 --- a/PARR.DAL/NextRunServices/Subservices/EsppScheduleTransformService.cs +++ b/PARR.DAL/NextRunServices/Subservices/EsppScheduleTransformService.cs @@ -1,7 +1,7 @@ using Microsoft.Extensions.Logging; -using PARR.DAL.Contracts; using PARR.DAL.DomainModels; using PARR.DAL.Services.Interfaces; +using PARR.Domain.Enums; using System.Text.Json; namespace PARR.DAL.NextRunServices.Subservices diff --git a/PARR.DAL/PARR.DAL.csproj b/PARR.DAL/PARR.DAL.csproj index 0bdd442b..efb38964 100644 --- a/PARR.DAL/PARR.DAL.csproj +++ b/PARR.DAL/PARR.DAL.csproj @@ -23,5 +23,11 @@ + + + + + + diff --git a/PARR.DAL/ParrDalInstaller.cs b/PARR.DAL/ParrDalInstaller.cs index d012683c..727814eb 100644 --- a/PARR.DAL/ParrDalInstaller.cs +++ b/PARR.DAL/ParrDalInstaller.cs @@ -33,6 +33,11 @@ namespace PARR.DAL { public static class ParrDalInstaller { + // TODO: Переименовать InstallDalServices -> DependencyInjection + // TODO: Переименовать InstallDalServices -> AddDalServices + // TODO: Избавиться от лишнего + + /// /// Устанавливает Dal сервисы (1) /// diff --git a/PARR.DAL/Services/Abstracts/BaseService.cs b/PARR.DAL/Services/Abstracts/BaseService.cs index 43c2a272..0bd9f774 100644 --- a/PARR.DAL/Services/Abstracts/BaseService.cs +++ b/PARR.DAL/Services/Abstracts/BaseService.cs @@ -1,17 +1,17 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.ChangeTracking; using Microsoft.Extensions.Logging; -using PARR.Common.Domain; using PARR.DAL.Context; using PARR.DAL.DomainModels; -using PARR.DAL.Models.Base; -using PARR.DAL.Models.Base.History.Base; using PARR.DAL.Services.Interfaces.Base; +using PARR.Domain.Entities.Base; +using PARR.Domain.Entities.Base.History; +using PARR.Domain.Entities.Base.History.Base; using System.Reflection; namespace PARR.DAL.Services.Abstracts { - internal abstract class BaseService : IBaseService where T : class, IBase + internal abstract class BaseService : IBaseService where T : class, IBaseEntity { private readonly ILogger> logger; @@ -118,10 +118,10 @@ namespace PARR.DAL.Services.Abstracts /// private void DateModifiedResolver(EntityEntry obj) { - if (obj.Entity is IBaseDateModified) + if (obj.Entity is IBaseEntityDateModified) { logger.LogDebug("Обновляю DateModified для сущности типа {EntityType}", obj.Entity.GetType().Name); - (obj.Entity as IBaseDateModified)!.DateModified = DateTimeOffset.UtcNow; + (obj.Entity as IBaseEntityDateModified)!.DateModified = DateTimeOffset.UtcNow; } } @@ -168,7 +168,7 @@ namespace PARR.DAL.Services.Abstracts FillHistoryProp(ref historyInstance, nameof(IHistoryTable.DateAddedToHistory), DateTimeOffset.UtcNow); // Заполняем Id - FillHistoryProp(ref historyInstance, nameof(IBase.Id), Guid.NewGuid()); + FillHistoryProp(ref historyInstance, nameof(IBaseEntity.Id), Guid.NewGuid()); try { @@ -202,7 +202,7 @@ namespace PARR.DAL.Services.Abstracts return; //Смотрим, если это Id, записываем его в ParentId - var histPropName = prop.Name == nameof(IBase.Id) ? nameof(IHistoryTable.ParentId) : prop.Name; + var histPropName = prop.Name == nameof(IBaseEntity.Id) ? nameof(IHistoryTable.ParentId) : prop.Name; var histProp = historyInstance.GetType().GetProperty(histPropName); if (histProp == null) continue; diff --git a/PARR.DAL/Services/Implementations/RobotConfigurationService.cs b/PARR.DAL/Services/Implementations/RobotConfigurationService.cs index 89067a6c..38005857 100644 --- a/PARR.DAL/Services/Implementations/RobotConfigurationService.cs +++ b/PARR.DAL/Services/Implementations/RobotConfigurationService.cs @@ -2,10 +2,10 @@ using Microsoft.Extensions.Logging; using PARR.Constants; using PARR.DAL.Context; -using PARR.DAL.Contracts; using PARR.DAL.Models; using PARR.DAL.Services.Abstracts; using PARR.DAL.Services.Interfaces; +using PARR.Domain.Enums; namespace PARR.DAL.Services.Implementations { diff --git a/PARR.DAL/Services/Implementations/TaskServices/TaskErrorService.cs b/PARR.DAL/Services/Implementations/TaskServices/TaskErrorService.cs index a29a02a1..7bf5d548 100644 --- a/PARR.DAL/Services/Implementations/TaskServices/TaskErrorService.cs +++ b/PARR.DAL/Services/Implementations/TaskServices/TaskErrorService.cs @@ -1,9 +1,9 @@ using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Logging; using PARR.DAL.Context; -using PARR.DAL.Models.TaskModels; using PARR.DAL.Services.Abstracts; using PARR.DAL.Services.Interfaces.TaskServices; +using PARR.Domain.Entities.TaskEntities; namespace PARR.DAL.Services.Implementations.TaskServices { diff --git a/PARR.DAL/Services/Implementations/TaskServices/TaskService.cs b/PARR.DAL/Services/Implementations/TaskServices/TaskService.cs index 98f67f71..4b7bd134 100644 --- a/PARR.DAL/Services/Implementations/TaskServices/TaskService.cs +++ b/PARR.DAL/Services/Implementations/TaskServices/TaskService.cs @@ -1,9 +1,9 @@ using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Logging; using PARR.DAL.Context; -using PARR.DAL.Models.TaskModels; using PARR.DAL.Services.Abstracts; using PARR.DAL.Services.Interfaces.TaskServices; +using PARR.Domain.Entities.TaskEntities; namespace PARR.DAL.Services.Implementations.TaskServices { diff --git a/PARR.DAL/Services/Implementations/TaskServices/TaskTypeService.cs b/PARR.DAL/Services/Implementations/TaskServices/TaskTypeService.cs index 818556a0..66edd45a 100644 --- a/PARR.DAL/Services/Implementations/TaskServices/TaskTypeService.cs +++ b/PARR.DAL/Services/Implementations/TaskServices/TaskTypeService.cs @@ -1,6 +1,6 @@ using PARR.DAL.Context; -using PARR.DAL.Models.TaskModels; using PARR.DAL.Services.Interfaces.TaskServices; +using PARR.Domain.Entities.TaskEntities; namespace PARR.DAL.Services.Implementations.TaskServices { diff --git a/PARR.DAL/Services/Implementations/TemplateService.cs b/PARR.DAL/Services/Implementations/TemplateService.cs index 5f34b4b9..ffff3bb9 100644 --- a/PARR.DAL/Services/Implementations/TemplateService.cs +++ b/PARR.DAL/Services/Implementations/TemplateService.cs @@ -1,13 +1,13 @@ using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Logging; using Npgsql; -using PARR.Common.Domain; using PARR.Constants; using PARR.DAL.Context; -using PARR.DAL.Contracts; using PARR.DAL.Models; using PARR.DAL.Services.Abstracts; using PARR.DAL.Services.Interfaces; +using PARR.Domain.Entities.Base.History; +using PARR.Domain.Enums; namespace PARR.DAL.Services.Implementations { diff --git a/PARR.DAL/Services/Interfaces/Base/IBaseService.cs b/PARR.DAL/Services/Interfaces/Base/IBaseService.cs index e88e7091..e45d399d 100644 --- a/PARR.DAL/Services/Interfaces/Base/IBaseService.cs +++ b/PARR.DAL/Services/Interfaces/Base/IBaseService.cs @@ -1,10 +1,10 @@ -using PARR.Common.Domain; -using PARR.DAL.DomainModels; -using PARR.DAL.Models.Base; +using PARR.DAL.DomainModels; +using PARR.Domain.Entities.Base; +using PARR.Domain.Entities.Base.History; namespace PARR.DAL.Services.Interfaces.Base { - public interface IBaseService where T : class, IBase + public interface IBaseService where T : class, IBaseEntity { Task GetAsync(Guid id); IQueryable Get(); diff --git a/PARR.DAL/Services/Interfaces/IRobotConfigurationService.cs b/PARR.DAL/Services/Interfaces/IRobotConfigurationService.cs index 37eaab54..792ce998 100644 --- a/PARR.DAL/Services/Interfaces/IRobotConfigurationService.cs +++ b/PARR.DAL/Services/Interfaces/IRobotConfigurationService.cs @@ -1,7 +1,7 @@ using PARR.Constants; -using PARR.DAL.Contracts; using PARR.DAL.Models; using PARR.DAL.Services.Interfaces.Base; +using PARR.Domain.Enums; namespace PARR.DAL.Services.Interfaces { diff --git a/PARR.DAL/Services/Interfaces/ITemplateService.cs b/PARR.DAL/Services/Interfaces/ITemplateService.cs index 231493e4..68bdfe12 100644 --- a/PARR.DAL/Services/Interfaces/ITemplateService.cs +++ b/PARR.DAL/Services/Interfaces/ITemplateService.cs @@ -1,6 +1,6 @@ -using PARR.Common.Domain; -using PARR.DAL.Models; +using PARR.DAL.Models; using PARR.DAL.Services.Interfaces.Base; +using PARR.Domain.Entities.Base.History; namespace PARR.DAL.Services.Interfaces { diff --git a/PARR.DAL/Services/Interfaces/TaskServices/ITaskErrorService.cs b/PARR.DAL/Services/Interfaces/TaskServices/ITaskErrorService.cs index 4ded533c..753eaf6f 100644 --- a/PARR.DAL/Services/Interfaces/TaskServices/ITaskErrorService.cs +++ b/PARR.DAL/Services/Interfaces/TaskServices/ITaskErrorService.cs @@ -1,5 +1,5 @@ -using PARR.DAL.Models.TaskModels; -using PARR.DAL.Services.Interfaces.Base; +using PARR.DAL.Services.Interfaces.Base; +using PARR.Domain.Entities.TaskEntities; namespace PARR.DAL.Services.Interfaces.TaskServices { diff --git a/PARR.DAL/Services/Interfaces/TaskServices/ITaskService.cs b/PARR.DAL/Services/Interfaces/TaskServices/ITaskService.cs index aa22eb81..d52d0284 100644 --- a/PARR.DAL/Services/Interfaces/TaskServices/ITaskService.cs +++ b/PARR.DAL/Services/Interfaces/TaskServices/ITaskService.cs @@ -1,5 +1,5 @@ -using PARR.DAL.Models.TaskModels; -using PARR.DAL.Services.Interfaces.Base; +using PARR.DAL.Services.Interfaces.Base; +using PARR.Domain.Entities.TaskEntities; namespace PARR.DAL.Services.Interfaces.TaskServices { diff --git a/PARR.DAL/Services/Interfaces/TaskServices/ITaskTypeService.cs b/PARR.DAL/Services/Interfaces/TaskServices/ITaskTypeService.cs index 780910e7..e1e0def9 100644 --- a/PARR.DAL/Services/Interfaces/TaskServices/ITaskTypeService.cs +++ b/PARR.DAL/Services/Interfaces/TaskServices/ITaskTypeService.cs @@ -1,4 +1,4 @@ -using PARR.DAL.Models.TaskModels; +using PARR.Domain.Entities.TaskEntities; namespace PARR.DAL.Services.Interfaces.TaskServices { diff --git a/PARR.DAL/TaskServices/ITaskManagementService.cs b/PARR.DAL/TaskServices/ITaskManagementService.cs index 712d5ea6..d74511e2 100644 --- a/PARR.DAL/TaskServices/ITaskManagementService.cs +++ b/PARR.DAL/TaskServices/ITaskManagementService.cs @@ -1,6 +1,6 @@ using PARR.BLL.Contracts.Interfaces; -using PARR.Common.Domain; -using PARR.DAL.Contracts; +using PARR.Domain.Entities.Base.History; +using PARR.Domain.Enums; namespace PARR.DAL.TaskServices { diff --git a/PARR.DAL/TaskServices/TaskManagementService.cs b/PARR.DAL/TaskServices/TaskManagementService.cs index 806bc345..bb3148d7 100644 --- a/PARR.DAL/TaskServices/TaskManagementService.cs +++ b/PARR.DAL/TaskServices/TaskManagementService.cs @@ -1,10 +1,10 @@ using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Logging; using PARR.BLL.Contracts.Interfaces; -using PARR.Common.Domain; -using PARR.DAL.Contracts; -using PARR.DAL.Models.TaskModels; using PARR.DAL.Services.Interfaces.TaskServices; +using PARR.Domain.Entities.Base.History; +using PARR.Domain.Entities.TaskEntities; +using PARR.Domain.Enums; using System.Text.Encodings.Web; using System.Text.Json; diff --git a/PARR.Domain/Constants/DatabaseSchemas.cs b/PARR.Domain/Constants/DatabaseSchemas.cs new file mode 100644 index 00000000..2f074019 --- /dev/null +++ b/PARR.Domain/Constants/DatabaseSchemas.cs @@ -0,0 +1,31 @@ +namespace PARR.Domain.Constants +{ + /// + /// Константы имен схем БД + /// + public class DatabaseSchemas + { + /// + /// Хранение ЭК с компонентным составом, РГ, Типы, С/н, ip, отвтетственные (не пишем шаблоны, расписания) + /// + public const string Unit = "unit"; + + + /// + /// Хранение информации о видах работ, критериях выборки подходящих под работы ЭК и т.д. + /// + public const string Job = "job"; + + + /// + /// Расписание регламентных работ + /// + public const string Schedule = "schedule"; + + + /// + /// Управление очередями + /// + public const string Task = "task"; + } +} diff --git a/PARR.DAL/Models/Base/History/Base/IHistoryTable.cs b/PARR.Domain/Entities/Base/History/Base/IHistoryTable.cs similarity index 83% rename from PARR.DAL/Models/Base/History/Base/IHistoryTable.cs rename to PARR.Domain/Entities/Base/History/Base/IHistoryTable.cs index f335dfbf..62eef9d6 100644 --- a/PARR.DAL/Models/Base/History/Base/IHistoryTable.cs +++ b/PARR.Domain/Entities/Base/History/Base/IHistoryTable.cs @@ -1,9 +1,9 @@ -namespace PARR.DAL.Models.Base.History.Base +namespace PARR.Domain.Entities.Base.History.Base { /// /// Таблица отслеживания изменений основной таблицы (таблица истории) /// - public interface IHistoryTable : IBase + public interface IHistoryTable : IBaseEntity { /// /// Id записи в родительской таблице diff --git a/PARR.DAL/Models/Base/History/Base/IMyHistory.cs b/PARR.Domain/Entities/Base/History/Base/IMyHistory.cs similarity index 90% rename from PARR.DAL/Models/Base/History/Base/IMyHistory.cs rename to PARR.Domain/Entities/Base/History/Base/IMyHistory.cs index 6dbe523d..f7185efd 100644 --- a/PARR.DAL/Models/Base/History/Base/IMyHistory.cs +++ b/PARR.Domain/Entities/Base/History/Base/IMyHistory.cs @@ -1,4 +1,4 @@ -namespace PARR.DAL.Models.Base.History.Base +namespace PARR.Domain.Entities.Base.History.Base { /// /// По этому интерфейсу определям, что хотим вести историю. diff --git a/PARR.Common/Domain/HistoryInitiator.cs b/PARR.Domain/Entities/Base/History/HistoryInitiator.cs similarity index 57% rename from PARR.Common/Domain/HistoryInitiator.cs rename to PARR.Domain/Entities/Base/History/HistoryInitiator.cs index 3a6d535e..612383b9 100644 --- a/PARR.Common/Domain/HistoryInitiator.cs +++ b/PARR.Domain/Entities/Base/History/HistoryInitiator.cs @@ -1,7 +1,10 @@ -using PARR.Constants; +using PARR.Domain.Enums; -namespace PARR.Common.Domain +namespace PARR.Domain.Entities.Base.History { + /// + /// Инициатор изменений, ведение истории + /// public class HistoryInitiator : IHistoryInitiator { public string? InitiatorIp { get; set; } diff --git a/PARR.Common/Domain/IHistoryInitiator.cs b/PARR.Domain/Entities/Base/History/IHistoryInitiator.cs similarity index 90% rename from PARR.Common/Domain/IHistoryInitiator.cs rename to PARR.Domain/Entities/Base/History/IHistoryInitiator.cs index c0913803..dbf11aed 100644 --- a/PARR.Common/Domain/IHistoryInitiator.cs +++ b/PARR.Domain/Entities/Base/History/IHistoryInitiator.cs @@ -1,6 +1,6 @@ -using PARR.Constants; +using PARR.Domain.Enums; -namespace PARR.Common.Domain +namespace PARR.Domain.Entities.Base.History { /// /// Инициатор изменений, ведение истории diff --git a/PARR.DAL/Models/Base/History/ITemplateGeneralProps.cs b/PARR.Domain/Entities/Base/History/ITemplateGeneralProps.cs similarity index 86% rename from PARR.DAL/Models/Base/History/ITemplateGeneralProps.cs rename to PARR.Domain/Entities/Base/History/ITemplateGeneralProps.cs index 39305fe6..8a055e8e 100644 --- a/PARR.DAL/Models/Base/History/ITemplateGeneralProps.cs +++ b/PARR.Domain/Entities/Base/History/ITemplateGeneralProps.cs @@ -1,4 +1,4 @@ -namespace PARR.DAL.Models.Base.History +namespace PARR.Domain.Entities.Base.History { public interface ITemplateGeneralProps { diff --git a/PARR.Domain/Entities/Base/IBaseEntity.cs b/PARR.Domain/Entities/Base/IBaseEntity.cs new file mode 100644 index 00000000..9e45e4d8 --- /dev/null +++ b/PARR.Domain/Entities/Base/IBaseEntity.cs @@ -0,0 +1,12 @@ + +namespace PARR.Domain.Entities.Base +{ + public interface IBaseEntity : IBaseEntityDateCreated, IBaseEntityDateModified + { + public Guid Id { get; set; } + + //DateTimeOffset DateCreated { get; set; } + + //DateTimeOffset? DateModified { get; set; } + } +} diff --git a/PARR.Domain/Entities/Base/IBaseEntityDateCreated.cs b/PARR.Domain/Entities/Base/IBaseEntityDateCreated.cs new file mode 100644 index 00000000..62355fed --- /dev/null +++ b/PARR.Domain/Entities/Base/IBaseEntityDateCreated.cs @@ -0,0 +1,7 @@ +namespace PARR.Domain.Entities.Base +{ + public interface IBaseEntityDateCreated + { + public DateTimeOffset DateCreated { get; set; } + } +} diff --git a/PARR.Domain/Entities/Base/IBaseEntityDateModified.cs b/PARR.Domain/Entities/Base/IBaseEntityDateModified.cs new file mode 100644 index 00000000..0c3447c8 --- /dev/null +++ b/PARR.Domain/Entities/Base/IBaseEntityDateModified.cs @@ -0,0 +1,7 @@ +namespace PARR.Domain.Entities.Base +{ + public interface IBaseEntityDateModified + { + public DateTimeOffset? DateModified { get; set; } + } +} diff --git a/PARR.DAL/Models/TaskModels/TaskError.cs b/PARR.Domain/Entities/TaskEntities/TaskError.cs similarity index 77% rename from PARR.DAL/Models/TaskModels/TaskError.cs rename to PARR.Domain/Entities/TaskEntities/TaskError.cs index 59b16d75..4708993f 100644 --- a/PARR.DAL/Models/TaskModels/TaskError.cs +++ b/PARR.Domain/Entities/TaskEntities/TaskError.cs @@ -1,14 +1,14 @@ using Microsoft.EntityFrameworkCore; -using PARR.DAL.Context; -using PARR.DAL.Models.Base; +using PARR.Domain.Constants; +using PARR.Domain.Entities.Base; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -namespace PARR.DAL.Models.TaskModels +namespace PARR.Domain.Entities.TaskEntities { - [Table("Errors", Schema = DataContextSettings.Task)] + [Table("Errors", Schema = DatabaseSchemas.Task)] [Comment("Таблица ошибок заданий")] - public class TaskError : IBase + public class TaskError : IBaseEntity { [Key] public Guid Id { get; set; } diff --git a/PARR.DAL/Models/TaskModels/TaskItem.cs b/PARR.Domain/Entities/TaskEntities/TaskItem.cs similarity index 82% rename from PARR.DAL/Models/TaskModels/TaskItem.cs rename to PARR.Domain/Entities/TaskEntities/TaskItem.cs index 33a515d7..732ea4af 100644 --- a/PARR.DAL/Models/TaskModels/TaskItem.cs +++ b/PARR.Domain/Entities/TaskEntities/TaskItem.cs @@ -1,17 +1,16 @@ using Microsoft.EntityFrameworkCore; -using PARR.Common.Domain; -using PARR.Constants; -using PARR.DAL.Context; -using PARR.DAL.Contracts; -using PARR.DAL.Models.Base; +using PARR.Domain.Constants; +using PARR.Domain.Entities.Base; +using PARR.Domain.Entities.Base.History; +using PARR.Domain.Enums; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -namespace PARR.DAL.Models.TaskModels +namespace PARR.Domain.Entities.TaskEntities { - [Table("Tasks", Schema = DataContextSettings.Task)] + [Table("Tasks", Schema = DatabaseSchemas.Task)] [Comment("Таблица заданий")] - public class TaskItem : IBase, IHistoryInitiator + public class TaskItem : IBaseEntity, IHistoryInitiator { [Key] public Guid Id { get; set; } diff --git a/PARR.DAL/Models/TaskModels/TaskStatus.cs b/PARR.Domain/Entities/TaskEntities/TaskStatus.cs similarity index 76% rename from PARR.DAL/Models/TaskModels/TaskStatus.cs rename to PARR.Domain/Entities/TaskEntities/TaskStatus.cs index 6bd1d6a0..5fe19cfa 100644 --- a/PARR.DAL/Models/TaskModels/TaskStatus.cs +++ b/PARR.Domain/Entities/TaskEntities/TaskStatus.cs @@ -1,12 +1,12 @@ using Microsoft.EntityFrameworkCore; -using PARR.DAL.Context; -using PARR.DAL.Contracts; +using PARR.Domain.Constants; +using PARR.Domain.Enums; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -namespace PARR.DAL.Models.TaskModels +namespace PARR.Domain.Entities.TaskEntities { - [Table("Statuses", Schema = DataContextSettings.Task)] + [Table("Statuses", Schema = DatabaseSchemas.Task)] [Comment("Таблица статусов заданий")] public class TaskStatus { diff --git a/PARR.DAL/Models/TaskModels/TaskType.cs b/PARR.Domain/Entities/TaskEntities/TaskType.cs similarity index 88% rename from PARR.DAL/Models/TaskModels/TaskType.cs rename to PARR.Domain/Entities/TaskEntities/TaskType.cs index 7a520de8..f58bd921 100644 --- a/PARR.DAL/Models/TaskModels/TaskType.cs +++ b/PARR.Domain/Entities/TaskEntities/TaskType.cs @@ -1,12 +1,12 @@ using Microsoft.EntityFrameworkCore; -using PARR.DAL.Context; -using PARR.DAL.Contracts; +using PARR.Domain.Constants; +using PARR.Domain.Enums; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -namespace PARR.DAL.Models.TaskModels +namespace PARR.Domain.Entities.TaskEntities { - [Table("Types", Schema = DataContextSettings.Task)] + [Table("Types", Schema = DatabaseSchemas.Task)] [Comment("Таблица типов заданий")] public class TaskType { diff --git a/PARR.DAL/Contracts/AgentHistoryLevelEnum.cs b/PARR.Domain/Enums/AgentHistoryLevelEnum.cs similarity index 94% rename from PARR.DAL/Contracts/AgentHistoryLevelEnum.cs rename to PARR.Domain/Enums/AgentHistoryLevelEnum.cs index d862fcab..d2b4945b 100644 --- a/PARR.DAL/Contracts/AgentHistoryLevelEnum.cs +++ b/PARR.Domain/Enums/AgentHistoryLevelEnum.cs @@ -1,4 +1,4 @@ -namespace PARR.DAL.Contracts +namespace PARR.Domain.Enums { /// /// Уровень истории работы агента diff --git a/PARR.DAL/Contracts/ApplicationTypesEnum.cs b/PARR.Domain/Enums/ApplicationTypesEnum.cs similarity index 81% rename from PARR.DAL/Contracts/ApplicationTypesEnum.cs rename to PARR.Domain/Enums/ApplicationTypesEnum.cs index 6fcbc0c4..e0e36a2c 100644 --- a/PARR.DAL/Contracts/ApplicationTypesEnum.cs +++ b/PARR.Domain/Enums/ApplicationTypesEnum.cs @@ -1,4 +1,4 @@ -namespace PARR.DAL.Contracts +namespace PARR.Domain.Enums { public enum ApplicationTypesEnum { diff --git a/PARR.DAL/Contracts/EkStatusEnum.cs b/PARR.Domain/Enums/EkStatusEnum.cs similarity index 97% rename from PARR.DAL/Contracts/EkStatusEnum.cs rename to PARR.Domain/Enums/EkStatusEnum.cs index 49c6b756..940b0bcb 100644 --- a/PARR.DAL/Contracts/EkStatusEnum.cs +++ b/PARR.Domain/Enums/EkStatusEnum.cs @@ -1,4 +1,4 @@ -namespace PARR.DAL.Contracts +namespace PARR.Domain.Enums { /// /// Статусы ЭК diff --git a/PARR.DAL/Contracts/EsppSchTypeEnum.cs b/PARR.Domain/Enums/EsppSchTypeEnum.cs similarity index 97% rename from PARR.DAL/Contracts/EsppSchTypeEnum.cs rename to PARR.Domain/Enums/EsppSchTypeEnum.cs index 2b563868..84883c3e 100644 --- a/PARR.DAL/Contracts/EsppSchTypeEnum.cs +++ b/PARR.Domain/Enums/EsppSchTypeEnum.cs @@ -1,4 +1,4 @@ -namespace PARR.DAL.Contracts +namespace PARR.Domain.Enums { /// /// Расписание ЕСПП: типы повторений diff --git a/PARR.DAL/Contracts/EsppSchTypeScheduleEnum.cs b/PARR.Domain/Enums/EsppSchTypeScheduleEnum.cs similarity index 95% rename from PARR.DAL/Contracts/EsppSchTypeScheduleEnum.cs rename to PARR.Domain/Enums/EsppSchTypeScheduleEnum.cs index 7199475b..33a1e741 100644 --- a/PARR.DAL/Contracts/EsppSchTypeScheduleEnum.cs +++ b/PARR.Domain/Enums/EsppSchTypeScheduleEnum.cs @@ -1,4 +1,4 @@ -namespace PARR.DAL.Contracts +namespace PARR.Domain.Enums { /// /// Расписание ЕСПП: Повторять задачу diff --git a/PARR.DAL/Contracts/JobGroupTypesEnum.cs b/PARR.Domain/Enums/JobGroupTypesEnum.cs similarity index 94% rename from PARR.DAL/Contracts/JobGroupTypesEnum.cs rename to PARR.Domain/Enums/JobGroupTypesEnum.cs index 0c472300..d4a3ae1d 100644 --- a/PARR.DAL/Contracts/JobGroupTypesEnum.cs +++ b/PARR.Domain/Enums/JobGroupTypesEnum.cs @@ -1,4 +1,4 @@ -namespace PARR.DAL.Contracts +namespace PARR.Domain.Enums { public enum JobGroupTypesEnum { diff --git a/PARR.Constants/ParrComponentsEnum.cs b/PARR.Domain/Enums/ParrComponentsEnum.cs similarity index 98% rename from PARR.Constants/ParrComponentsEnum.cs rename to PARR.Domain/Enums/ParrComponentsEnum.cs index db744444..725b1688 100644 --- a/PARR.Constants/ParrComponentsEnum.cs +++ b/PARR.Domain/Enums/ParrComponentsEnum.cs @@ -1,6 +1,6 @@ using System.Text.Json.Serialization; -namespace PARR.Constants +namespace PARR.Domain.Enums { /// /// Компоненты ПАРР diff --git a/PARR.DAL/Contracts/ResponseAreaEnum.cs b/PARR.Domain/Enums/ResponseAreaEnum.cs similarity index 98% rename from PARR.DAL/Contracts/ResponseAreaEnum.cs rename to PARR.Domain/Enums/ResponseAreaEnum.cs index 862c5e2e..0891288c 100644 --- a/PARR.DAL/Contracts/ResponseAreaEnum.cs +++ b/PARR.Domain/Enums/ResponseAreaEnum.cs @@ -1,4 +1,4 @@ -namespace PARR.DAL.Contracts +namespace PARR.Domain.Enums { /// /// Коды дорог diff --git a/PARR.DAL/Contracts/RobotHistoryLevelEnum.cs b/PARR.Domain/Enums/RobotHistoryLevelEnum.cs similarity index 94% rename from PARR.DAL/Contracts/RobotHistoryLevelEnum.cs rename to PARR.Domain/Enums/RobotHistoryLevelEnum.cs index 3d2ed884..23c69319 100644 --- a/PARR.DAL/Contracts/RobotHistoryLevelEnum.cs +++ b/PARR.Domain/Enums/RobotHistoryLevelEnum.cs @@ -1,4 +1,4 @@ -namespace PARR.DAL.Contracts +namespace PARR.Domain.Enums { /// /// Уровень логов работы робота diff --git a/PARR.DAL/Contracts/RobotStatusEnum.cs b/PARR.Domain/Enums/RobotStatusEnum.cs similarity index 95% rename from PARR.DAL/Contracts/RobotStatusEnum.cs rename to PARR.Domain/Enums/RobotStatusEnum.cs index 9ab51669..794eac45 100644 --- a/PARR.DAL/Contracts/RobotStatusEnum.cs +++ b/PARR.Domain/Enums/RobotStatusEnum.cs @@ -1,4 +1,4 @@ -namespace PARR.DAL.Contracts +namespace PARR.Domain.Enums { /// /// Статусы работы робота PARR.DAL.Models.RobotStatus diff --git a/PARR.DAL/Contracts/ScheduleExcludeTypeEnum.cs b/PARR.Domain/Enums/ScheduleExcludeTypeEnum.cs similarity index 94% rename from PARR.DAL/Contracts/ScheduleExcludeTypeEnum.cs rename to PARR.Domain/Enums/ScheduleExcludeTypeEnum.cs index 64cde643..16ed1c44 100644 --- a/PARR.DAL/Contracts/ScheduleExcludeTypeEnum.cs +++ b/PARR.Domain/Enums/ScheduleExcludeTypeEnum.cs @@ -1,4 +1,4 @@ -namespace PARR.DAL.Contracts +namespace PARR.Domain.Enums { /// /// Расписание регламентной работы - Тип исключения diff --git a/PARR.DAL/Contracts/TaskItemStatusEnum.cs b/PARR.Domain/Enums/TaskItemStatusEnum.cs similarity index 95% rename from PARR.DAL/Contracts/TaskItemStatusEnum.cs rename to PARR.Domain/Enums/TaskItemStatusEnum.cs index 299273d3..8708ce96 100644 --- a/PARR.DAL/Contracts/TaskItemStatusEnum.cs +++ b/PARR.Domain/Enums/TaskItemStatusEnum.cs @@ -1,4 +1,4 @@ -namespace PARR.DAL.Contracts +namespace PARR.Domain.Enums { // TODO: Сначала надо переименовать TaskStatusEnum -> RobotTaskStatusEnum, а потом TaskTaskStatusEnum -> TaskStatusEnum diff --git a/PARR.DAL/Contracts/TaskStatusEnum.cs b/PARR.Domain/Enums/TaskStatusEnum.cs similarity index 95% rename from PARR.DAL/Contracts/TaskStatusEnum.cs rename to PARR.Domain/Enums/TaskStatusEnum.cs index cb364f4a..2ef0901f 100644 --- a/PARR.DAL/Contracts/TaskStatusEnum.cs +++ b/PARR.Domain/Enums/TaskStatusEnum.cs @@ -1,4 +1,4 @@ -namespace PARR.DAL.Contracts +namespace PARR.Domain.Enums { //TODO: Надо это переименовать в RobotTaskStatusEnum diff --git a/PARR.DAL/Contracts/TaskTypeEnum.cs b/PARR.Domain/Enums/TaskTypeEnum.cs similarity index 87% rename from PARR.DAL/Contracts/TaskTypeEnum.cs rename to PARR.Domain/Enums/TaskTypeEnum.cs index 2f163d1b..665b5645 100644 --- a/PARR.DAL/Contracts/TaskTypeEnum.cs +++ b/PARR.Domain/Enums/TaskTypeEnum.cs @@ -1,4 +1,4 @@ -namespace PARR.DAL.Contracts +namespace PARR.Domain.Enums { /// /// Типы заданий diff --git a/PARR.Domain/PARR.Domain.csproj b/PARR.Domain/PARR.Domain.csproj new file mode 100644 index 00000000..6dd9b14e --- /dev/null +++ b/PARR.Domain/PARR.Domain.csproj @@ -0,0 +1,19 @@ + + + + net7.0 + enable + enable + + + + + + + + + + + + + diff --git a/PARR.EsppOrderManager/EsppOrderManager.cs b/PARR.EsppOrderManager/EsppOrderManager.cs index acf74eb6..1d2504a2 100644 --- a/PARR.EsppOrderManager/EsppOrderManager.cs +++ b/PARR.EsppOrderManager/EsppOrderManager.cs @@ -3,12 +3,11 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using PARR.BLL.Domain.Mq; using PARR.BLL.Services.Interfaces; -using PARR.DAL.Contracts; using PARR.DAL.Models; using PARR.DAL.Services.Interfaces; +using PARR.Domain.Enums; using PARR.EsppOrderManager.Services; using PARR.EsppOrderManager.Settings; -using System.Threading.Tasks; namespace PARR.EsppOrderManager { diff --git a/PARR.EsppScheduleSync/Domain/EsppObjectSchedule.cs b/PARR.EsppScheduleSync/Domain/EsppObjectSchedule.cs index a2f45892..77cbb600 100644 --- a/PARR.EsppScheduleSync/Domain/EsppObjectSchedule.cs +++ b/PARR.EsppScheduleSync/Domain/EsppObjectSchedule.cs @@ -1,5 +1,5 @@ using PARR.Constants; -using PARR.DAL.Contracts; +using PARR.Domain.Enums; using PARR.EsppSync; using PARR.EsppSync.Attributes; diff --git a/PARR.EsppScheduleSync/ScheduleSyncher.cs b/PARR.EsppScheduleSync/ScheduleSyncher.cs index 56617a03..d62db435 100644 --- a/PARR.EsppScheduleSync/ScheduleSyncher.cs +++ b/PARR.EsppScheduleSync/ScheduleSyncher.cs @@ -3,13 +3,14 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using PARR.BLL.Helpers; using PARR.BLL.Services.Interfaces; -using PARR.Common.Domain; using PARR.Constants; using PARR.DAL.Contracts; using PARR.DAL.Models; using PARR.DAL.NextRunServices; using PARR.DAL.Services.Interfaces; using PARR.DAL.Services.Interfaces.Schedule; +using PARR.Domain.Entities.Base.History; +using PARR.Domain.Enums; using PARR.EsppScheduleSync.Domain; using PARR.EsppScheduleSync.Settings; using PARR.EsppSync; diff --git a/PARR.EsppSync/SyncService.cs b/PARR.EsppSync/SyncService.cs index d87f4d18..735a82ee 100644 --- a/PARR.EsppSync/SyncService.cs +++ b/PARR.EsppSync/SyncService.cs @@ -1,12 +1,11 @@ using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; -using PARR.Common.Domain; -using PARR.Constants; -using PARR.DAL.Contracts; using PARR.DAL.DomainServices.Shortcodes; using PARR.DAL.Models; using PARR.DAL.Services.Interfaces; +using PARR.Domain.Entities.Base.History; +using PARR.Domain.Enums; using PARR.EsppSync.Attributes; using PARR.EsppSync.Helpers; using System.Reflection; diff --git a/PARR.Infrastructure/DependencyInjection.cs b/PARR.Infrastructure/DependencyInjection.cs new file mode 100644 index 00000000..cf7a03af --- /dev/null +++ b/PARR.Infrastructure/DependencyInjection.cs @@ -0,0 +1,25 @@ +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; + +namespace PARR.Infrastructure +{ + public static class DependencyInjection + { + /// + /// Регистрация инфраструктурных сервисов + /// + /// + /// + /// + public static IServiceCollection AddInfrastructureServices(this IServiceCollection services, IConfiguration configuration) + { + // тут регистрируем все внешние сервисы, Rabbit, Redis, Email... + + //services.AddTransient(); + //services.AddTransient(); + ////Redis (singleton) + + return services; + } + } +} diff --git a/PARR.Infrastructure/PARR.Infrastructure.csproj b/PARR.Infrastructure/PARR.Infrastructure.csproj new file mode 100644 index 00000000..1440b026 --- /dev/null +++ b/PARR.Infrastructure/PARR.Infrastructure.csproj @@ -0,0 +1,18 @@ + + + + net7.0 + enable + enable + + + + + + + + + + + + diff --git a/PARR.JobAutoControl/JobAutoControlManager.cs b/PARR.JobAutoControl/JobAutoControlManager.cs index 6ab362b6..fd3ee0a6 100644 --- a/PARR.JobAutoControl/JobAutoControlManager.cs +++ b/PARR.JobAutoControl/JobAutoControlManager.cs @@ -4,6 +4,8 @@ using Microsoft.Extensions.Logging; using PARR.BLL.Domain.Mq; using PARR.BLL.Services.Interfaces; using PARR.DAL.Services.Interfaces.Job; +using PARR.Domain.Entities.Base.History; +using PARR.Domain.Enums; using PARR.JobAutoControl.Settings; using System.Text.Json; @@ -69,11 +71,11 @@ namespace PARR.JobAutoControl Action = Constants.TemplateMatcherActionEnum.Sync, EntityType = Constants.SyncTaskEntityTypeEnum.Job, Id = t.JobId, - Initiator = new Common.Domain.HistoryInitiator + Initiator = new HistoryInitiator { InitiatorComment = $"Инициатор авто-контроль, периодичность: {workerSettings.RepeatEvery}", InitiatorIp = null, - InitiatorParrComponentId = Constants.ParrComponentsEnum.JobAutoControl + InitiatorParrComponentId = ParrComponentsEnum.JobAutoControl } }).ToList(); diff --git a/PARR.Master/Services/OrderMasterService.cs b/PARR.Master/Services/OrderMasterService.cs index 4a33c372..6a1963fc 100644 --- a/PARR.Master/Services/OrderMasterService.cs +++ b/PARR.Master/Services/OrderMasterService.cs @@ -3,9 +3,9 @@ using Microsoft.Extensions.Logging; using PARR.BLL.Domain.Mq; using PARR.BLL.Services.Interfaces; using PARR.Constants; -using PARR.DAL.Contracts; using PARR.DAL.Models; using PARR.DAL.Services.Interfaces; +using PARR.Domain.Enums; using PARR.Master.Settings; using System.Text.Encodings.Web; using System.Text.Json; diff --git a/PARR.NextRun/NextRunIntervalService.cs b/PARR.NextRun/NextRunIntervalService.cs index 094093e0..92f79547 100644 --- a/PARR.NextRun/NextRunIntervalService.cs +++ b/PARR.NextRun/NextRunIntervalService.cs @@ -1,8 +1,8 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using PARR.BLL.Services.Interfaces; -using PARR.Common.Domain; -using PARR.Constants; +using PARR.Domain.Entities.Base.History; +using PARR.Domain.Enums; using PARR.NextRun.Services; using PARR.NextRun.Settings; diff --git a/PARR.NextRun/Services/INextRunUpdateService.cs b/PARR.NextRun/Services/INextRunUpdateService.cs index 9b0e58d1..04b7d94a 100644 --- a/PARR.NextRun/Services/INextRunUpdateService.cs +++ b/PARR.NextRun/Services/INextRunUpdateService.cs @@ -1,5 +1,5 @@ -using PARR.Common.Domain; -using PARR.DAL.Models; +using PARR.DAL.Models; +using PARR.Domain.Entities.Base.History; namespace PARR.NextRun.Services { diff --git a/PARR.NextRun/Services/NextRunUpdateService.cs b/PARR.NextRun/Services/NextRunUpdateService.cs index 3117a21e..c050bb8c 100644 --- a/PARR.NextRun/Services/NextRunUpdateService.cs +++ b/PARR.NextRun/Services/NextRunUpdateService.cs @@ -1,10 +1,10 @@ using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Logging; -using PARR.Common.Domain; using PARR.Constants; using PARR.DAL.Models; using PARR.DAL.NextRunServices; using PARR.DAL.Services.Interfaces; +using PARR.Domain.Entities.Base.History; namespace PARR.NextRun.Services { diff --git a/PARR.TemplateActivator/Services/ValidatorService.cs b/PARR.TemplateActivator/Services/ValidatorService.cs index 6b0838a7..ed8622fc 100644 --- a/PARR.TemplateActivator/Services/ValidatorService.cs +++ b/PARR.TemplateActivator/Services/ValidatorService.cs @@ -2,11 +2,11 @@ using Microsoft.Extensions.Logging; using PARR.Constants; using PARR.DAL.Models; -using PARR.DAL.Models.Base; using PARR.DAL.Models.Job; using PARR.DAL.Services.Interfaces; using PARR.DAL.Services.Interfaces.Base; using PARR.DAL.Services.Interfaces.Job; +using PARR.Domain.Entities.Base; namespace PARR.TemplateActivator; @@ -44,7 +44,7 @@ internal class ValidatorService : IValidatorService private async Task IsValidAync(Guid id) where TService : class, IBaseService - where TEntity : class, IBase + where TEntity : class, IBaseEntity { using (var scope = serviceProvider.CreateScope()) { diff --git a/PARR.TemplateActivator/TemplateActivator.cs b/PARR.TemplateActivator/TemplateActivator.cs index 31e253d3..92158251 100644 --- a/PARR.TemplateActivator/TemplateActivator.cs +++ b/PARR.TemplateActivator/TemplateActivator.cs @@ -2,7 +2,6 @@ using Microsoft.Extensions.Logging; using PARR.BLL.Domain.Mq; using PARR.Constants; -using PARR.DAL.Contracts; using PARR.DAL.Models; using PARR.DAL.Services.Interfaces; diff --git a/PARR.TemplateDistributor/TemplateDistributor.cs b/PARR.TemplateDistributor/TemplateDistributor.cs index 0616d669..bb947e4e 100644 --- a/PARR.TemplateDistributor/TemplateDistributor.cs +++ b/PARR.TemplateDistributor/TemplateDistributor.cs @@ -2,9 +2,9 @@ using Microsoft.Extensions.Logging; using PARR.BLL.Domain.Mq; using PARR.Constants; -using PARR.DAL.Contracts; using PARR.DAL.NextRunServices; using PARR.DAL.Services.Interfaces; +using PARR.Domain.Enums; namespace PARR.TemplateDistributor { diff --git a/PARR.TemplateGeneratorWorker/TemplateGenerator.cs b/PARR.TemplateGeneratorWorker/TemplateGenerator.cs index fee27c1c..0c08c45c 100644 --- a/PARR.TemplateGeneratorWorker/TemplateGenerator.cs +++ b/PARR.TemplateGeneratorWorker/TemplateGenerator.cs @@ -1,13 +1,14 @@ using Microsoft.EntityFrameworkCore; using PARR.BLL.Domain.Mq; using PARR.BLL.Services.Interfaces; -using PARR.Common.Domain; using PARR.Constants; using PARR.DAL.DomainServices.Shortcodes; using PARR.DAL.Models; using PARR.DAL.NextRunServices; using PARR.DAL.Services.Interfaces; using PARR.DAL.Services.Interfaces.Job; +using PARR.Domain.Entities.Base.History; +using PARR.Domain.Enums; using PARR.TemplateGeneratorWorker.Services; namespace PARR.TemplateGeneratorWorker diff --git a/PARR.TemplateMatcher/ITemplateMatcher.cs b/PARR.TemplateMatcher/ITemplateMatcher.cs index 28b6e200..a80509ba 100644 --- a/PARR.TemplateMatcher/ITemplateMatcher.cs +++ b/PARR.TemplateMatcher/ITemplateMatcher.cs @@ -1,4 +1,4 @@ -using PARR.Common.Domain; +using PARR.Domain.Entities.Base.History; namespace PARR.TemplateMatcher { diff --git a/PARR.TemplateMatcher/Services/Implemetaions/GroupedTemplateSynchronizer.cs b/PARR.TemplateMatcher/Services/Implemetaions/GroupedTemplateSynchronizer.cs index 6b26127a..5db25285 100644 --- a/PARR.TemplateMatcher/Services/Implemetaions/GroupedTemplateSynchronizer.cs +++ b/PARR.TemplateMatcher/Services/Implemetaions/GroupedTemplateSynchronizer.cs @@ -2,7 +2,6 @@ using Microsoft.Extensions.Logging; using PARR.BLL.Domain.Mq; using PARR.BLL.Services.Interfaces; -using PARR.Common.Domain; using PARR.Constants; using PARR.DAL.Cache.Models; using PARR.DAL.DomainServices.Interfaces; @@ -13,7 +12,7 @@ using PARR.DAL.Models.Job; using PARR.DAL.Services.Interfaces; using PARR.DAL.Services.Interfaces.Job; using PARR.DAL.Services.Interfaces.Unit; - +using PARR.Domain.Entities.Base.History; using PARR.TemplateMatcher.Services.Interfaces; using PARR.TemplateMatcher.Settings; diff --git a/PARR.TemplateMatcher/Services/Implemetaions/SimpleTemplateSynchronizer.cs b/PARR.TemplateMatcher/Services/Implemetaions/SimpleTemplateSynchronizer.cs index 7ae5cfd6..299aafd1 100644 --- a/PARR.TemplateMatcher/Services/Implemetaions/SimpleTemplateSynchronizer.cs +++ b/PARR.TemplateMatcher/Services/Implemetaions/SimpleTemplateSynchronizer.cs @@ -3,7 +3,6 @@ using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using PARR.BLL.Domain.Mq; using PARR.BLL.Services.Interfaces; -using PARR.Common.Domain; using PARR.Constants; using PARR.DAL.Cache.Models; using PARR.DAL.Contracts; @@ -12,10 +11,10 @@ using PARR.DAL.DomainServices.Shortcodes; using PARR.DAL.DomainServices.UnitFilterService; using PARR.DAL.Models; using PARR.DAL.Models.Job; -using PARR.DAL.NextRunServices; using PARR.DAL.Services.Interfaces; using PARR.DAL.Services.Interfaces.Job; using PARR.DAL.Services.Interfaces.Unit; +using PARR.Domain.Entities.Base.History; using PARR.TemplateMatcher.Services.Interfaces; using PARR.TemplateMatcher.Settings; diff --git a/PARR.TemplateMatcher/Services/Implemetaions/TemplateDeactivator.cs b/PARR.TemplateMatcher/Services/Implemetaions/TemplateDeactivator.cs index ccf27da0..e6fd62f7 100644 --- a/PARR.TemplateMatcher/Services/Implemetaions/TemplateDeactivator.cs +++ b/PARR.TemplateMatcher/Services/Implemetaions/TemplateDeactivator.cs @@ -2,12 +2,12 @@ using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using PARR.BLL.Domain.Mq; -using PARR.Common.Domain; using PARR.Constants; using PARR.DAL.Contracts; using PARR.DAL.Models; using PARR.DAL.Services.Interfaces; using PARR.DAL.Services.Interfaces.Job; +using PARR.Domain.Entities.Base.History; using PARR.TemplateMatcher.Services.Interfaces; using PARR.TemplateMatcher.Settings; diff --git a/PARR.TemplateMatcher/Services/Implemetaions/TemplateReuser.cs b/PARR.TemplateMatcher/Services/Implemetaions/TemplateReuser.cs index 9115a294..422130ae 100644 --- a/PARR.TemplateMatcher/Services/Implemetaions/TemplateReuser.cs +++ b/PARR.TemplateMatcher/Services/Implemetaions/TemplateReuser.cs @@ -1,8 +1,8 @@ using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Logging; -using PARR.Common.Domain; using PARR.DAL.Models; using PARR.DAL.Services.Interfaces; +using PARR.Domain.Entities.Base.History; using PARR.TemplateMatcher.Services.Interfaces; namespace PARR.TemplateMatcher.Services.Implementations; diff --git a/PARR.TemplateMatcher/Services/Interfaces/ITemplateDeactivator.cs b/PARR.TemplateMatcher/Services/Interfaces/ITemplateDeactivator.cs index 3fc6474d..4c3574ff 100644 --- a/PARR.TemplateMatcher/Services/Interfaces/ITemplateDeactivator.cs +++ b/PARR.TemplateMatcher/Services/Interfaces/ITemplateDeactivator.cs @@ -1,5 +1,5 @@ -using PARR.Common.Domain; -using PARR.DAL.Models; +using PARR.DAL.Models; +using PARR.Domain.Entities.Base.History; namespace PARR.TemplateMatcher.Services.Interfaces { diff --git a/PARR.TemplateMatcher/Services/Interfaces/ITemplateReuser.cs b/PARR.TemplateMatcher/Services/Interfaces/ITemplateReuser.cs index 7d2944a4..8b6b2c5c 100644 --- a/PARR.TemplateMatcher/Services/Interfaces/ITemplateReuser.cs +++ b/PARR.TemplateMatcher/Services/Interfaces/ITemplateReuser.cs @@ -1,5 +1,5 @@ -using PARR.Common.Domain; -using PARR.DAL.Models; +using PARR.DAL.Models; +using PARR.Domain.Entities.Base.History; namespace PARR.TemplateMatcher.Services.Interfaces { diff --git a/PARR.TemplateMatcher/Services/Interfaces/ITemplateSynchronizer.cs b/PARR.TemplateMatcher/Services/Interfaces/ITemplateSynchronizer.cs index d65b8f2e..f2bd3b1d 100644 --- a/PARR.TemplateMatcher/Services/Interfaces/ITemplateSynchronizer.cs +++ b/PARR.TemplateMatcher/Services/Interfaces/ITemplateSynchronizer.cs @@ -1,4 +1,4 @@ -using PARR.Common.Domain; +using PARR.Domain.Entities.Base.History; namespace PARR.TemplateMatcher.Services.Interfaces { @@ -8,4 +8,4 @@ namespace PARR.TemplateMatcher.Services.Interfaces Task SyncTemplatesForJobGroupAsync(Guid jobGroupId, HistoryInitiator initiator); Task UpdateTemplatesForJobAsync(Guid jobId, HistoryInitiator initiator); } -} +} diff --git a/PARR.TemplateMatcher/TemplateMatcher.cs b/PARR.TemplateMatcher/TemplateMatcher.cs index 66611aee..5cf6d913 100644 --- a/PARR.TemplateMatcher/TemplateMatcher.cs +++ b/PARR.TemplateMatcher/TemplateMatcher.cs @@ -1,9 +1,9 @@ using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Logging; -using PARR.Common.Domain; -using PARR.DAL.Contracts; using PARR.DAL.Models.Job; using PARR.DAL.Services.Interfaces.Job; +using PARR.Domain.Entities.Base.History; +using PARR.Domain.Enums; using PARR.TemplateMatcher.Services.Implementations; using PARR.TemplateMatcher.Services.Interfaces; diff --git a/PARR.TemplateUpdater/PARR.TemplateUpdater.csproj b/PARR.TemplateUpdater/PARR.TemplateUpdater.csproj index 21190861..2b338f52 100644 --- a/PARR.TemplateUpdater/PARR.TemplateUpdater.csproj +++ b/PARR.TemplateUpdater/PARR.TemplateUpdater.csproj @@ -9,6 +9,7 @@ + diff --git a/PARR.TemplateUpdater/Services/TemplateUpdaterService.cs b/PARR.TemplateUpdater/Services/TemplateUpdaterService.cs index ce73801e..c324f324 100644 --- a/PARR.TemplateUpdater/Services/TemplateUpdaterService.cs +++ b/PARR.TemplateUpdater/Services/TemplateUpdaterService.cs @@ -2,13 +2,13 @@ using Microsoft.Extensions.Logging; using PARR.BLL.Domain.Mq; using PARR.Constants; -using PARR.DAL.Contracts; using PARR.DAL.Extensions; using PARR.DAL.Models; using PARR.DAL.NextRunServices; using PARR.DAL.Services.Interfaces; using PARR.DAL.Services.Interfaces.Job; using PARR.DAL.Services.Interfaces.Unit; +using PARR.Domain.Enums; namespace PARR.TemplateUpdater.Services {