diff --git a/PARR.AIHITMainSyncer/AihitMainSyncerInstaller.cs b/PARR.AIHITMainSyncer/AihitMainSyncerInstaller.cs index 4bebc554..7a883bb6 100644 --- a/PARR.AIHITMainSyncer/AihitMainSyncerInstaller.cs +++ b/PARR.AIHITMainSyncer/AihitMainSyncerInstaller.cs @@ -12,7 +12,7 @@ namespace PARR.AIHITMainSyncer { public static void InstallAihitMainSyncerServices(this IServiceCollection services, IConfiguration configuration) { - services.InstallDalServices(configuration); + services.AddDalServices(configuration); services.AddCoreServices(configuration); services.AddInfrastructureServices(configuration); diff --git a/PARR.AIHITMainSyncer/Services/SyncerService.cs b/PARR.AIHITMainSyncer/Services/SyncerService.cs index 00c40c51..46ebea35 100644 --- a/PARR.AIHITMainSyncer/Services/SyncerService.cs +++ b/PARR.AIHITMainSyncer/Services/SyncerService.cs @@ -3,9 +3,9 @@ using Microsoft.Extensions.Logging; using Newtonsoft.Json.Linq; using PARR.AIHITMainSyncer.Settings; using PARR.Core.Common.Interfaces; -using PARR.DAL.Models.Unit; -using PARR.DAL.Services.Interfaces.Unit; +using PARR.Core.Repositories.Interfaces.Unit; using PARR.Domain.Common.Rabbit.Messages; +using PARR.Domain.Entities.Unit; namespace PARR.AIHITMainSyncer.Services { @@ -13,17 +13,17 @@ namespace PARR.AIHITMainSyncer.Services { private readonly ILogger logger; private readonly ITransformService transformService; - private readonly IUnitService unitService; - private readonly IUnitFieldService unitFieldService; - private readonly IUnitFieldValueService unitFieldValueService; + private readonly IUnitRepository unitService; + private readonly IUnitFieldRepository unitFieldService; + private readonly IUnitFieldValueRepository unitFieldValueService; private readonly FieldValueReplacementsSettings fieldValueReplacementsSettings; public SyncerService( ILogger logger, ITransformService transformService, - IUnitService unitService, - IUnitFieldService unitFieldService, - IUnitFieldValueService unitFieldValueService, + IUnitRepository unitService, + IUnitFieldRepository unitFieldService, + IUnitFieldValueRepository unitFieldValueService, FieldValueReplacementsSettings fieldValueReplacementsSettings ) { diff --git a/PARR.AIHITRelationshipsSyncer/AihitRelationshpsSyncerInstaller.cs b/PARR.AIHITRelationshipsSyncer/AihitRelationshpsSyncerInstaller.cs index 5fe41ce6..4c6311c8 100644 --- a/PARR.AIHITRelationshipsSyncer/AihitRelationshpsSyncerInstaller.cs +++ b/PARR.AIHITRelationshipsSyncer/AihitRelationshpsSyncerInstaller.cs @@ -15,7 +15,7 @@ namespace PARR.AIHITRelationshipsSyncer { public static void InstallAihitRelationshpsSyncerServices(this IServiceCollection services, IConfiguration configuration) { - services.InstallDalServices(configuration); + services.AddDalServices(configuration); services.AddCoreServices(configuration); services.AddInfrastructureServices(configuration); diff --git a/PARR.AIHITRelationshipsSyncer/Services/Implementations/RelationshipsSyncService.cs b/PARR.AIHITRelationshipsSyncer/Services/Implementations/RelationshipsSyncService.cs index 61785cbb..25e6074b 100644 --- a/PARR.AIHITRelationshipsSyncer/Services/Implementations/RelationshipsSyncService.cs +++ b/PARR.AIHITRelationshipsSyncer/Services/Implementations/RelationshipsSyncService.cs @@ -3,20 +3,20 @@ using Microsoft.Extensions.Logging; using PARR.AIHITRelationshipsSyncer.Models; using PARR.AIHITRelationshipsSyncer.Services.Interfaces; using PARR.AIHITRelationshipsSyncer.Settings; -using PARR.DAL.Models.Unit; -using PARR.DAL.Services.Interfaces.Unit; +using PARR.Core.Repositories.Interfaces.Unit; +using PARR.Domain.Entities.Unit; namespace PARR.AIHITRelationshipsSyncer.Services.Implementations { internal class RelationshipsSyncService : IRelationshipsSyncService { private readonly ILogger logger; - private readonly IUnitService unitService; + private readonly IUnitRepository unitService; private readonly WorkerSettings workerSettings; public RelationshipsSyncService( ILogger logger, - IUnitService unitService, + IUnitRepository unitService, WorkerSettings workerSettings ) { diff --git a/PARR.API/Controllers/V1/AgentHistoryController.cs b/PARR.API/Controllers/V1/AgentHistoryController.cs index dd1831a5..99179b22 100644 --- a/PARR.API/Controllers/V1/AgentHistoryController.cs +++ b/PARR.API/Controllers/V1/AgentHistoryController.cs @@ -11,11 +11,11 @@ using PARR.API.Contracts.V1.Responses.Base; using PARR.API.Controllers.V1.Base; using PARR.API.Extensions; using PARR.API.Services.Interfaces; -using PARR.DAL.Models; -using PARR.DAL.Services.Interfaces; -using PARR.DAL.Services.Interfaces.Unit; +using PARR.Core.Repositories.Interfaces; +using PARR.Core.Repositories.Interfaces.Unit; using PARR.Domain.Common.Pagination; using PARR.Domain.Common.Roles; +using PARR.Domain.Entities; namespace PARR.API.Controllers.V1 { @@ -25,22 +25,22 @@ namespace PARR.API.Controllers.V1 public class AgentHistoryController : BaseApiController { private readonly IValidator validator; - private readonly IAgentHistoryService agentHistoryService; + private readonly IAgentHistoryRepository agentHistoryService; private readonly IUriService uriService; private readonly IMapper mapper; - private readonly ITemplateService templateService; + private readonly ITemplateRepository templateService; private readonly IClientService clientService; - private readonly IUnitService unitService; + private readonly IUnitRepository unitService; private readonly ILogger logger; public AgentHistoryController( IValidator validator, - IAgentHistoryService agentHistoryService, + IAgentHistoryRepository agentHistoryService, IUriService uriService, IMapper mapper, - ITemplateService templateService, + ITemplateRepository templateService, IClientService clientService, - IUnitService unitService, + IUnitRepository unitService, ILogger logger ) { diff --git a/PARR.API/Controllers/V1/AgentTaskController.cs b/PARR.API/Controllers/V1/AgentTaskController.cs index 0821e303..1dad7a9c 100644 --- a/PARR.API/Controllers/V1/AgentTaskController.cs +++ b/PARR.API/Controllers/V1/AgentTaskController.cs @@ -4,8 +4,8 @@ using PARR.API.Contracts.V1; using PARR.API.Contracts.V1.Requests.Queries; using PARR.API.Controllers.V1.Base; using PARR.API.Services.Interfaces; -using PARR.DAL.Services.Interfaces; -using PARR.DAL.Services.Interfaces.Unit; +using PARR.Core.Repositories.Interfaces; +using PARR.Core.Repositories.Interfaces.Unit; using PARR.Domain.Common.Roles; namespace PARR.API.Controllers.V1 @@ -17,15 +17,15 @@ namespace PARR.API.Controllers.V1 public class AgentTaskController : BaseApiController { private readonly IClientService clientService; - private readonly ITemplateService templateService; - private readonly IUnitService unitService; + private readonly ITemplateRepository templateService; + private readonly IUnitRepository unitService; //private readonly IEsppScheduleTransformService esppScheduleTransformService; private readonly ILogger logger; public AgentTaskController( IClientService clientService, - ITemplateService templateService, - IUnitService unitService, + ITemplateRepository templateService, + IUnitRepository unitService, //IEsppScheduleTransformService esppScheduleTransformService, ILogger logger ) diff --git a/PARR.API/Controllers/V1/DistributionPeriodController.cs b/PARR.API/Controllers/V1/DistributionPeriodController.cs index 939df0f1..42dcb78a 100644 --- a/PARR.API/Controllers/V1/DistributionPeriodController.cs +++ b/PARR.API/Controllers/V1/DistributionPeriodController.cs @@ -6,7 +6,7 @@ using PARR.API.Contracts.V1; using PARR.API.Contracts.V1.Responses; using PARR.API.Contracts.V1.Responses.Base; using PARR.API.Controllers.V1.Base; -using PARR.DAL.Services.Interfaces; +using PARR.Core.Repositories.Interfaces; using PARR.Domain.Common.Roles; namespace PARR.API.Controllers.V1 @@ -17,11 +17,11 @@ namespace PARR.API.Controllers.V1 [Authorize(Roles = ParrRoles.Administrator.Role)] public class DistributionPeriodController : BaseApiController { - private readonly IDistributionPeriodService distributionPeriodService; + private readonly IDistributionPeriodRepository distributionPeriodService; private readonly IMapper mapper; public DistributionPeriodController( - IDistributionPeriodService distributionPeriodService, + IDistributionPeriodRepository distributionPeriodService, IMapper mapper ) { diff --git a/PARR.API/Controllers/V1/EsppScheduleTypeScheduleController.cs b/PARR.API/Controllers/V1/EsppScheduleTypeScheduleController.cs index 0a2ef7ee..538c58cb 100644 --- a/PARR.API/Controllers/V1/EsppScheduleTypeScheduleController.cs +++ b/PARR.API/Controllers/V1/EsppScheduleTypeScheduleController.cs @@ -6,7 +6,7 @@ using PARR.API.Contracts.V1; using PARR.API.Contracts.V1.Responses; using PARR.API.Contracts.V1.Responses.Base; using PARR.API.Controllers.V1.Base; -using PARR.DAL.Services.Interfaces; +using PARR.Core.Repositories.Interfaces.Schedule; using PARR.Domain.Common.Roles; namespace PARR.API.Controllers.V1 @@ -18,11 +18,11 @@ namespace PARR.API.Controllers.V1 public class EsppScheduleTypeScheduleController : BaseApiController { private readonly IMapper mapper; - private readonly IEsppSchTypeScheduleService esppSchTypeScheduleService; + private readonly IEsppSchTypeScheduleRepository esppSchTypeScheduleService; public EsppScheduleTypeScheduleController( IMapper mapper, - IEsppSchTypeScheduleService esppSchTypeScheduleService + IEsppSchTypeScheduleRepository esppSchTypeScheduleService ) { this.mapper = mapper; diff --git a/PARR.API/Controllers/V1/JobAutoControlController.cs b/PARR.API/Controllers/V1/JobAutoControlController.cs index d70ce5a5..813919ea 100644 --- a/PARR.API/Controllers/V1/JobAutoControlController.cs +++ b/PARR.API/Controllers/V1/JobAutoControlController.cs @@ -1,16 +1,5 @@ -using AutoMapper; -using FluentValidation; -using Microsoft.AspNetCore.Authorization; -using Microsoft.AspNetCore.Mvc; -using Microsoft.EntityFrameworkCore; -using PARR.API.Contracts.V1; -using PARR.API.Contracts.V1.Requests; -using PARR.API.Contracts.V1.Responses; -using PARR.API.Contracts.V1.Responses.Base; +using Microsoft.AspNetCore.Authorization; using PARR.API.Controllers.V1.Base; -using PARR.API.Services.Interfaces; -using PARR.DAL.Models; -using PARR.DAL.Services.Interfaces; using PARR.Domain.Common.Roles; namespace PARR.API.Controllers.V1 diff --git a/PARR.API/Controllers/V1/JobController.cs b/PARR.API/Controllers/V1/JobController.cs index 567c4ca7..8de9cd89 100644 --- a/PARR.API/Controllers/V1/JobController.cs +++ b/PARR.API/Controllers/V1/JobController.cs @@ -12,20 +12,19 @@ using PARR.API.Controllers.V1.Base; using PARR.API.Extensions; using PARR.API.Services.Interfaces; using PARR.API.Settings; -using PARR.BLL.Helpers; using PARR.Core.Common.Helpers; using PARR.Core.Common.Interfaces.RabbitServices; +using PARR.Core.Repositories.Interfaces; +using PARR.Core.Repositories.Interfaces.Job; +using PARR.Core.Repositories.Interfaces.Unit; using PARR.DAL.DomainServices.Interfaces; using PARR.DAL.DomainServices.UnitFilterService; using PARR.DAL.Extensions; -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.Common.Pagination; using PARR.Domain.Common.Rabbit.Messages; using PARR.Domain.Common.Roles; using PARR.Domain.Entities.Base.History; +using PARR.Domain.Entities.Job; using PARR.Domain.Enums; namespace PARR.API.Controllers.V1 @@ -39,29 +38,29 @@ namespace PARR.API.Controllers.V1 private readonly ILogger logger; private readonly IMapper mapper; private readonly IUriService uriService; - private readonly IJobService jobService; - private readonly ITemplateService templateService; + private readonly IJobRepository jobService; + private readonly ITemplateRepository templateService; private readonly IValidator jobValidator; private readonly IRabbitService mqService; private readonly MqSettings mqSettings; private readonly IClientService clientService; - private readonly IJobAutoControlService jobAutoControlService; + private readonly IJobAutoControlRepository jobAutoControlService; private readonly IMatchingStatusService matchingStatusService; public JobController( ILogger logger, IMapper mapper, IUriService uriService, - IJobService jobService, - ITemplateService templateService, - IJobGroupService jobGroupService, + IJobRepository jobService, + ITemplateRepository templateService, + IJobGroupRepository jobGroupService, IValidator jobValidator, IUnitFilterService unitFilterService, - IUnitService unitService, + IUnitRepository unitService, IRabbitService mqService, MqSettings mqSettings, IClientService clientService, - IJobAutoControlService jobAutoControlService, + IJobAutoControlRepository jobAutoControlService, IMatchingStatusService matchingStatusService ) { diff --git a/PARR.API/Controllers/V1/JobGroupController.cs b/PARR.API/Controllers/V1/JobGroupController.cs index 2192c8c9..a24ef402 100644 --- a/PARR.API/Controllers/V1/JobGroupController.cs +++ b/PARR.API/Controllers/V1/JobGroupController.cs @@ -12,19 +12,17 @@ using PARR.API.Controllers.V1.Base; using PARR.API.Extensions; using PARR.API.Services.Interfaces; using PARR.API.Settings; -using PARR.BLL.Helpers; using PARR.Core.Common.Helpers; using PARR.Core.Common.Interfaces.RabbitServices; +using PARR.Core.Repositories.Interfaces.Job; +using PARR.Core.Repositories.Interfaces.Schedule; using PARR.DAL.DomainServices.Interfaces; -using PARR.DAL.Models; -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.Common.Pagination; using PARR.Domain.Common.Rabbit.Messages; using PARR.Domain.Common.Roles; using PARR.Domain.Entities.Base.History; +using PARR.Domain.Entities.Job; +using PARR.Domain.Entities.Schedule; using PARR.Domain.Enums; namespace PARR.API.Controllers.V1 @@ -38,13 +36,13 @@ namespace PARR.API.Controllers.V1 private readonly ILogger logger; private readonly IMapper mapper; private readonly IUriService uriService; - private readonly IJobGroupService groupService; - private readonly IJobService jobService; - private readonly IEsppSchTypeConfigService esppConfigService; + private readonly IJobGroupRepository groupService; + private readonly IJobRepository jobService; + private readonly IEsppSchTypeConfigRepository esppConfigService; private readonly IValidator validator; - private readonly IJobGroupTypeService jobGroupTypeService; + private readonly IJobGroupTypeRepository jobGroupTypeService; private readonly IMatchingStatusService matchingStatusService; - private readonly IScheduleResponseAreaTimeOffsetService scheduleResponseAreaTimeOffsetService; + private readonly IScheduleResponseAreaTimeOffsetRepository scheduleResponseAreaTimeOffsetService; private readonly IRabbitService mqService; private readonly MqSettings mqSettings; @@ -52,13 +50,13 @@ namespace PARR.API.Controllers.V1 ILogger logger, IMapper mapper, IUriService uriService, - IJobGroupService groupService, - IJobService jobService, - IEsppSchTypeConfigService esppConfigService, + IJobGroupRepository groupService, + IJobRepository jobService, + IEsppSchTypeConfigRepository esppConfigService, IValidator validator, - IJobGroupTypeService jobGroupTypeService, + IJobGroupTypeRepository jobGroupTypeService, IMatchingStatusService matchingStatusService, - IScheduleResponseAreaTimeOffsetService scheduleResponseAreaTimeOffsetService, + IScheduleResponseAreaTimeOffsetRepository scheduleResponseAreaTimeOffsetService, IRabbitService mqService, MqSettings mqSettings ) diff --git a/PARR.API/Controllers/V1/JobGroupTypeController.cs b/PARR.API/Controllers/V1/JobGroupTypeController.cs index 1f9de449..24f4797a 100644 --- a/PARR.API/Controllers/V1/JobGroupTypeController.cs +++ b/PARR.API/Controllers/V1/JobGroupTypeController.cs @@ -6,7 +6,7 @@ using PARR.API.Contracts.V1; using PARR.API.Contracts.V1.Responses; using PARR.API.Contracts.V1.Responses.Base; using PARR.API.Controllers.V1.Base; -using PARR.DAL.Services.Interfaces.Job; +using PARR.Core.Repositories.Interfaces.Job; using PARR.Domain.Common.Roles; namespace PARR.API.Controllers.V1 @@ -17,11 +17,11 @@ namespace PARR.API.Controllers.V1 [Authorize(Roles = ParrRoles.Administrator.Role)] public class JobGroupTypeController : BaseApiController { - private readonly IJobGroupTypeService jobGroupTypeService; + private readonly IJobGroupTypeRepository jobGroupTypeService; private readonly IMapper mapper; public JobGroupTypeController( - IJobGroupTypeService jobGroupTypeService, + IJobGroupTypeRepository jobGroupTypeService, IMapper mapper ) { diff --git a/PARR.API/Controllers/V1/JobGroupUpdateNextRunController.cs b/PARR.API/Controllers/V1/JobGroupUpdateNextRunController.cs index 9241fbc2..cb00cbf0 100644 --- a/PARR.API/Controllers/V1/JobGroupUpdateNextRunController.cs +++ b/PARR.API/Controllers/V1/JobGroupUpdateNextRunController.cs @@ -6,7 +6,7 @@ using PARR.API.Contracts.V1.Responses.Base; using PARR.API.Controllers.V1.Base; using PARR.API.Settings; using PARR.Core.Common.Interfaces.RabbitServices; -using PARR.DAL.Services.Interfaces.Job; +using PARR.Core.Repositories.Interfaces.Job; using PARR.Domain.Common.Rabbit.Messages; using PARR.Domain.Common.Roles; using PARR.Domain.Entities.Base.History; @@ -22,12 +22,12 @@ namespace PARR.API.Controllers.V1 { private readonly IRabbitService mqService; private readonly MqSettings mqSettings; - private readonly IJobGroupService jobGroupService; + private readonly IJobGroupRepository jobGroupService; public JobGroupUpdateNextRunController( IRabbitService mqService, MqSettings mqSettings, - IJobGroupService jobGroupService + IJobGroupRepository jobGroupService ) { this.mqService = mqService; diff --git a/PARR.API/Controllers/V1/JobUnitPreviewController.cs b/PARR.API/Controllers/V1/JobUnitPreviewController.cs index 1654bd99..00ee45a5 100644 --- a/PARR.API/Controllers/V1/JobUnitPreviewController.cs +++ b/PARR.API/Controllers/V1/JobUnitPreviewController.cs @@ -8,11 +8,11 @@ using PARR.API.Contracts.V1.Requests; using PARR.API.Contracts.V1.Responses; using PARR.API.Contracts.V1.Responses.Base; using PARR.API.Controllers.V1.Base; +using PARR.Core.Repositories.Interfaces.Job; +using PARR.Core.Repositories.Interfaces.Unit; using PARR.DAL.DomainServices.UnitFilterService; -using PARR.DAL.Services.Interfaces.Job; -using PARR.DAL.Services.Interfaces.Unit; using PARR.Domain.Common.Roles; -using Job = PARR.DAL.Models.Job.Job; +using Job = PARR.Domain.Entities.Job.Job; namespace PARR.API.Controllers.V1 { @@ -25,16 +25,16 @@ namespace PARR.API.Controllers.V1 private readonly ILogger logger; private readonly IUnitFilterService unitFilterService; private readonly IValidator jobValidator; - private readonly IUnitService unitService; - private readonly IJobGroupService jobGroupService; + private readonly IUnitRepository unitService; + private readonly IJobGroupRepository jobGroupService; private readonly IMapper mapper; public JobUnitPreviewController( ILogger logger, IUnitFilterService unitFilterService, IValidator jobValidator, - IUnitService unitService, - IJobGroupService jobGroupService, + IUnitRepository unitService, + IJobGroupRepository jobGroupService, IMapper mapper ) { diff --git a/PARR.API/Controllers/V1/KiiUnitController.cs b/PARR.API/Controllers/V1/KiiUnitController.cs index acfb4637..3cbe8e75 100644 --- a/PARR.API/Controllers/V1/KiiUnitController.cs +++ b/PARR.API/Controllers/V1/KiiUnitController.cs @@ -6,7 +6,7 @@ using PARR.API.Contracts.V1; using PARR.API.Contracts.V1.Responses; using PARR.API.Contracts.V1.Responses.Base; using PARR.API.Controllers.V1.Base; -using PARR.DAL.Services.Interfaces.Unit; +using PARR.Core.Repositories.Interfaces.Unit; using PARR.Domain.Common.Roles; namespace PARR.API.Controllers.V1 @@ -18,11 +18,11 @@ namespace PARR.API.Controllers.V1 public class KiiUnitController : BaseApiController { private readonly IMapper mapper; - private readonly IUnitKiiUnitService unitKiiUnitService; + private readonly IUnitKiiUnitRepository unitKiiUnitService; public KiiUnitController( IMapper mapper, - IUnitKiiUnitService unitKiiUnitService + IUnitKiiUnitRepository unitKiiUnitService ) { this.mapper = mapper; diff --git a/PARR.API/Controllers/V1/OrderController.cs b/PARR.API/Controllers/V1/OrderController.cs index 6306d8c2..4e244169 100644 --- a/PARR.API/Controllers/V1/OrderController.cs +++ b/PARR.API/Controllers/V1/OrderController.cs @@ -8,10 +8,10 @@ using PARR.API.Contracts.V1.Responses; using PARR.API.Contracts.V1.Responses.Base; using PARR.API.Controllers.V1.Base; using PARR.API.Extensions; -using PARR.DAL.Models; -using PARR.DAL.Services.Interfaces; +using PARR.Core.Repositories.Interfaces; using PARR.Domain.Common.Pagination; using PARR.Domain.Common.Roles; +using PARR.Domain.Entities; namespace PARR.API.Controllers.V1 { @@ -22,11 +22,11 @@ namespace PARR.API.Controllers.V1 public class OrderController : BaseApiController { private readonly IMapper mapper; - private readonly IOrderService orderService; + private readonly IOrderRepository orderService; public OrderController( IMapper mapper, - IOrderService orderService + IOrderRepository orderService ) { this.mapper = mapper; diff --git a/PARR.API/Controllers/V1/ProcessController.cs b/PARR.API/Controllers/V1/ProcessController.cs index fedb56d6..b3dd3be8 100644 --- a/PARR.API/Controllers/V1/ProcessController.cs +++ b/PARR.API/Controllers/V1/ProcessController.cs @@ -11,10 +11,10 @@ using PARR.API.Contracts.V1.Responses.Base; using PARR.API.Controllers.V1.Base; using PARR.API.Extensions; using PARR.API.Services.Interfaces; -using PARR.DAL.Models; -using PARR.DAL.Services.Interfaces; +using PARR.Core.Repositories.Interfaces; using PARR.Domain.Common.Pagination; using PARR.Domain.Common.Roles; +using PARR.Domain.Entities; namespace PARR.API.Controllers.V1 { @@ -26,14 +26,14 @@ namespace PARR.API.Controllers.V1 { private readonly ILogger logger; private readonly IMapper mapper; - private readonly IProcessService processService; + private readonly IProcessRepository processService; private readonly IValidator validator; private readonly IUriService uriService; public ProcessController( ILogger logger, IMapper mapper, - IProcessService processService, + IProcessRepository processService, IValidator validator, IUriService uriService ) diff --git a/PARR.API/Controllers/V1/RegionalEkPtkGroupController.cs b/PARR.API/Controllers/V1/RegionalEkPtkGroupController.cs index 07f20ab3..0c753d84 100644 --- a/PARR.API/Controllers/V1/RegionalEkPtkGroupController.cs +++ b/PARR.API/Controllers/V1/RegionalEkPtkGroupController.cs @@ -6,7 +6,7 @@ using PARR.API.Contracts.V1; using PARR.API.Contracts.V1.Responses; using PARR.API.Contracts.V1.Responses.Base; using PARR.API.Controllers.V1.Base; -using PARR.DAL.Services.Interfaces.Unit; +using PARR.Core.Repositories.Interfaces.Unit; using PARR.Domain.Common.Roles; namespace PARR.API.Controllers.V1 @@ -18,11 +18,11 @@ namespace PARR.API.Controllers.V1 public class RegionalEkPtkGroupController : BaseApiController { private readonly IMapper mapper; - private readonly IUnitRegionalEkPtkGroupService unitRegionalEkPtkGroupService; + private readonly IUnitRegionalEkPtkGroupRepository unitRegionalEkPtkGroupService; public RegionalEkPtkGroupController( IMapper mapper, - IUnitRegionalEkPtkGroupService unitRegionalEkPtkGroupService + IUnitRegionalEkPtkGroupRepository unitRegionalEkPtkGroupService ) { this.mapper = mapper; diff --git a/PARR.API/Controllers/V1/RobotController.cs b/PARR.API/Controllers/V1/RobotController.cs index 7fb8784d..34617992 100644 --- a/PARR.API/Controllers/V1/RobotController.cs +++ b/PARR.API/Controllers/V1/RobotController.cs @@ -6,7 +6,7 @@ using PARR.API.Contracts.V1; using PARR.API.Contracts.V1.Responses; using PARR.API.Contracts.V1.Responses.Base; using PARR.API.Controllers.V1.Base; -using PARR.DAL.Services.Interfaces; +using PARR.Core.Repositories.Interfaces; using PARR.Domain.Common.Roles; namespace PARR.API.Controllers.V1 @@ -15,11 +15,11 @@ namespace PARR.API.Controllers.V1 public class RobotController : BaseApiController { private readonly IMapper mapper; - private readonly IRobotService robotService; + private readonly IRobotRepository robotService; public RobotController( IMapper mapper, - IRobotService robotService + IRobotRepository robotService ) { this.mapper = mapper; diff --git a/PARR.API/Controllers/V1/RobotHistoryController.cs b/PARR.API/Controllers/V1/RobotHistoryController.cs index b1676e7e..721297c1 100644 --- a/PARR.API/Controllers/V1/RobotHistoryController.cs +++ b/PARR.API/Controllers/V1/RobotHistoryController.cs @@ -11,10 +11,10 @@ using PARR.API.Contracts.V1.Responses.Base; using PARR.API.Controllers.V1.Base; using PARR.API.Extensions; using PARR.API.Services.Interfaces; -using PARR.DAL.Models; -using PARR.DAL.Services.Interfaces; +using PARR.Core.Repositories.Interfaces; using PARR.Domain.Common.Pagination; using PARR.Domain.Common.Roles; +using PARR.Domain.Entities; namespace PARR.API.Controllers.V1 { @@ -25,19 +25,19 @@ namespace PARR.API.Controllers.V1 private readonly IMapper mapper; private readonly IUriService uriService; - private readonly IRobotHistoryService robotHistoryService; - private readonly IRobotConfigurationService robotConfigurationService; + private readonly IRobotHistoryRepository robotHistoryService; + private readonly IRobotConfigurationRepository robotConfigurationService; private readonly IClientService clientService; - private readonly IUserService userService; + private readonly IUserRepository userService; public RobotHistoryController( IValidator validator, IMapper mapper, IUriService uriService, - IRobotHistoryService robotHistoryService, - IRobotConfigurationService robotConfigurationService, + IRobotHistoryRepository robotHistoryService, + IRobotConfigurationRepository robotConfigurationService, IClientService clientService, - IUserService userService + IUserRepository userService ) { this.validator = validator; diff --git a/PARR.API/Controllers/V1/RobotHistoryLevelController.cs b/PARR.API/Controllers/V1/RobotHistoryLevelController.cs index b94e6a48..2bdfad3e 100644 --- a/PARR.API/Controllers/V1/RobotHistoryLevelController.cs +++ b/PARR.API/Controllers/V1/RobotHistoryLevelController.cs @@ -6,7 +6,7 @@ using PARR.API.Contracts.V1; using PARR.API.Contracts.V1.Responses; using PARR.API.Contracts.V1.Responses.Base; using PARR.API.Controllers.V1.Base; -using PARR.DAL.Services.Interfaces; +using PARR.Core.Repositories.Interfaces; using PARR.Domain.Common.Roles; namespace PARR.API.Controllers.V1 @@ -15,11 +15,11 @@ namespace PARR.API.Controllers.V1 public class RobotHistoryLevelController : BaseApiController { private readonly IMapper mapper; - private readonly IRobotHistoryLevelService robotHistoryLevelService; + private readonly IRobotHistoryLevelRepository robotHistoryLevelService; public RobotHistoryLevelController( IMapper mapper, - IRobotHistoryLevelService robotHistoryLevelService + IRobotHistoryLevelRepository robotHistoryLevelService ) { this.mapper = mapper; diff --git a/PARR.API/Controllers/V1/RobotTaskController.cs b/PARR.API/Controllers/V1/RobotTaskController.cs index 6ada7e69..567fcda2 100644 --- a/PARR.API/Controllers/V1/RobotTaskController.cs +++ b/PARR.API/Controllers/V1/RobotTaskController.cs @@ -9,12 +9,12 @@ using PARR.API.Contracts.V1.Responses.Base; using PARR.API.Controllers.V1.Base; using PARR.API.Services.Interfaces; using PARR.BLL.Helpers; +using PARR.Core.Repositories.Interfaces; using PARR.DAL.Contracts; using PARR.DAL.DomainServices.Shortcodes; -using PARR.DAL.Models; using PARR.DAL.NextRunServices; -using PARR.DAL.Services.Interfaces; using PARR.Domain.Common.Roles; +using PARR.Domain.Entities; using PARR.Domain.Entities.Base.History; using PARR.Domain.Enums; @@ -25,11 +25,11 @@ namespace PARR.API.Controllers.V1 { private readonly IMapper mapper; private readonly SettingsFromDb settingsFromDb; - private readonly IRobotConfigurationService robotConfigurationService; + private readonly IRobotConfigurationRepository robotConfigurationService; //private readonly IEsppScheduleTransformService esppScheduleTransformService; private readonly ILogger logger; private readonly IClientService clientService; - private readonly IRobotHistoryService robotHistoryService; + private readonly IRobotHistoryRepository robotHistoryService; private readonly IShortcodesService shortcodesService; private readonly INextRunService nextRunService; //private readonly IScheduleResponseAreaTimeOffsetService scheduleResponseAreaTimeOffsetService; @@ -37,11 +37,11 @@ namespace PARR.API.Controllers.V1 public RobotTaskController( IMapper mapper, SettingsFromDb settingsFromDb, - IRobotConfigurationService robotConfigurationService, + IRobotConfigurationRepository robotConfigurationService, //IEsppScheduleTransformService esppScheduleTransformService, ILogger logger, IClientService clientService, - IRobotHistoryService robotHistoryService, + IRobotHistoryRepository robotHistoryService, IShortcodesService shortcodesService, INextRunService nextRunService //IScheduleResponseAreaTimeOffsetService scheduleResponseAreaTimeOffsetService diff --git a/PARR.API/Controllers/V1/RobotTaskRobotStatusController.cs b/PARR.API/Controllers/V1/RobotTaskRobotStatusController.cs index cc3c5468..b212c0a0 100644 --- a/PARR.API/Controllers/V1/RobotTaskRobotStatusController.cs +++ b/PARR.API/Controllers/V1/RobotTaskRobotStatusController.cs @@ -8,10 +8,9 @@ using PARR.API.Contracts.V1.Responses; using PARR.API.Contracts.V1.Responses.Base; using PARR.API.Controllers.V1.Base; using PARR.API.Services.Interfaces; -using PARR.DAL.Contracts; -using PARR.DAL.Models; -using PARR.DAL.Services.Interfaces; +using PARR.Core.Repositories.Interfaces; using PARR.Domain.Common.Roles; +using PARR.Domain.Entities; using PARR.Domain.Enums; namespace PARR.API.Controllers.V1 @@ -19,14 +18,14 @@ namespace PARR.API.Controllers.V1 [Authorize(Roles = ParrRoles.EsppRobot.RoleOrAdmin)] public class RobotTaskRobotStatusController : BaseApiController { - private readonly IRobotConfigurationService robotConfigurationService; - private readonly IRobotHistoryService robotHistoryService; + private readonly IRobotConfigurationRepository robotConfigurationService; + private readonly IRobotHistoryRepository robotHistoryService; private readonly IMapper mapper; private readonly IClientService clientService; public RobotTaskRobotStatusController( - IRobotConfigurationService robotConfigurationService, - IRobotHistoryService robotHistoryService, + IRobotConfigurationRepository robotConfigurationService, + IRobotHistoryRepository robotHistoryService, IMapper mapper, IClientService clientService ) diff --git a/PARR.API/Controllers/V1/RoleController.cs b/PARR.API/Controllers/V1/RoleController.cs index 92b28697..2fe47544 100644 --- a/PARR.API/Controllers/V1/RoleController.cs +++ b/PARR.API/Controllers/V1/RoleController.cs @@ -6,7 +6,7 @@ using PARR.API.Contracts.V1; using PARR.API.Contracts.V1.Responses; using PARR.API.Contracts.V1.Responses.Base; using PARR.API.Controllers.V1.Base; -using PARR.DAL.Services.Interfaces; +using PARR.Core.Repositories.Interfaces; using PARR.Domain.Common.Roles; namespace PARR.API.Controllers.V1 @@ -14,11 +14,11 @@ namespace PARR.API.Controllers.V1 [Authorize(Roles = ParrRoles.Administrator.Role)] public class RoleController : BaseApiController { - private readonly IRoleService roleService; + private readonly IRoleRepository roleService; private readonly IMapper mapper; public RoleController( - IRoleService roleService, + IRoleRepository roleService, IMapper mapper ) { diff --git a/PARR.API/Controllers/V1/ScheduleExcludeTypeCalendarController.cs b/PARR.API/Controllers/V1/ScheduleExcludeTypeCalendarController.cs index 64a3b1cd..e58e3963 100644 --- a/PARR.API/Controllers/V1/ScheduleExcludeTypeCalendarController.cs +++ b/PARR.API/Controllers/V1/ScheduleExcludeTypeCalendarController.cs @@ -6,7 +6,7 @@ using PARR.API.Contracts.V1; using PARR.API.Contracts.V1.Responses; using PARR.API.Contracts.V1.Responses.Base; using PARR.API.Controllers.V1.Base; -using PARR.DAL.Services.Interfaces.Schedule; +using PARR.Core.Repositories.Interfaces.Schedule; using PARR.Domain.Common.Roles; namespace PARR.API.Controllers.V1 @@ -18,11 +18,11 @@ namespace PARR.API.Controllers.V1 public class ScheduleExcludeTypeCalendarController : BaseApiController { private readonly IMapper mapper; - private readonly IScheduleExcludeTypeCalendarService scheduleExcludeTypeCalendarService; + private readonly IScheduleExcludeTypeCalendarRepository scheduleExcludeTypeCalendarService; public ScheduleExcludeTypeCalendarController( IMapper mapper, - IScheduleExcludeTypeCalendarService scheduleExcludeTypeCalendarService + IScheduleExcludeTypeCalendarRepository scheduleExcludeTypeCalendarService ) { this.mapper = mapper; diff --git a/PARR.API/Controllers/V1/ScheduleExcludeTypeController.cs b/PARR.API/Controllers/V1/ScheduleExcludeTypeController.cs index 3fa1afa7..74890a23 100644 --- a/PARR.API/Controllers/V1/ScheduleExcludeTypeController.cs +++ b/PARR.API/Controllers/V1/ScheduleExcludeTypeController.cs @@ -6,7 +6,7 @@ using PARR.API.Contracts.V1; using PARR.API.Contracts.V1.Responses; using PARR.API.Contracts.V1.Responses.Base; using PARR.API.Controllers.V1.Base; -using PARR.DAL.Services.Interfaces.Schedule; +using PARR.Core.Repositories.Interfaces.Schedule; using PARR.Domain.Common.Roles; namespace PARR.API.Controllers.V1 @@ -18,11 +18,11 @@ namespace PARR.API.Controllers.V1 public class ScheduleExcludeTypeController : BaseApiController { private readonly IMapper mapper; - private readonly IScheduleExcludeTypeService scheduleExcludeTypeService; + private readonly IScheduleExcludeTypeRepository scheduleExcludeTypeService; public ScheduleExcludeTypeController( IMapper mapper, - IScheduleExcludeTypeService scheduleExcludeTypeService + IScheduleExcludeTypeRepository scheduleExcludeTypeService ) { this.mapper = mapper; diff --git a/PARR.API/Controllers/V1/ShortcodeApplyController.cs b/PARR.API/Controllers/V1/ShortcodeApplyController.cs index cdf209cc..7fa0251a 100644 --- a/PARR.API/Controllers/V1/ShortcodeApplyController.cs +++ b/PARR.API/Controllers/V1/ShortcodeApplyController.cs @@ -5,8 +5,8 @@ using PARR.API.Contracts.V1.Requests; using PARR.API.Contracts.V1.Responses; using PARR.API.Contracts.V1.Responses.Base; using PARR.API.Controllers.V1.Base; +using PARR.Core.Repositories.Interfaces; using PARR.DAL.DomainServices.Shortcodes; -using PARR.DAL.Services.Interfaces; namespace PARR.API.Controllers.V1 { @@ -14,12 +14,12 @@ namespace PARR.API.Controllers.V1 { private readonly ILogger logger; private readonly IShortcodesService shortcodesService; - private readonly ITemplateService templateService; + private readonly ITemplateRepository templateService; public ShortcodeApplyController( ILogger logger, IShortcodesService shortcodesService, - ITemplateService templateService + ITemplateRepository templateService ) { this.logger = logger; diff --git a/PARR.API/Controllers/V1/Statistics/StatOrderController.cs b/PARR.API/Controllers/V1/Statistics/StatOrderController.cs index 9138925f..e90fe970 100644 --- a/PARR.API/Controllers/V1/Statistics/StatOrderController.cs +++ b/PARR.API/Controllers/V1/Statistics/StatOrderController.cs @@ -9,8 +9,8 @@ using PARR.API.Contracts.V1.Responses.Base; using PARR.API.Contracts.V1.Responses.Statistics; using PARR.API.Controllers.V1.Base; using PARR.API.Helpers; +using PARR.Core.Repositories.Interfaces; using PARR.DAL.NextRunServices; -using PARR.DAL.Services.Interfaces; using PARR.Domain.Common.Roles; namespace PARR.API.Controllers.V1.Statistics @@ -21,14 +21,14 @@ namespace PARR.API.Controllers.V1.Statistics [Authorize(Roles = ParrRoles.Administrator.Role)] public class StatOrderController : BaseApiController { - private readonly IOrderService orderService; - private readonly IOrderStatusService orderStatusService; + private readonly IOrderRepository orderService; + private readonly IOrderStatusRepository orderStatusService; private readonly IMapper mapper; private readonly INextRunService nextRunService; public StatOrderController( - IOrderService orderService, - IOrderStatusService orderStatusService, + IOrderRepository orderService, + IOrderStatusRepository orderStatusService, IMapper mapper, INextRunService nextRunService ) diff --git a/PARR.API/Controllers/V1/Statistics/StatResponseAreaWorkLoadController.cs b/PARR.API/Controllers/V1/Statistics/StatResponseAreaWorkLoadController.cs index cfe23499..a18c7e65 100644 --- a/PARR.API/Controllers/V1/Statistics/StatResponseAreaWorkLoadController.cs +++ b/PARR.API/Controllers/V1/Statistics/StatResponseAreaWorkLoadController.cs @@ -10,7 +10,7 @@ using PARR.API.Contracts.V1.Responses.Base; using PARR.API.Contracts.V1.Responses.Statistics; using PARR.API.Controllers.V1.Base; using PARR.API.Services.Interfaces; -using PARR.DAL.Services.Interfaces; +using PARR.Core.Repositories.Interfaces; using PARR.Domain.Common.Roles; namespace PARR.API.Controllers.V1.Statistics @@ -21,13 +21,13 @@ namespace PARR.API.Controllers.V1.Statistics [Authorize(Roles = ParrRoles.EsppRobot.RoleOrAdmin)] public class StatResponseAreaWorkLoadController : BaseApiController { - private readonly ITemplateService templateService; + private readonly ITemplateRepository templateService; //private readonly IResponseAreaService responseAreaService; private readonly IMapper mapper; private readonly IWorkLoadService workLoadService; public StatResponseAreaWorkLoadController( - ITemplateService templateService, + ITemplateRepository templateService, //IResponseAreaService responseAreaService, IMapper mapper, IWorkLoadService workLoadService diff --git a/PARR.API/Controllers/V1/Statistics/StatRobotHistoryController.cs b/PARR.API/Controllers/V1/Statistics/StatRobotHistoryController.cs index 66fd9138..2e9db8c4 100644 --- a/PARR.API/Controllers/V1/Statistics/StatRobotHistoryController.cs +++ b/PARR.API/Controllers/V1/Statistics/StatRobotHistoryController.cs @@ -10,9 +10,9 @@ using PARR.API.Contracts.V1.Responses.Base; using PARR.API.Contracts.V1.Responses.Statistics; using PARR.API.Controllers.V1.Base; using PARR.API.Helpers; -using PARR.DAL.Models; -using PARR.DAL.Services.Interfaces; +using PARR.Core.Repositories.Interfaces; using PARR.Domain.Common.Roles; +using PARR.Domain.Entities; namespace PARR.API.Controllers.V1.Statistics { @@ -22,13 +22,13 @@ namespace PARR.API.Controllers.V1.Statistics [Authorize(Roles = ParrRoles.Administrator.Role)] public class StatRobotHistoryController : BaseApiController { - private readonly IRobotHistoryService robotHistoryService; - private readonly IRobotHistoryLevelService robotHistoryLevelService; + private readonly IRobotHistoryRepository robotHistoryService; + private readonly IRobotHistoryLevelRepository robotHistoryLevelService; private readonly IMapper mapper; public StatRobotHistoryController( - IRobotHistoryService robotHistoryService, - IRobotHistoryLevelService robotHistoryLevelService, + IRobotHistoryRepository robotHistoryService, + IRobotHistoryLevelRepository robotHistoryLevelService, IMapper mapper ) { diff --git a/PARR.API/Controllers/V1/Statistics/StatRobotStateController.cs b/PARR.API/Controllers/V1/Statistics/StatRobotStateController.cs index b6fc9dae..f6f98519 100644 --- a/PARR.API/Controllers/V1/Statistics/StatRobotStateController.cs +++ b/PARR.API/Controllers/V1/Statistics/StatRobotStateController.cs @@ -15,7 +15,7 @@ using PARR.API.Controllers.V1.Base; using PARR.API.Services.Interfaces; using PARR.API.Settings; using PARR.Core.Common.Interfaces; -using PARR.DAL.Services.Interfaces; +using PARR.Core.Repositories.Interfaces; using PARR.Domain.Common.Roles; using PARR.Domain.Enums; using PARR.Domain.Settings; @@ -33,7 +33,7 @@ namespace PARR.API.Controllers.V1.Statistics private readonly InfluxDbSettings influxDbSettings; private readonly MonitoringSettings monitoringSettings; private readonly IClientService clientService; - private readonly IUserService userService; + private readonly IUserRepository userService; private readonly IMapper mapper; public StatRobotStateController( @@ -42,7 +42,7 @@ namespace PARR.API.Controllers.V1.Statistics InfluxDbSettings influxDbSettings, MonitoringSettings monitoringSettings, IClientService clientService, - IUserService userService, + IUserRepository userService, IMapper mapper ) { diff --git a/PARR.API/Controllers/V1/Statistics/StatRobotStatusController.cs b/PARR.API/Controllers/V1/Statistics/StatRobotStatusController.cs index e8ff8948..00982235 100644 --- a/PARR.API/Controllers/V1/Statistics/StatRobotStatusController.cs +++ b/PARR.API/Controllers/V1/Statistics/StatRobotStatusController.cs @@ -7,7 +7,7 @@ using PARR.API.Contracts.V1.Responses; using PARR.API.Contracts.V1.Responses.Base; using PARR.API.Contracts.V1.Responses.Statistics; using PARR.API.Controllers.V1.Base; -using PARR.DAL.Services.Interfaces; +using PARR.Core.Repositories.Interfaces; using PARR.Domain.Common.Roles; namespace PARR.API.Controllers.V1.Statistics @@ -18,15 +18,15 @@ namespace PARR.API.Controllers.V1.Statistics [Authorize(Roles = ParrRoles.Administrator.Role)] public class StatRobotStatusController : BaseApiController { - private readonly IRobotService robotService; - private readonly IRobotConfigurationService robotConfigurationService; - private readonly IRobotStatusService robotStatusService; + private readonly IRobotRepository robotService; + private readonly IRobotConfigurationRepository robotConfigurationService; + private readonly IRobotStatusRepository robotStatusService; private readonly IMapper mapper; public StatRobotStatusController( - IRobotService robotService, - IRobotConfigurationService robotConfigurationService, - IRobotStatusService robotStatusService, + IRobotRepository robotService, + IRobotConfigurationRepository robotConfigurationService, + IRobotStatusRepository robotStatusService, IMapper mapper ) { diff --git a/PARR.API/Controllers/V1/Statistics/StatRobotTaskController.cs b/PARR.API/Controllers/V1/Statistics/StatRobotTaskController.cs index 3fa866c6..da615373 100644 --- a/PARR.API/Controllers/V1/Statistics/StatRobotTaskController.cs +++ b/PARR.API/Controllers/V1/Statistics/StatRobotTaskController.cs @@ -8,8 +8,8 @@ using PARR.API.Contracts.V1.Responses; using PARR.API.Contracts.V1.Responses.Base; using PARR.API.Contracts.V1.Responses.Statistics; using PARR.API.Controllers.V1.Base; +using PARR.Core.Repositories.Interfaces; using PARR.DAL.Contracts; -using PARR.DAL.Services.Interfaces; using PARR.Domain.Common.Roles; using PARR.Domain.Enums; @@ -21,17 +21,17 @@ namespace PARR.API.Controllers.V1.Statistics [Authorize(Roles = ParrRoles.Administrator.Role)] public class StatRobotTaskController : BaseApiController { - private readonly IRobotService robotService; - private readonly IRobotConfigurationService robotConfigurationService; - private readonly ITaskStatusService taskStatusService; - private readonly IRobotHistoryService robotHistoryService; + private readonly IRobotRepository robotService; + private readonly IRobotConfigurationRepository robotConfigurationService; + private readonly ITaskStatusRepository taskStatusService; + private readonly IRobotHistoryRepository robotHistoryService; private readonly IMapper mapper; public StatRobotTaskController( - IRobotService robotService, - IRobotConfigurationService robotConfigurationService, - ITaskStatusService taskStatusService, - IRobotHistoryService robotHistoryService, + IRobotRepository robotService, + IRobotConfigurationRepository robotConfigurationService, + ITaskStatusRepository taskStatusService, + IRobotHistoryRepository robotHistoryService, IMapper mapper ) { diff --git a/PARR.API/Controllers/V1/Statistics/StatStatusTypeTemplates.cs b/PARR.API/Controllers/V1/Statistics/StatStatusTypeTemplates.cs index a72f11a1..0073e851 100644 --- a/PARR.API/Controllers/V1/Statistics/StatStatusTypeTemplates.cs +++ b/PARR.API/Controllers/V1/Statistics/StatStatusTypeTemplates.cs @@ -7,7 +7,7 @@ using PARR.API.Contracts.V1.Responses; using PARR.API.Contracts.V1.Responses.Base; using PARR.API.Contracts.V1.Responses.Statistics; using PARR.API.Controllers.V1.Base; -using PARR.DAL.Services.Interfaces; +using PARR.Core.Repositories.Interfaces; using PARR.Domain.Common.Roles; namespace PARR.API.Controllers.V1.Statistics @@ -18,13 +18,13 @@ namespace PARR.API.Controllers.V1.Statistics [Authorize(Roles = ParrRoles.Administrator.Role)] public class StatStatusTypeTemplates : BaseApiController { - private readonly ITemplateService templateService; - private readonly ITemplateStatusTypeService templateStatusTypeService; + private readonly ITemplateRepository templateService; + private readonly ITemplateStatusTypeRepository templateStatusTypeService; private readonly IMapper mapper; public StatStatusTypeTemplates( - ITemplateService templateService, - ITemplateStatusTypeService templateStatusTypeService, + ITemplateRepository templateService, + ITemplateStatusTypeRepository templateStatusTypeService, IMapper mapper ) { diff --git a/PARR.API/Controllers/V1/Statistics/StatTemplateAutoControlController.cs b/PARR.API/Controllers/V1/Statistics/StatTemplateAutoControlController.cs index eaef29fc..1247869b 100644 --- a/PARR.API/Controllers/V1/Statistics/StatTemplateAutoControlController.cs +++ b/PARR.API/Controllers/V1/Statistics/StatTemplateAutoControlController.cs @@ -6,21 +6,21 @@ using PARR.API.Contracts.V1.Responses.Base; using PARR.API.Contracts.V1.Responses.Statistics; using PARR.API.Controllers.V1.Base; using PARR.API.Helpers; +using PARR.Core.Repositories.Interfaces; using PARR.DAL.NextRunServices; -using PARR.DAL.Services.Interfaces; using PARR.Domain.Enums; namespace PARR.API.Controllers.V1.Statistics { public class StatTemplateAutoControlController : BaseApiController { - private readonly ITemplateService templateService; - private readonly ITemplateHistoryService templateHistoryService; + private readonly ITemplateRepository templateService; + private readonly ITemplateHistoryRepository templateHistoryService; private readonly INextRunService nextRunService; public StatTemplateAutoControlController( - ITemplateService templateService, - ITemplateHistoryService templateHistoryService, + ITemplateRepository templateService, + ITemplateHistoryRepository templateHistoryService, INextRunService nextRunService ) { diff --git a/PARR.API/Controllers/V1/Statistics/StatTemplateController.cs b/PARR.API/Controllers/V1/Statistics/StatTemplateController.cs index 98418b75..f6ade931 100644 --- a/PARR.API/Controllers/V1/Statistics/StatTemplateController.cs +++ b/PARR.API/Controllers/V1/Statistics/StatTemplateController.cs @@ -7,9 +7,9 @@ using PARR.API.Contracts.V1.Responses.Base; using PARR.API.Contracts.V1.Responses.Statistics; using PARR.API.Controllers.V1.Base; using PARR.API.Helpers; +using PARR.Core.Repositories.Interfaces; using PARR.DAL.Contracts; using PARR.DAL.NextRunServices; -using PARR.DAL.Services.Interfaces; using PARR.Domain.Common.Roles; using PARR.Domain.Enums; @@ -21,11 +21,11 @@ namespace PARR.API.Controllers.V1.Statistics [Authorize(Roles = ParrRoles.Administrator.Role)] public class StatTemplateController : BaseApiController { - private readonly ITemplateService templateService; + private readonly ITemplateRepository templateService; private readonly INextRunService nextRunService; public StatTemplateController( - ITemplateService templateService, + ITemplateRepository templateService, INextRunService nextRunService ) { diff --git a/PARR.API/Controllers/V1/Statistics/StatTemplateDistributionController.cs b/PARR.API/Controllers/V1/Statistics/StatTemplateDistributionController.cs index 9215591c..00f15a6d 100644 --- a/PARR.API/Controllers/V1/Statistics/StatTemplateDistributionController.cs +++ b/PARR.API/Controllers/V1/Statistics/StatTemplateDistributionController.cs @@ -8,14 +8,14 @@ using PARR.API.Contracts.V1.Responses; using PARR.API.Contracts.V1.Responses.Base; using PARR.API.Contracts.V1.Responses.Statistics; using PARR.API.Controllers.V1.Base; +using PARR.Core.Repositories.Interfaces; +using PARR.Core.Repositories.Interfaces.Job; +using PARR.Core.Repositories.Interfaces.Schedule; using PARR.DAL.DomainServices.Shortcodes; -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.Schedule; using PARR.Domain.Common.Roles; +using PARR.Domain.Entities; +using PARR.Domain.Entities.Job; using PARR.Domain.Enums; namespace PARR.API.Controllers.V1.Statistics @@ -26,22 +26,22 @@ namespace PARR.API.Controllers.V1.Statistics [Authorize(Roles = ParrRoles.Administrator.Role)] public class StatTemplateDistributionController : BaseApiController { - private readonly ITemplateService templateService; - private readonly IJobGroupService jobGroupService; + private readonly ITemplateRepository templateService; + private readonly IJobGroupRepository jobGroupService; private readonly IMapper mapper; private readonly IShortcodesService shortcodesService; private readonly INextRunService nextRunService; private readonly ILogger logger; - private readonly IScheduleResponseAreaTimeOffsetService scheduleResponseAreaTimeOffsetService; + private readonly IScheduleResponseAreaTimeOffsetRepository scheduleResponseAreaTimeOffsetService; public StatTemplateDistributionController( - ITemplateService templateService, - IJobGroupService jobGroupService, + ITemplateRepository templateService, + IJobGroupRepository jobGroupService, IMapper mapper, IShortcodesService shortcodesService, INextRunService nextRunService, ILogger logger, - IScheduleResponseAreaTimeOffsetService scheduleResponseAreaTimeOffsetService + IScheduleResponseAreaTimeOffsetRepository scheduleResponseAreaTimeOffsetService ) { this.templateService = templateService; diff --git a/PARR.API/Controllers/V1/Statistics/StatUnitController.cs b/PARR.API/Controllers/V1/Statistics/StatUnitController.cs index 1d593a1c..facec2ad 100644 --- a/PARR.API/Controllers/V1/Statistics/StatUnitController.cs +++ b/PARR.API/Controllers/V1/Statistics/StatUnitController.cs @@ -7,8 +7,8 @@ using PARR.API.Contracts.V1.Responses.Base; using PARR.API.Contracts.V1.Responses.Statistics; using PARR.API.Controllers.V1.Base; using PARR.API.Helpers; +using PARR.Core.Repositories.Interfaces.Unit; using PARR.DAL.NextRunServices; -using PARR.DAL.Services.Interfaces.Unit; using PARR.Domain.Common.Roles; namespace PARR.API.Controllers.V1.Statistics @@ -19,11 +19,11 @@ namespace PARR.API.Controllers.V1.Statistics [Authorize(Roles = ParrRoles.Administrator.Role)] public class StatUnitController : BaseApiController { - private readonly IUnitService unitService; + private readonly IUnitRepository unitService; private readonly INextRunService nextRunService; public StatUnitController( - IUnitService unitService, + IUnitRepository unitService, INextRunService nextRunService ) { diff --git a/PARR.API/Controllers/V1/Statistics/StatUnitFieldValuesController.cs b/PARR.API/Controllers/V1/Statistics/StatUnitFieldValuesController.cs index e24fe476..b6916b96 100644 --- a/PARR.API/Controllers/V1/Statistics/StatUnitFieldValuesController.cs +++ b/PARR.API/Controllers/V1/Statistics/StatUnitFieldValuesController.cs @@ -6,9 +6,8 @@ using PARR.API.Contracts.V1.Requests.BaseRequests; using PARR.API.Contracts.V1.Responses.Base; using PARR.API.Contracts.V1.Responses.Statistics; using PARR.API.Controllers.V1.Base; +using PARR.Core.Repositories.Interfaces.Unit; using PARR.DAL.NextRunServices; -using PARR.DAL.Services.Interfaces; -using PARR.DAL.Services.Interfaces.Unit; using PARR.Domain.Common.Roles; namespace PARR.API.Controllers.V1.Statistics @@ -20,14 +19,14 @@ namespace PARR.API.Controllers.V1.Statistics public class StatUnitFieldValuesController : BaseApiController { //private readonly IApplicationService applicationService; - private readonly IUnitFieldValueService unitFieldValueService; + private readonly IUnitFieldValueRepository unitFieldValueService; private readonly INextRunService nextRunService; //private readonly ICalendarService calendarService; public StatUnitFieldValuesController( //IApplicationService applicationService, - IUnitFieldValueService unitFieldValueService, + IUnitFieldValueRepository unitFieldValueService, //ICalendarService calendarService INextRunService nextRunService ) diff --git a/PARR.API/Controllers/V1/Statistics/StatWorkGroupWorkLoadController.cs b/PARR.API/Controllers/V1/Statistics/StatWorkGroupWorkLoadController.cs index 5d3d1f6d..384c54ad 100644 --- a/PARR.API/Controllers/V1/Statistics/StatWorkGroupWorkLoadController.cs +++ b/PARR.API/Controllers/V1/Statistics/StatWorkGroupWorkLoadController.cs @@ -9,7 +9,7 @@ using PARR.API.Contracts.V1.Responses.Base; using PARR.API.Contracts.V1.Responses.Statistics; using PARR.API.Controllers.V1.Base; using PARR.API.Services.Interfaces; -using PARR.DAL.Services.Interfaces; +using PARR.Core.Repositories.Interfaces; namespace PARR.API.Controllers.V1.Statistics { @@ -18,14 +18,14 @@ namespace PARR.API.Controllers.V1.Statistics /// public class StatWorkGroupWorkLoadController : BaseApiController { - private readonly ITemplateService templateService; + private readonly ITemplateRepository templateService; private readonly IWorkLoadService workLoadService; //private readonly IWorkGroupService workGroupService; private readonly IMapper mapper; private readonly ILogger logger; public StatWorkGroupWorkLoadController( - ITemplateService templateService, + ITemplateRepository templateService, IWorkLoadService workLoadService, //IWorkGroupService workGroupService, IMapper mapper, diff --git a/PARR.API/Controllers/V1/Statistics/StatWorkWorkLoadController.cs b/PARR.API/Controllers/V1/Statistics/StatWorkWorkLoadController.cs index 81a9290a..3cac498b 100644 --- a/PARR.API/Controllers/V1/Statistics/StatWorkWorkLoadController.cs +++ b/PARR.API/Controllers/V1/Statistics/StatWorkWorkLoadController.cs @@ -1,16 +1,7 @@ using AutoMapper; -using Microsoft.AspNetCore.Mvc; -using Microsoft.EntityFrameworkCore; -using PARR.API.Contracts.V1; -using PARR.API.Contracts.V1.Requests; -using PARR.API.Contracts.V1.Requests.Queries; -using PARR.API.Contracts.V1.Responses; -using PARR.API.Contracts.V1.Responses.Base; -using PARR.API.Contracts.V1.Responses.Statistics; using PARR.API.Controllers.V1.Base; using PARR.API.Services.Interfaces; -using PARR.DAL.Models; -using PARR.DAL.Services.Interfaces; +using PARR.Core.Repositories.Interfaces; namespace PARR.API.Controllers.V1.Statistics { @@ -19,14 +10,14 @@ namespace PARR.API.Controllers.V1.Statistics /// public class StatWorkWorkLoadController : BaseApiController { - private readonly ITemplateService templateService; + private readonly ITemplateRepository templateService; private readonly IWorkLoadService workLoadService; private readonly IMapper mapper; private readonly ILogger logger; //private readonly IWorkGroupService workGroupService; public StatWorkWorkLoadController( - ITemplateService templateService, + ITemplateRepository templateService, IWorkLoadService workLoadService, IMapper mapper, ILogger logger diff --git a/PARR.API/Controllers/V1/SubprocessController.cs b/PARR.API/Controllers/V1/SubprocessController.cs index d5c2651d..c8420792 100644 --- a/PARR.API/Controllers/V1/SubprocessController.cs +++ b/PARR.API/Controllers/V1/SubprocessController.cs @@ -11,10 +11,10 @@ using PARR.API.Contracts.V1.Responses.Base; using PARR.API.Controllers.V1.Base; using PARR.API.Extensions; using PARR.API.Services.Interfaces; -using PARR.DAL.Models; -using PARR.DAL.Services.Interfaces; +using PARR.Core.Repositories.Interfaces; using PARR.Domain.Common.Pagination; using PARR.Domain.Common.Roles; +using PARR.Domain.Entities; namespace PARR.API.Controllers.V1 { @@ -26,14 +26,14 @@ namespace PARR.API.Controllers.V1 { private readonly ILogger logger; private readonly IMapper mapper; - private readonly ISubprocessService subprocessService; + private readonly ISubprocessRepository subprocessService; private readonly IValidator validator; private readonly IUriService uriService; public SubprocessController( ILogger logger, IMapper mapper, - ISubprocessService subprocessService, + ISubprocessRepository subprocessService, IValidator validator, IUriService uriService ) diff --git a/PARR.API/Controllers/V1/TaskStatusController.cs b/PARR.API/Controllers/V1/TaskStatusController.cs index 30a91e74..d7cb6293 100644 --- a/PARR.API/Controllers/V1/TaskStatusController.cs +++ b/PARR.API/Controllers/V1/TaskStatusController.cs @@ -6,7 +6,7 @@ using PARR.API.Contracts.V1; using PARR.API.Contracts.V1.Responses; using PARR.API.Contracts.V1.Responses.Base; using PARR.API.Controllers.V1.Base; -using PARR.DAL.Services.Interfaces; +using PARR.Core.Repositories.Interfaces; using PARR.Domain.Common.Roles; namespace PARR.API.Controllers.V1 @@ -15,11 +15,11 @@ namespace PARR.API.Controllers.V1 public class TaskStatusController : BaseApiController { private readonly IMapper mapper; - private readonly IStatusTemplateService statusTemplateService; + private readonly IStatusTemplateRepository statusTemplateService; public TaskStatusController( IMapper mapper, - IStatusTemplateService statusTemplateService + IStatusTemplateRepository statusTemplateService ) { this.mapper = mapper; diff --git a/PARR.API/Controllers/V1/TemplateActivatorController.cs b/PARR.API/Controllers/V1/TemplateActivatorController.cs index f6a89022..206f8d61 100644 --- a/PARR.API/Controllers/V1/TemplateActivatorController.cs +++ b/PARR.API/Controllers/V1/TemplateActivatorController.cs @@ -8,7 +8,7 @@ using PARR.API.Controllers.V1.Base; using PARR.API.Services.Interfaces; using PARR.API.Settings; using PARR.Core.Common.Interfaces.RabbitServices; -using PARR.DAL.Services.Interfaces.Job; +using PARR.Core.Repositories.Interfaces.Job; using PARR.Domain.Common.Rabbit.Messages; using PARR.Domain.Common.Roles; using PARR.Domain.Entities.Base.History; @@ -26,7 +26,7 @@ namespace PARR.API.Controllers.V1 private readonly IRabbitService mqService; private readonly IUriService uriService; private readonly MqSettings mqSettings; - private readonly IJobService jobService; + private readonly IJobRepository jobService; private readonly IClientService clientService; public TemplateActivatorController( @@ -34,7 +34,7 @@ namespace PARR.API.Controllers.V1 IRabbitService mqService, IUriService uriService, MqSettings mqSettings, - IJobService jobService, + IJobRepository jobService, IClientService clientService ) { diff --git a/PARR.API/Controllers/V1/TemplateController.cs b/PARR.API/Controllers/V1/TemplateController.cs index dfdb8dbd..038e909b 100644 --- a/PARR.API/Controllers/V1/TemplateController.cs +++ b/PARR.API/Controllers/V1/TemplateController.cs @@ -12,13 +12,13 @@ using PARR.API.Extensions; using PARR.API.Services.Interfaces; using PARR.BLL.Helpers; using PARR.Core.Common.Helpers; +using PARR.Core.Repositories.Interfaces; +using PARR.Core.Repositories.Interfaces.Schedule; using PARR.DAL.Contracts; using PARR.DAL.DomainServices.Shortcodes; -using PARR.DAL.Models; -using PARR.DAL.Services.Interfaces; -using PARR.DAL.Services.Interfaces.Schedule; using PARR.Domain.Common.Pagination; using PARR.Domain.Common.Roles; +using PARR.Domain.Entities; using PARR.Domain.Entities.Base.History; using PARR.Domain.Enums; @@ -31,25 +31,25 @@ namespace PARR.API.Controllers.V1 public class TemplateController : BaseApiController { private readonly IMapper mapper; - private readonly ITemplateService templateService; - private readonly IRobotConfigurationService robotConfigurationService; + private readonly ITemplateRepository templateService; + private readonly IRobotConfigurationRepository robotConfigurationService; private readonly IClientService clientService; private readonly ILogger logger; private readonly IShortcodesService shortcodesService; - private readonly IOrderService orderService; + private readonly IOrderRepository orderService; private readonly SettingsFromDb settingsFromDb; - private readonly IScheduleResponseAreaTimeOffsetService scheduleResponseAreaTimeOffsetService; + private readonly IScheduleResponseAreaTimeOffsetRepository scheduleResponseAreaTimeOffsetService; public TemplateController( IMapper mapper, - ITemplateService templateService, - IRobotConfigurationService robotConfigurationService, + ITemplateRepository templateService, + IRobotConfigurationRepository robotConfigurationService, IClientService clientService, ILogger logger, IShortcodesService shortcodesService, - IOrderService orderService, + IOrderRepository orderService, SettingsFromDb settingsFromDb, - IScheduleResponseAreaTimeOffsetService scheduleResponseAreaTimeOffsetService + IScheduleResponseAreaTimeOffsetRepository scheduleResponseAreaTimeOffsetService ) { this.mapper = mapper; diff --git a/PARR.API/Controllers/V1/TemplateHistoryController.cs b/PARR.API/Controllers/V1/TemplateHistoryController.cs index 5f49e34a..a68c9d9b 100644 --- a/PARR.API/Controllers/V1/TemplateHistoryController.cs +++ b/PARR.API/Controllers/V1/TemplateHistoryController.cs @@ -8,10 +8,10 @@ using PARR.API.Contracts.V1.Responses; using PARR.API.Contracts.V1.Responses.Base; using PARR.API.Controllers.V1.Base; using PARR.API.Extensions; -using PARR.DAL.Models; -using PARR.DAL.Services.Interfaces; +using PARR.Core.Repositories.Interfaces; using PARR.Domain.Common.Pagination; using PARR.Domain.Common.Roles; +using PARR.Domain.Entities; namespace PARR.API.Controllers.V1 { @@ -22,11 +22,11 @@ namespace PARR.API.Controllers.V1 public class TemplateHistoryController : BaseApiController { private readonly IMapper mapper; - private readonly ITemplateHistoryService templateHistoryService; + private readonly ITemplateHistoryRepository templateHistoryService; public TemplateHistoryController( IMapper mapper, - ITemplateHistoryService templateHistoryService + ITemplateHistoryRepository templateHistoryService ) { this.mapper = mapper; diff --git a/PARR.API/Controllers/V1/TemplateScheduleEspp.cs b/PARR.API/Controllers/V1/TemplateScheduleEspp.cs index 62f999df..a9dbe9af 100644 --- a/PARR.API/Controllers/V1/TemplateScheduleEspp.cs +++ b/PARR.API/Controllers/V1/TemplateScheduleEspp.cs @@ -8,7 +8,7 @@ using PARR.API.Contracts.V1.Responses; using PARR.API.Contracts.V1.Responses.Base; using PARR.API.Controllers.V1.Base; using PARR.API.Services.Interfaces; -using PARR.DAL.Services.Interfaces; +using PARR.Core.Repositories.Interfaces; using PARR.Domain.Common.Roles; namespace PARR.API.Controllers.V1 @@ -19,13 +19,13 @@ namespace PARR.API.Controllers.V1 [Authorize(Roles = ParrRoles.EsppRobot.RoleOrAdmin)] public class TemplateScheduleEspp : BaseApiController { - private readonly ITemplateService templateService; + private readonly ITemplateRepository templateService; private readonly IMapper mapper; private readonly IValidator validator; private readonly IUriService uriService; public TemplateScheduleEspp( - ITemplateService templateService, + ITemplateRepository templateService, IMapper mapper, IValidator validator, IUriService uriService diff --git a/PARR.API/Controllers/V1/TemplateStatusTypeController.cs b/PARR.API/Controllers/V1/TemplateStatusTypeController.cs index 52243c85..12149bb8 100644 --- a/PARR.API/Controllers/V1/TemplateStatusTypeController.cs +++ b/PARR.API/Controllers/V1/TemplateStatusTypeController.cs @@ -6,7 +6,7 @@ using PARR.API.Contracts.V1; using PARR.API.Contracts.V1.Responses; using PARR.API.Contracts.V1.Responses.Base; using PARR.API.Controllers.V1.Base; -using PARR.DAL.Services.Interfaces; +using PARR.Core.Repositories.Interfaces; using PARR.Domain.Common.Roles; namespace PARR.API.Controllers.V1 @@ -18,11 +18,11 @@ namespace PARR.API.Controllers.V1 public class TemplateStatusTypeController : BaseApiController { private readonly IMapper mapper; - private readonly ITemplateStatusTypeService templateStatusTypeService; + private readonly ITemplateStatusTypeRepository templateStatusTypeService; public TemplateStatusTypeController( IMapper mapper, - ITemplateStatusTypeService templateStatusTypeService + ITemplateStatusTypeRepository templateStatusTypeService ) { this.mapper = mapper; diff --git a/PARR.API/Controllers/V1/TemplateSyncStateController.cs b/PARR.API/Controllers/V1/TemplateSyncStateController.cs index 0568f956..90d72794 100644 --- a/PARR.API/Controllers/V1/TemplateSyncStateController.cs +++ b/PARR.API/Controllers/V1/TemplateSyncStateController.cs @@ -6,8 +6,8 @@ using PARR.API.Contracts.V1; using PARR.API.Contracts.V1.Responses; using PARR.API.Contracts.V1.Responses.Base; using PARR.API.Controllers.V1.Base; +using PARR.Core.Repositories.Interfaces; using PARR.DAL.Contracts; -using PARR.DAL.Services.Interfaces; using PARR.Domain.Common.Roles; using PARR.Domain.Enums; @@ -20,14 +20,14 @@ namespace PARR.API.Controllers.V1 public class TemplateSyncStateController : BaseApiController { private readonly IMapper mapper; - private readonly ITemplateService templateService; - private readonly IRobotConfigurationService robotConfigurationService; + private readonly ITemplateRepository templateService; + private readonly IRobotConfigurationRepository robotConfigurationService; private readonly ILogger logger; public TemplateSyncStateController( IMapper mapper, - ITemplateService templateService, - IRobotConfigurationService robotConfigurationService, + ITemplateRepository templateService, + IRobotConfigurationRepository robotConfigurationService, ILogger logger ) { diff --git a/PARR.API/Controllers/V1/TestController.cs b/PARR.API/Controllers/V1/TestController.cs index 9aa20997..0c79222c 100644 --- a/PARR.API/Controllers/V1/TestController.cs +++ b/PARR.API/Controllers/V1/TestController.cs @@ -6,8 +6,8 @@ using PARR.API.Controllers.V1.Base; using PARR.API.Services.Interfaces; using PARR.API.Settings; using PARR.Core.Common.Interfaces; +using PARR.Core.Repositories.Interfaces; using PARR.DAL.NextRunServices; -using PARR.DAL.Services.Interfaces; namespace PARR.API.Controllers.V1 @@ -18,13 +18,13 @@ namespace PARR.API.Controllers.V1 private readonly IClientService clientService; private readonly IRedisCacheService redisCacheService; private readonly INextRunService nextRunService; - private readonly ITemplateService templateService; + private readonly ITemplateRepository templateService; public TestController( IClientService clientService, IRedisCacheService redisCacheService, INextRunService nextRunService, - ITemplateService templateService, + ITemplateRepository templateService, MqSettings mqSettings ) { diff --git a/PARR.API/Controllers/V1/TnkController.cs b/PARR.API/Controllers/V1/TnkController.cs index 1770fc7a..3da3a93d 100644 --- a/PARR.API/Controllers/V1/TnkController.cs +++ b/PARR.API/Controllers/V1/TnkController.cs @@ -11,10 +11,10 @@ using PARR.API.Contracts.V1.Responses.Base; using PARR.API.Controllers.V1.Base; using PARR.API.Extensions; using PARR.API.Services.Interfaces; -using PARR.DAL.Models; -using PARR.DAL.Services.Interfaces; +using PARR.Core.Repositories.Interfaces; using PARR.Domain.Common.Pagination; using PARR.Domain.Common.Roles; +using PARR.Domain.Entities; namespace PARR.API.Controllers.V1 { @@ -26,14 +26,14 @@ namespace PARR.API.Controllers.V1 { private readonly ILogger logger; private readonly IMapper mapper; - private readonly ITnkService tnkService; + private readonly ITnkRepository tnkService; private readonly IValidator validator; private readonly IUriService uriService; public TnkController( ILogger logger, IMapper mapper, - ITnkService tnkService, + ITnkRepository tnkService, IValidator validator, IUriService uriService ) diff --git a/PARR.API/Controllers/V1/UnitController.cs b/PARR.API/Controllers/V1/UnitController.cs index 885b69a3..92a3daa9 100644 --- a/PARR.API/Controllers/V1/UnitController.cs +++ b/PARR.API/Controllers/V1/UnitController.cs @@ -8,12 +8,11 @@ using PARR.API.Contracts.V1.Responses; using PARR.API.Contracts.V1.Responses.Base; using PARR.API.Controllers.V1.Base; using PARR.API.Extensions; -using PARR.BLL.Helpers; using PARR.Core.Common.Helpers; -using PARR.DAL.Models.Unit; -using PARR.DAL.Services.Interfaces.Unit; +using PARR.Core.Repositories.Interfaces.Unit; using PARR.Domain.Common.Pagination; using PARR.Domain.Common.Roles; +using PARR.Domain.Entities.Unit; namespace PARR.API.Controllers.V1 { @@ -21,11 +20,11 @@ namespace PARR.API.Controllers.V1 public class UnitController : BaseApiController { private readonly IMapper mapper; - private readonly IUnitService unitService; + private readonly IUnitRepository unitService; public UnitController( IMapper mapper, - IUnitService unitService + IUnitRepository unitService ) { this.mapper = mapper; diff --git a/PARR.API/Controllers/V1/UnitFieldController.cs b/PARR.API/Controllers/V1/UnitFieldController.cs index a8f93044..d3538f2f 100644 --- a/PARR.API/Controllers/V1/UnitFieldController.cs +++ b/PARR.API/Controllers/V1/UnitFieldController.cs @@ -6,7 +6,7 @@ using PARR.API.Contracts.V1; using PARR.API.Contracts.V1.Responses; using PARR.API.Contracts.V1.Responses.Base; using PARR.API.Controllers.V1.Base; -using PARR.DAL.Services.Interfaces.Unit; +using PARR.Core.Repositories.Interfaces.Unit; using PARR.Domain.Common.Roles; namespace PARR.API.Controllers.V1 @@ -17,11 +17,11 @@ namespace PARR.API.Controllers.V1 [Authorize(Roles = ParrRoles.Administrator.Role)] public class UnitFieldController : BaseApiController { - private readonly IUnitFieldService unitFieldService; + private readonly IUnitFieldRepository unitFieldService; private readonly IMapper mapper; public UnitFieldController( - IUnitFieldService unitFieldService, + IUnitFieldRepository unitFieldService, IMapper mapper ) { diff --git a/PARR.API/Controllers/V1/UnitFieldValueController.cs b/PARR.API/Controllers/V1/UnitFieldValueController.cs index dc3583c6..a4ec7986 100644 --- a/PARR.API/Controllers/V1/UnitFieldValueController.cs +++ b/PARR.API/Controllers/V1/UnitFieldValueController.cs @@ -8,12 +8,11 @@ using PARR.API.Contracts.V1.Responses; using PARR.API.Contracts.V1.Responses.Base; using PARR.API.Controllers.V1.Base; using PARR.API.Extensions; -using PARR.BLL.Helpers; using PARR.Core.Common.Helpers; -using PARR.DAL.Models.Unit; -using PARR.DAL.Services.Interfaces.Unit; +using PARR.Core.Repositories.Interfaces.Unit; using PARR.Domain.Common.Pagination; using PARR.Domain.Common.Roles; +using PARR.Domain.Entities.Unit; namespace PARR.API.Controllers.V1 { @@ -24,13 +23,13 @@ namespace PARR.API.Controllers.V1 public class UnitFieldValueController : BaseApiController { private readonly IMapper mapper; - private readonly IUnitFieldValueService unitFieldValueService; - private readonly IUnitInValueService unitInValueService; + private readonly IUnitFieldValueRepository unitFieldValueService; + private readonly IUnitInValueRepository unitInValueService; public UnitFieldValueController( IMapper mapper, - IUnitFieldValueService unitFieldValueService, - IUnitInValueService unitInValueService + IUnitFieldValueRepository unitFieldValueService, + IUnitInValueRepository unitInValueService ) { this.mapper = mapper; diff --git a/PARR.API/Controllers/V1/UserController.cs b/PARR.API/Controllers/V1/UserController.cs index 671cfaa4..03b64fcb 100644 --- a/PARR.API/Controllers/V1/UserController.cs +++ b/PARR.API/Controllers/V1/UserController.cs @@ -11,10 +11,10 @@ using PARR.API.Contracts.V1.Responses.Base; using PARR.API.Controllers.V1.Base; using PARR.API.Extensions; using PARR.API.Services.Interfaces; -using PARR.DAL.Models; -using PARR.DAL.Services.Interfaces; +using PARR.Core.Repositories.Interfaces; using PARR.Domain.Common.Pagination; using PARR.Domain.Common.Roles; +using PARR.Domain.Entities; namespace PARR.API.Controllers.V1 { @@ -25,14 +25,14 @@ namespace PARR.API.Controllers.V1 public class UserController : BaseApiController { private readonly IMapper mapper; - private readonly IUserService userService; + private readonly IUserRepository userService; private readonly IValidator validator; private readonly IUriService uriService; private readonly ILogger logger; public UserController( IMapper mapper, - IUserService userService, + IUserRepository userService, IValidator validator, IUriService uriService, ILogger logger diff --git a/PARR.API/Controllers/V1/UserRoleController.cs b/PARR.API/Controllers/V1/UserRoleController.cs index ced9c526..f1b9cc48 100644 --- a/PARR.API/Controllers/V1/UserRoleController.cs +++ b/PARR.API/Controllers/V1/UserRoleController.cs @@ -8,9 +8,9 @@ using PARR.API.Contracts.V1.Responses; using PARR.API.Contracts.V1.Responses.Base; using PARR.API.Controllers.V1.Base; using PARR.API.Services.Interfaces; -using PARR.DAL.Models; -using PARR.DAL.Services.Interfaces; +using PARR.Core.Repositories.Interfaces; using PARR.Domain.Common.Roles; +using PARR.Domain.Entities; namespace PARR.API.Controllers.V1 { @@ -20,18 +20,18 @@ namespace PARR.API.Controllers.V1 [Authorize(Roles = ParrRoles.Administrator.Role)] public class UserRoleController : BaseApiController { - private readonly IUserService userService; + private readonly IUserRepository userService; private readonly IMapper mapper; private readonly ILogger logger; - private readonly IRoleService roleService; + private readonly IRoleRepository roleService; private readonly IAuthService authService; private readonly IUriService uriService; public UserRoleController( - IUserService userService, + IUserRepository userService, IMapper mapper, ILogger logger, - IRoleService roleService, + IRoleRepository roleService, IAuthService authService, IUriService uriService ) diff --git a/PARR.API/Controllers/V1/WeekendController.cs b/PARR.API/Controllers/V1/WeekendController.cs index c463e7a9..6bfdfbfa 100644 --- a/PARR.API/Controllers/V1/WeekendController.cs +++ b/PARR.API/Controllers/V1/WeekendController.cs @@ -11,10 +11,10 @@ using PARR.API.Contracts.V1.Responses.Base; using PARR.API.Controllers.V1.Base; using PARR.API.Extensions; using PARR.API.Services.Interfaces; -using PARR.DAL.Models; -using PARR.DAL.Services.Interfaces; +using PARR.Core.Repositories.Interfaces; using PARR.Domain.Common.Pagination; using PARR.Domain.Common.Roles; +using PARR.Domain.Entities; namespace PARR.API.Controllers.V1 { @@ -25,13 +25,13 @@ namespace PARR.API.Controllers.V1 public class WeekendController : BaseApiController { private readonly IMapper mapper; - private readonly IWeekendDayService weekendDayService; + private readonly IWeekendDayRepository weekendDayService; private readonly IUriService uriService; private readonly IValidator validator; public WeekendController( IMapper mapper, - IWeekendDayService weekendDayService, + IWeekendDayRepository weekendDayService, IUriService uriService, IValidator validator ) diff --git a/PARR.API/MappingProfiles/DomainToResponseProfile.cs b/PARR.API/MappingProfiles/DomainToResponseProfile.cs index 540564be..a13440fc 100644 --- a/PARR.API/MappingProfiles/DomainToResponseProfile.cs +++ b/PARR.API/MappingProfiles/DomainToResponseProfile.cs @@ -2,12 +2,13 @@ using PARR.API.Authentication.Models; using PARR.API.Contracts.V1.Responses; using PARR.API.MappingProfiles.Resolvers; +using PARR.Core.Repositories.Interfaces.Schedule; 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; using PARR.Domain.Entities.Base.History; +using PARR.Domain.Entities.Job; +using PARR.Domain.Entities.Schedule; +using PARR.Domain.Entities.Unit; namespace PARR.API.MappingProfiles { @@ -69,7 +70,7 @@ namespace PARR.API.MappingProfiles .ForMember(d => d.Script, o => o.MapFrom(s => s.AgentScript)) .ForMember(d => d.TimeOutSec, o => o.MapFrom(s => s.AgentTimeOutSec)); - CreateMap(); + CreateMap(); #region ScheduleResponseAreaTimeOffsetResponse @@ -236,7 +237,7 @@ namespace PARR.API.MappingProfiles CreateMap(); - CreateMap(); + CreateMap(); CreateMap() .ForMember(d => d.Robot, o => o.MapFrom(s => s.Robot)) diff --git a/PARR.API/MappingProfiles/RequestToDomainProfile.cs b/PARR.API/MappingProfiles/RequestToDomainProfile.cs index 02f2c467..6a2c5b9b 100644 --- a/PARR.API/MappingProfiles/RequestToDomainProfile.cs +++ b/PARR.API/MappingProfiles/RequestToDomainProfile.cs @@ -1,8 +1,8 @@ using AutoMapper; using PARR.API.Contracts.V1.Requests; using PARR.API.Contracts.V1.Requests.Queries; -using PARR.DAL.Models.Job; using PARR.Domain.Common.Pagination; +using PARR.Domain.Entities.Job; namespace PARR.API.MappingProfiles { diff --git a/PARR.API/MappingProfiles/Resolvers/HistoryInitiatorParrComponentResolver.cs b/PARR.API/MappingProfiles/Resolvers/HistoryInitiatorParrComponentResolver.cs index 4cdf5e07..0ee8c0a8 100644 --- a/PARR.API/MappingProfiles/Resolvers/HistoryInitiatorParrComponentResolver.cs +++ b/PARR.API/MappingProfiles/Resolvers/HistoryInitiatorParrComponentResolver.cs @@ -1,16 +1,16 @@ using AutoMapper; using Microsoft.EntityFrameworkCore; using PARR.API.Contracts.V1.Responses; -using PARR.DAL.Services.Interfaces; +using PARR.Core.Repositories.Interfaces; using PARR.Domain.Entities.Base.History; namespace PARR.API.MappingProfiles.Resolvers { public class HistoryInitiatorParrComponentResolver : IValueResolver { - private readonly IParrComponentService parrComponentService; + private readonly IParrComponentRepository parrComponentService; - public HistoryInitiatorParrComponentResolver(IParrComponentService parrComponentService) + public HistoryInitiatorParrComponentResolver(IParrComponentRepository parrComponentService) { this.parrComponentService = parrComponentService; } diff --git a/PARR.API/MappingProfiles/Resolvers/HistoryInitiatorUserResolver.cs b/PARR.API/MappingProfiles/Resolvers/HistoryInitiatorUserResolver.cs index abae719c..29765eab 100644 --- a/PARR.API/MappingProfiles/Resolvers/HistoryInitiatorUserResolver.cs +++ b/PARR.API/MappingProfiles/Resolvers/HistoryInitiatorUserResolver.cs @@ -1,16 +1,16 @@ using AutoMapper; using Microsoft.EntityFrameworkCore; using PARR.API.Contracts.V1.Responses; -using PARR.DAL.Services.Interfaces; +using PARR.Core.Repositories.Interfaces; using PARR.Domain.Entities.Base.History; namespace PARR.API.MappingProfiles.Resolvers { public class HistoryInitiatorUserResolver : IValueResolver { - private readonly IUserService userService; + private readonly IUserRepository userService; - public HistoryInitiatorUserResolver(IUserService userService) + public HistoryInitiatorUserResolver(IUserRepository userService) { this.userService = userService; } diff --git a/PARR.API/MappingProfiles/Resolvers/JobGroupScheduleResolver.cs b/PARR.API/MappingProfiles/Resolvers/JobGroupScheduleResolver.cs index ad41e576..9c24d22d 100644 --- a/PARR.API/MappingProfiles/Resolvers/JobGroupScheduleResolver.cs +++ b/PARR.API/MappingProfiles/Resolvers/JobGroupScheduleResolver.cs @@ -1,26 +1,25 @@ using AutoMapper; using PARR.API.Contracts.V1.Responses; +using PARR.Core.Repositories.Interfaces.Schedule; using PARR.DAL.Contracts; -using PARR.DAL.Models.Job; -using PARR.DAL.Services.Interfaces; -using PARR.DAL.Services.Interfaces.Schedule; +using PARR.Domain.Entities.Job; namespace PARR.API.MappingProfiles.Resolvers { public class JobGroupScheduleResolver : IValueResolver { - private readonly IEsppSchTypeConfigService esppConfigService; + private readonly IEsppSchTypeConfigRepository esppConfigService; private readonly ILogger logger; private readonly IMapper mapper; private readonly SettingsFromDb settingsFromDb; - private readonly IScheduleResponseAreaTimeOffsetService scheduleResponseAreaTimeOffsetService; + private readonly IScheduleResponseAreaTimeOffsetRepository scheduleResponseAreaTimeOffsetService; public JobGroupScheduleResolver( - IEsppSchTypeConfigService esppConfigService, + IEsppSchTypeConfigRepository esppConfigService, ILogger logger, IMapper mapper, SettingsFromDb settingsFromDb, - IScheduleResponseAreaTimeOffsetService scheduleResponseAreaTimeOffsetService + IScheduleResponseAreaTimeOffsetRepository scheduleResponseAreaTimeOffsetService ) { this.esppConfigService = esppConfigService; diff --git a/PARR.API/MappingProfiles/Resolvers/RobotTaskScheduleExcludeCalendarResolver.cs b/PARR.API/MappingProfiles/Resolvers/RobotTaskScheduleExcludeCalendarResolver.cs index 37c9ca28..b358f375 100644 --- a/PARR.API/MappingProfiles/Resolvers/RobotTaskScheduleExcludeCalendarResolver.cs +++ b/PARR.API/MappingProfiles/Resolvers/RobotTaskScheduleExcludeCalendarResolver.cs @@ -1,9 +1,4 @@ -using AutoMapper; -using PARR.API.Contracts.V1.Responses; -using PARR.DAL.Contracts; -using PARR.DAL.Models; - -namespace PARR.API.MappingProfiles.Resolvers +namespace PARR.API.MappingProfiles.Resolvers { //public class RobotTaskScheduleExcludeCalendarResolver : IValueResolver //{ diff --git a/PARR.API/MappingProfiles/Resolvers/RobotTaskScheduleExcludeResolver.cs b/PARR.API/MappingProfiles/Resolvers/RobotTaskScheduleExcludeResolver.cs index 5ac8cc0f..0407b0c8 100644 --- a/PARR.API/MappingProfiles/Resolvers/RobotTaskScheduleExcludeResolver.cs +++ b/PARR.API/MappingProfiles/Resolvers/RobotTaskScheduleExcludeResolver.cs @@ -1,9 +1,4 @@ -using AutoMapper; -using PARR.API.Contracts.V1.Responses; -using PARR.DAL.Contracts; -using PARR.DAL.Models; - -namespace PARR.API.MappingProfiles.Resolvers +namespace PARR.API.MappingProfiles.Resolvers { //public class RobotTaskScheduleExcludeResolver : IValueResolver //{ diff --git a/PARR.API/MappingProfiles/Resolvers/RobotTaskScheduleGenerationTimeResolver.cs b/PARR.API/MappingProfiles/Resolvers/RobotTaskScheduleGenerationTimeResolver.cs index 8d781750..c26de65f 100644 --- a/PARR.API/MappingProfiles/Resolvers/RobotTaskScheduleGenerationTimeResolver.cs +++ b/PARR.API/MappingProfiles/Resolvers/RobotTaskScheduleGenerationTimeResolver.cs @@ -1,11 +1,4 @@ -using AutoMapper; -using PARR.API.Contracts.V1.Responses; -using PARR.BLL.Helpers; -using PARR.DAL.Contracts; -using PARR.DAL.Models; - - -namespace PARR.API.MappingProfiles.Resolvers +namespace PARR.API.MappingProfiles.Resolvers { //public class RobotTaskScheduleGenerationTimeResolver : IValueResolver //{ diff --git a/PARR.API/MappingProfiles/Resolvers/RobotTaskScheduleNextStartResolver.cs b/PARR.API/MappingProfiles/Resolvers/RobotTaskScheduleNextStartResolver.cs index caa71726..56449050 100644 --- a/PARR.API/MappingProfiles/Resolvers/RobotTaskScheduleNextStartResolver.cs +++ b/PARR.API/MappingProfiles/Resolvers/RobotTaskScheduleNextStartResolver.cs @@ -1,11 +1,4 @@ -using AutoMapper; -using PARR.API.Contracts.V1.Responses; -using PARR.BLL.Helpers; -using PARR.DAL.Contracts; -using PARR.DAL.Models; -using PARR.DAL.Services.Interfaces.Schedule; - -namespace PARR.API.MappingProfiles.Resolvers +namespace PARR.API.MappingProfiles.Resolvers { //public class RobotTaskScheduleNextStartResolver : IValueResolver //{ diff --git a/PARR.API/MappingProfiles/Resolvers/RobotTaskScheduleRepeatRangeResolver.cs b/PARR.API/MappingProfiles/Resolvers/RobotTaskScheduleRepeatRangeResolver.cs index 5cc49c57..fd4da706 100644 --- a/PARR.API/MappingProfiles/Resolvers/RobotTaskScheduleRepeatRangeResolver.cs +++ b/PARR.API/MappingProfiles/Resolvers/RobotTaskScheduleRepeatRangeResolver.cs @@ -1,7 +1,7 @@ using AutoMapper; using PARR.API.Contracts.V1.Responses; using PARR.DAL.Contracts; -using PARR.DAL.Models; +using PARR.Domain.Entities; namespace PARR.API.MappingProfiles.Resolvers { diff --git a/PARR.API/MappingProfiles/Resolvers/RobotTaskScheduleSchResolver.cs b/PARR.API/MappingProfiles/Resolvers/RobotTaskScheduleSchResolver.cs index cf1e4958..cccb7aa5 100644 --- a/PARR.API/MappingProfiles/Resolvers/RobotTaskScheduleSchResolver.cs +++ b/PARR.API/MappingProfiles/Resolvers/RobotTaskScheduleSchResolver.cs @@ -1,18 +1,18 @@ using AutoMapper; using PARR.API.Contracts.V1.Responses; -using PARR.DAL.Models; -using PARR.DAL.Services.Interfaces; +using PARR.Core.Repositories.Interfaces.Schedule; +using PARR.Domain.Entities; namespace PARR.API.MappingProfiles.Resolvers { public class RobotTaskScheduleSchResolver : IValueResolver?> { - private readonly IEsppSchTypeConfigService esppConfigService; + private readonly IEsppSchTypeConfigRepository esppConfigService; private readonly ILogger logger; public RobotTaskScheduleSchResolver( - IEsppSchTypeConfigService esppConfigService, + IEsppSchTypeConfigRepository esppConfigService, ILogger logger ) { diff --git a/PARR.API/MappingProfiles/Resolvers/RobotTaskScheduleTimezoneResolver.cs b/PARR.API/MappingProfiles/Resolvers/RobotTaskScheduleTimezoneResolver.cs index 2c62dfd3..dc6a497f 100644 --- a/PARR.API/MappingProfiles/Resolvers/RobotTaskScheduleTimezoneResolver.cs +++ b/PARR.API/MappingProfiles/Resolvers/RobotTaskScheduleTimezoneResolver.cs @@ -1,9 +1,4 @@ -using AutoMapper; -using PARR.API.Contracts.V1.Responses; -using PARR.DAL.Contracts; -using PARR.DAL.Models; - -namespace PARR.API.MappingProfiles.Resolvers +namespace PARR.API.MappingProfiles.Resolvers { //public class RobotTaskScheduleTimezoneResolver : IValueResolver //{ diff --git a/PARR.API/MappingProfiles/Resolvers/RobotTaskTemplateCategoryResolver.cs b/PARR.API/MappingProfiles/Resolvers/RobotTaskTemplateCategoryResolver.cs index 01b3d4ac..6e4c742f 100644 --- a/PARR.API/MappingProfiles/Resolvers/RobotTaskTemplateCategoryResolver.cs +++ b/PARR.API/MappingProfiles/Resolvers/RobotTaskTemplateCategoryResolver.cs @@ -1,7 +1,7 @@ using AutoMapper; using PARR.API.Contracts.V1.Responses; using PARR.DAL.Contracts; -using PARR.DAL.Models; +using PARR.Domain.Entities; namespace PARR.API.MappingProfiles.Resolvers { diff --git a/PARR.API/MappingProfiles/Resolvers/RobotTaskTemplateClosingCodeResolver.cs b/PARR.API/MappingProfiles/Resolvers/RobotTaskTemplateClosingCodeResolver.cs index 9e49fdc9..6af28abf 100644 --- a/PARR.API/MappingProfiles/Resolvers/RobotTaskTemplateClosingCodeResolver.cs +++ b/PARR.API/MappingProfiles/Resolvers/RobotTaskTemplateClosingCodeResolver.cs @@ -1,7 +1,7 @@ using AutoMapper; using PARR.API.Contracts.V1.Responses; using PARR.DAL.Contracts; -using PARR.DAL.Models; +using PARR.Domain.Entities; namespace PARR.API.MappingProfiles.Resolvers { diff --git a/PARR.API/MappingProfiles/Resolvers/RobotTaskTemplateInitiatorResolver.cs b/PARR.API/MappingProfiles/Resolvers/RobotTaskTemplateInitiatorResolver.cs index 9952ec8f..eb2a3c13 100644 --- a/PARR.API/MappingProfiles/Resolvers/RobotTaskTemplateInitiatorResolver.cs +++ b/PARR.API/MappingProfiles/Resolvers/RobotTaskTemplateInitiatorResolver.cs @@ -1,7 +1,7 @@ using AutoMapper; using PARR.API.Contracts.V1.Responses; using PARR.DAL.Contracts; -using PARR.DAL.Models; +using PARR.Domain.Entities; namespace PARR.API.MappingProfiles.Resolvers { diff --git a/PARR.API/MappingProfiles/Resolvers/TemplateCategoryResolver.cs b/PARR.API/MappingProfiles/Resolvers/TemplateCategoryResolver.cs index 0c323b70..17cf0049 100644 --- a/PARR.API/MappingProfiles/Resolvers/TemplateCategoryResolver.cs +++ b/PARR.API/MappingProfiles/Resolvers/TemplateCategoryResolver.cs @@ -1,7 +1,7 @@ using AutoMapper; using PARR.API.Contracts.V1.Responses; using PARR.DAL.Contracts; -using PARR.DAL.Models; +using PARR.Domain.Entities; namespace PARR.API.MappingProfiles.Resolvers { diff --git a/PARR.API/MappingProfiles/Resolvers/TemplateClosingCodeResolver.cs b/PARR.API/MappingProfiles/Resolvers/TemplateClosingCodeResolver.cs index a4105ffb..2fd95d47 100644 --- a/PARR.API/MappingProfiles/Resolvers/TemplateClosingCodeResolver.cs +++ b/PARR.API/MappingProfiles/Resolvers/TemplateClosingCodeResolver.cs @@ -1,7 +1,7 @@ using AutoMapper; using PARR.API.Contracts.V1.Responses; using PARR.DAL.Contracts; -using PARR.DAL.Models; +using PARR.Domain.Entities; namespace PARR.API.MappingProfiles.Resolvers { diff --git a/PARR.API/MappingProfiles/Resolvers/TemplateInitiatorResolver.cs b/PARR.API/MappingProfiles/Resolvers/TemplateInitiatorResolver.cs index 03302ba6..e1e3935b 100644 --- a/PARR.API/MappingProfiles/Resolvers/TemplateInitiatorResolver.cs +++ b/PARR.API/MappingProfiles/Resolvers/TemplateInitiatorResolver.cs @@ -1,7 +1,7 @@ using AutoMapper; using PARR.API.Contracts.V1.Responses; using PARR.DAL.Contracts; -using PARR.DAL.Models; +using PARR.Domain.Entities; namespace PARR.API.MappingProfiles.Resolvers { diff --git a/PARR.API/MappingProfiles/Resolvers/TemplateScheduleResolver.cs b/PARR.API/MappingProfiles/Resolvers/TemplateScheduleResolver.cs index 465a843b..3f7ba436 100644 --- a/PARR.API/MappingProfiles/Resolvers/TemplateScheduleResolver.cs +++ b/PARR.API/MappingProfiles/Resolvers/TemplateScheduleResolver.cs @@ -1,26 +1,25 @@ using AutoMapper; using PARR.API.Contracts.V1.Responses; +using PARR.Core.Repositories.Interfaces.Schedule; using PARR.DAL.Contracts; -using PARR.DAL.Models; -using PARR.DAL.Services.Interfaces; -using PARR.DAL.Services.Interfaces.Schedule; +using PARR.Domain.Entities; namespace PARR.API.MappingProfiles.Resolvers { public class TemplateScheduleResolver : IValueResolver { - private readonly IEsppSchTypeConfigService esppConfigService; + private readonly IEsppSchTypeConfigRepository esppConfigService; private readonly ILogger logger; private readonly IMapper mapper; private readonly SettingsFromDb settingsFromDb; - private readonly IScheduleResponseAreaTimeOffsetService scheduleResponseAreaTimeOffsetService; + private readonly IScheduleResponseAreaTimeOffsetRepository scheduleResponseAreaTimeOffsetService; public TemplateScheduleResolver( - IEsppSchTypeConfigService esppConfigService, + IEsppSchTypeConfigRepository esppConfigService, ILogger logger, IMapper mapper, SettingsFromDb settingsFromDb, - IScheduleResponseAreaTimeOffsetService scheduleResponseAreaTimeOffsetService + IScheduleResponseAreaTimeOffsetRepository scheduleResponseAreaTimeOffsetService ) { this.esppConfigService = esppConfigService; diff --git a/PARR.API/Program.cs b/PARR.API/Program.cs index 28a7333d..756206de 100644 --- a/PARR.API/Program.cs +++ b/PARR.API/Program.cs @@ -24,7 +24,7 @@ builder.Host.UseSerilog((context, config) => builder.Services.InstallSettings(builder.Configuration); // Add services to the container. -builder.Services.InstallDalServices(builder.Configuration); +builder.Services.AddDalServices(builder.Configuration); //---- new ---- builder.Services.AddCoreServices(builder.Configuration); builder.Services.AddTaskManagement(mqSettingsFactory: (provider, taskType) => diff --git a/PARR.API/Services/Implementations/AuthService.cs b/PARR.API/Services/Implementations/AuthService.cs index e9fd1ebf..0c47daf4 100644 --- a/PARR.API/Services/Implementations/AuthService.cs +++ b/PARR.API/Services/Implementations/AuthService.cs @@ -4,8 +4,8 @@ using PARR.API.Domain.InfluxDbModels; using PARR.API.Services.Interfaces; using PARR.API.Settings; using PARR.Core.Common.Interfaces; -using PARR.DAL.Services.Interfaces; -using PARR.DAL.Services.Interfaces.Unit; +using PARR.Core.Repositories.Interfaces; +using PARR.Core.Repositories.Interfaces.Unit; using PARR.Domain.Common.Roles; using PARR.Domain.Settings; @@ -14,21 +14,21 @@ namespace PARR.API.Services.Implementations public class AuthService : IAuthService { private readonly IRedisCacheService cacheService; - private readonly IUserService userService; + private readonly IUserRepository userService; private readonly UserCacheSettings userCacheSettings; private readonly IClientService clientService; private readonly IInfluxDbService influxDbService; private readonly InfluxDbSettings influxDbSettings; - private readonly IUnitService unitService; + private readonly IUnitRepository unitService; public AuthService( IRedisCacheService cacheService, - IUserService userService, + IUserRepository userService, UserCacheSettings userCacheSettings, IClientService clientService, IInfluxDbService influxDbService, InfluxDbSettings influxDbSettings, - IUnitService unitService + IUnitRepository unitService ) { this.cacheService = cacheService; diff --git a/PARR.API/Services/Interfaces/IWorkLoadService.cs b/PARR.API/Services/Interfaces/IWorkLoadService.cs index 36ae14e6..f0ce584c 100644 --- a/PARR.API/Services/Interfaces/IWorkLoadService.cs +++ b/PARR.API/Services/Interfaces/IWorkLoadService.cs @@ -1,7 +1,4 @@ -using PARR.API.Contracts.V1.Requests.Queries; -using PARR.DAL.Models; - -namespace PARR.API.Services.Interfaces +namespace PARR.API.Services.Interfaces { /// /// Сервисы по формированию статистики загрузки рабочих групп/ЗО, и тд регламентными работами diff --git a/PARR.API/Validators/DistributeRequestValidator.cs b/PARR.API/Validators/DistributeRequestValidator.cs index f7826eae..36625915 100644 --- a/PARR.API/Validators/DistributeRequestValidator.cs +++ b/PARR.API/Validators/DistributeRequestValidator.cs @@ -1,13 +1,13 @@ using FluentValidation; using Microsoft.EntityFrameworkCore; using PARR.API.Contracts.V1.Requests; -using PARR.DAL.Services.Interfaces.Job; +using PARR.Core.Repositories.Interfaces.Job; namespace PARR.API.Validators { public class DistributeRequestValidator : AbstractValidator { - public DistributeRequestValidator(IJobGroupService jobGroupService) + public DistributeRequestValidator(IJobGroupRepository jobGroupService) { RuleFor(t => t.JobGroupId).NotEmpty().MustAsync(async (entity, value, c) => { diff --git a/PARR.API/Validators/JobGroupValidator.cs b/PARR.API/Validators/JobGroupValidator.cs index 993459f7..fd96b693 100644 --- a/PARR.API/Validators/JobGroupValidator.cs +++ b/PARR.API/Validators/JobGroupValidator.cs @@ -1,12 +1,10 @@ using FluentValidation; using Microsoft.EntityFrameworkCore; -using Newtonsoft.Json.Linq; using PARR.API.Contracts.V1.Requests; -using PARR.DAL.Contracts; -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.Core.Repositories.Interfaces; +using PARR.Core.Repositories.Interfaces.Job; +using PARR.Core.Repositories.Interfaces.Schedule; +using PARR.Core.Repositories.Interfaces.Unit; using PARR.Domain.Enums; namespace PARR.API.Validators @@ -14,11 +12,11 @@ namespace PARR.API.Validators public class JobGroupValidator : AbstractValidator { public JobGroupValidator( - IJobGroupTypeService jobGroupTypeService, - IUnitFieldService unitFieldService, - IScheduleExcludeTypeService scheduleExcludeTypeService, - IScheduleExcludeTypeCalendarService scheduleExcludeTypeCalendarService, - IDistributionPeriodService distributionPeriodService + IJobGroupTypeRepository jobGroupTypeService, + IUnitFieldRepository unitFieldService, + IScheduleExcludeTypeRepository scheduleExcludeTypeService, + IScheduleExcludeTypeCalendarRepository scheduleExcludeTypeCalendarService, + IDistributionPeriodRepository distributionPeriodService ) { RuleFor(t => t.Name) diff --git a/PARR.API/Validators/JobRequestValidator.cs b/PARR.API/Validators/JobRequestValidator.cs index dd461aac..bff166d3 100644 --- a/PARR.API/Validators/JobRequestValidator.cs +++ b/PARR.API/Validators/JobRequestValidator.cs @@ -1,25 +1,25 @@ using FluentValidation; using PARR.API.Contracts.V1.Requests; -using PARR.DAL.Models.Job; -using PARR.DAL.Services.Interfaces; -using PARR.DAL.Services.Interfaces.Job; -using PARR.DAL.Services.Interfaces.Unit; +using PARR.Core.Repositories.Interfaces; +using PARR.Core.Repositories.Interfaces.Job; +using PARR.Core.Repositories.Interfaces.Unit; +using PARR.Domain.Entities.Job; namespace PARR.API.Validators { public class JobRequestValidator : AbstractValidator { - private readonly ITnkService tnkService; - private readonly IJobGroupService jobGroupService; - private readonly IJobService jobService; - private readonly IUnitFieldService unitFieldService; + private readonly ITnkRepository tnkService; + private readonly IJobGroupRepository jobGroupService; + private readonly IJobRepository jobService; + private readonly IUnitFieldRepository unitFieldService; private JobGroup? jobGroup; public JobRequestValidator( - ITnkService tnkService, - IJobGroupService jobGroupService, - IJobService jobService, - IUnitFieldService unitFieldService + ITnkRepository tnkService, + IJobGroupRepository jobGroupService, + IJobRepository jobService, + IUnitFieldRepository unitFieldService ) { this.tnkService = tnkService; diff --git a/PARR.API/Validators/SubprocessValidator.cs b/PARR.API/Validators/SubprocessValidator.cs index 62ab383d..9aad1a84 100644 --- a/PARR.API/Validators/SubprocessValidator.cs +++ b/PARR.API/Validators/SubprocessValidator.cs @@ -1,16 +1,16 @@ using FluentValidation; using PARR.API.Contracts.V1.Requests; -using PARR.DAL.Services.Interfaces; +using PARR.Core.Repositories.Interfaces; namespace PARR.API.Validators { public class SubprocessValidator : AbstractValidator { - private readonly IProcessService processService; + private readonly IProcessRepository processService; private bool? isValid = null; public SubprocessValidator( - IProcessService processService + IProcessRepository processService ) { this.processService = processService; diff --git a/PARR.API/Validators/TemplateActivatorRequestValidator.cs b/PARR.API/Validators/TemplateActivatorRequestValidator.cs index ce908f9f..05519417 100644 --- a/PARR.API/Validators/TemplateActivatorRequestValidator.cs +++ b/PARR.API/Validators/TemplateActivatorRequestValidator.cs @@ -1,7 +1,7 @@ using FluentValidation; using PARR.API.Contracts.V1.Requests; -using PARR.DAL.Services.Interfaces; -using PARR.DAL.Services.Interfaces.Job; +using PARR.Core.Repositories.Interfaces; +using PARR.Core.Repositories.Interfaces.Job; using PARR.Domain.Enums; namespace PARR.API.Validators @@ -9,9 +9,9 @@ namespace PARR.API.Validators public class TemplateActivatorRequestValidator : AbstractValidator { public TemplateActivatorRequestValidator( - ITemplateService templateService, - IJobService jobService, - IJobGroupService jobGroupService + ITemplateRepository templateService, + IJobRepository jobService, + IJobGroupRepository jobGroupService ) { RuleFor(t => t.EntityType).Must(type => diff --git a/PARR.API/Validators/TnkRequestValidator.cs b/PARR.API/Validators/TnkRequestValidator.cs index 1fbfba89..757376de 100644 --- a/PARR.API/Validators/TnkRequestValidator.cs +++ b/PARR.API/Validators/TnkRequestValidator.cs @@ -1,16 +1,16 @@ using FluentValidation; using PARR.API.Contracts.V1.Requests; -using PARR.DAL.Services.Interfaces; +using PARR.Core.Repositories.Interfaces; namespace PARR.API.Validators { public class TnkRequestValidator : AbstractValidator { - private readonly ISubprocessService subprocessService; + private readonly ISubprocessRepository subprocessService; private bool? isValid = null; public TnkRequestValidator( - ISubprocessService subprocessService + ISubprocessRepository subprocessService ) { this.subprocessService = subprocessService; diff --git a/PARR.API/Validators/WeekendRequestValidator.cs b/PARR.API/Validators/WeekendRequestValidator.cs index 22978f6d..0e592191 100644 --- a/PARR.API/Validators/WeekendRequestValidator.cs +++ b/PARR.API/Validators/WeekendRequestValidator.cs @@ -1,15 +1,15 @@ using FluentValidation; using Microsoft.EntityFrameworkCore; using PARR.API.Contracts.V1.Requests; -using PARR.DAL.Services.Interfaces; +using PARR.Core.Repositories.Interfaces; namespace PARR.API.Validators { public class WeekendRequestValidator : AbstractValidator { - private readonly IWeekendDayService weekendDayService; + private readonly IWeekendDayRepository weekendDayService; - public WeekendRequestValidator(IWeekendDayService weekendDayService) + public WeekendRequestValidator(IWeekendDayRepository weekendDayService) { this.weekendDayService = weekendDayService; diff --git a/PARR.API/Validators/WorkRequestValidator.cs b/PARR.API/Validators/WorkRequestValidator.cs index b3d5683a..e455f873 100644 --- a/PARR.API/Validators/WorkRequestValidator.cs +++ b/PARR.API/Validators/WorkRequestValidator.cs @@ -1,17 +1,17 @@ using FluentValidation; using PARR.API.Contracts.V1.Requests; -using PARR.DAL.Services.Interfaces; +using PARR.Core.Repositories.Interfaces; namespace PARR.API.Validators { public class WorkRequestValidator : AbstractValidator { - private readonly ITnkService tnkService; + private readonly ITnkRepository tnkService; private bool? isValid = null; public WorkRequestValidator( - ITnkService tnkService + ITnkRepository tnkService //ITemplateMaskValidator templateMaskValidator ) { diff --git a/PARR.Core/Repositories/Interfaces/IAgentHistoryRepository.cs b/PARR.Core/Repositories/Interfaces/IAgentHistoryRepository.cs new file mode 100644 index 00000000..bd0c3671 --- /dev/null +++ b/PARR.Core/Repositories/Interfaces/IAgentHistoryRepository.cs @@ -0,0 +1,9 @@ +using PARR.Core.Repositories.Base; +using PARR.Domain.Entities; + +namespace PARR.Core.Repositories.Interfaces +{ + public interface IAgentHistoryRepository : IBaseRepository + { + } +} diff --git a/PARR.Core/Repositories/Interfaces/IDistributionPeriodRepository.cs b/PARR.Core/Repositories/Interfaces/IDistributionPeriodRepository.cs new file mode 100644 index 00000000..7a117e83 --- /dev/null +++ b/PARR.Core/Repositories/Interfaces/IDistributionPeriodRepository.cs @@ -0,0 +1,9 @@ +using PARR.Core.Repositories.Base; +using PARR.Domain.Entities; + +namespace PARR.Core.Repositories.Interfaces +{ + public interface IDistributionPeriodRepository : IBaseRepository + { + } +} diff --git a/PARR.Core/Repositories/Interfaces/IOrderRepository.cs b/PARR.Core/Repositories/Interfaces/IOrderRepository.cs new file mode 100644 index 00000000..83431fb5 --- /dev/null +++ b/PARR.Core/Repositories/Interfaces/IOrderRepository.cs @@ -0,0 +1,9 @@ +using PARR.Core.Repositories.Base; +using PARR.Domain.Entities; + +namespace PARR.Core.Repositories.Interfaces +{ + public interface IOrderRepository : IBaseRepository + { + } +} diff --git a/PARR.DAL/Services/Interfaces/IOrderStatusService.cs b/PARR.Core/Repositories/Interfaces/IOrderStatusRepository.cs similarity index 52% rename from PARR.DAL/Services/Interfaces/IOrderStatusService.cs rename to PARR.Core/Repositories/Interfaces/IOrderStatusRepository.cs index c2fc96a3..d2a9be7c 100644 --- a/PARR.DAL/Services/Interfaces/IOrderStatusService.cs +++ b/PARR.Core/Repositories/Interfaces/IOrderStatusRepository.cs @@ -1,10 +1,9 @@ -using PARR.DAL.Contracts; -using PARR.DAL.Models; +using PARR.Domain.Entities; using PARR.Domain.Enums; -namespace PARR.DAL.Services.Interfaces +namespace PARR.Core.Repositories.Interfaces { - public interface IOrderStatusService + public interface IOrderStatusRepository { IQueryable Get(); OrderStatusEnum GetOrderStatusByName(string statusName); diff --git a/PARR.Core/Repositories/Interfaces/IParrComponentRepository.cs b/PARR.Core/Repositories/Interfaces/IParrComponentRepository.cs new file mode 100644 index 00000000..6d5ae10f --- /dev/null +++ b/PARR.Core/Repositories/Interfaces/IParrComponentRepository.cs @@ -0,0 +1,9 @@ +using PARR.Domain.Entities; + +namespace PARR.Core.Repositories.Interfaces +{ + public interface IParrComponentRepository + { + IQueryable Get(); + } +} diff --git a/PARR.Core/Repositories/Interfaces/IProcessRepository.cs b/PARR.Core/Repositories/Interfaces/IProcessRepository.cs new file mode 100644 index 00000000..f735f1e7 --- /dev/null +++ b/PARR.Core/Repositories/Interfaces/IProcessRepository.cs @@ -0,0 +1,9 @@ +using PARR.Core.Repositories.Base; +using PARR.Domain.Entities; + +namespace PARR.Core.Repositories.Interfaces +{ + public interface IProcessRepository : IBaseRepository + { + } +} diff --git a/PARR.DAL/Services/Interfaces/IRobotConfigurationService.cs b/PARR.Core/Repositories/Interfaces/IRobotConfigurationRepository.cs similarity index 91% rename from PARR.DAL/Services/Interfaces/IRobotConfigurationService.cs rename to PARR.Core/Repositories/Interfaces/IRobotConfigurationRepository.cs index 05a8edac..06b019c8 100644 --- a/PARR.DAL/Services/Interfaces/IRobotConfigurationService.cs +++ b/PARR.Core/Repositories/Interfaces/IRobotConfigurationRepository.cs @@ -1,10 +1,10 @@ -using PARR.DAL.Models; -using PARR.DAL.Services.Interfaces.Base; +using PARR.Core.Repositories.Base; +using PARR.Domain.Entities; using PARR.Domain.Enums; -namespace PARR.DAL.Services.Interfaces +namespace PARR.Core.Repositories.Interfaces { - public interface IRobotConfigurationService : IBaseService + public interface IRobotConfigurationRepository : IBaseRepository { /// /// Обновить статус работы робота diff --git a/PARR.Core/Repositories/Interfaces/IRobotHistoryLevelRepository.cs b/PARR.Core/Repositories/Interfaces/IRobotHistoryLevelRepository.cs new file mode 100644 index 00000000..7099934f --- /dev/null +++ b/PARR.Core/Repositories/Interfaces/IRobotHistoryLevelRepository.cs @@ -0,0 +1,9 @@ +using PARR.Domain.Entities; + +namespace PARR.Core.Repositories.Interfaces +{ + public interface IRobotHistoryLevelRepository + { + IQueryable Get(); + } +} diff --git a/PARR.Core/Repositories/Interfaces/IRobotHistoryRepository.cs b/PARR.Core/Repositories/Interfaces/IRobotHistoryRepository.cs new file mode 100644 index 00000000..755f501c --- /dev/null +++ b/PARR.Core/Repositories/Interfaces/IRobotHistoryRepository.cs @@ -0,0 +1,9 @@ +using PARR.Core.Repositories.Base; +using PARR.Domain.Entities; + +namespace PARR.Core.Repositories.Interfaces +{ + public interface IRobotHistoryRepository : IBaseRepository + { + } +} diff --git a/PARR.Core/Repositories/Interfaces/IRobotRepository.cs b/PARR.Core/Repositories/Interfaces/IRobotRepository.cs new file mode 100644 index 00000000..be9fff60 --- /dev/null +++ b/PARR.Core/Repositories/Interfaces/IRobotRepository.cs @@ -0,0 +1,9 @@ +using PARR.Domain.Entities; + +namespace PARR.Core.Repositories.Interfaces +{ + public interface IRobotRepository + { + IQueryable Get(); + } +} diff --git a/PARR.Core/Repositories/Interfaces/IRobotStatusRepository.cs b/PARR.Core/Repositories/Interfaces/IRobotStatusRepository.cs new file mode 100644 index 00000000..921e7996 --- /dev/null +++ b/PARR.Core/Repositories/Interfaces/IRobotStatusRepository.cs @@ -0,0 +1,9 @@ +using PARR.Domain.Entities; + +namespace PARR.Core.Repositories.Interfaces +{ + public interface IRobotStatusRepository + { + IQueryable Get(); + } +} diff --git a/PARR.Core/Repositories/Interfaces/IRoleRepository.cs b/PARR.Core/Repositories/Interfaces/IRoleRepository.cs new file mode 100644 index 00000000..95d7e370 --- /dev/null +++ b/PARR.Core/Repositories/Interfaces/IRoleRepository.cs @@ -0,0 +1,9 @@ +using PARR.Core.Repositories.Base; +using PARR.Domain.Entities; + +namespace PARR.Core.Repositories.Interfaces +{ + public interface IRoleRepository : IBaseRepository + { + } +} diff --git a/PARR.Core/Repositories/Interfaces/IStatusTemplateRepository.cs b/PARR.Core/Repositories/Interfaces/IStatusTemplateRepository.cs new file mode 100644 index 00000000..0167027d --- /dev/null +++ b/PARR.Core/Repositories/Interfaces/IStatusTemplateRepository.cs @@ -0,0 +1,7 @@ +namespace PARR.Core.Repositories.Interfaces +{ + public interface IStatusTemplateRepository + { + IQueryable Get(); + } +} diff --git a/PARR.Core/Repositories/Interfaces/ISubprocessRepository.cs b/PARR.Core/Repositories/Interfaces/ISubprocessRepository.cs new file mode 100644 index 00000000..3c717211 --- /dev/null +++ b/PARR.Core/Repositories/Interfaces/ISubprocessRepository.cs @@ -0,0 +1,9 @@ +using PARR.Core.Repositories.Base; +using PARR.Domain.Entities; + +namespace PARR.Core.Repositories.Interfaces +{ + public interface ISubprocessRepository : IBaseRepository + { + } +} diff --git a/PARR.Core/Repositories/Interfaces/ITaskStatusRepository.cs b/PARR.Core/Repositories/Interfaces/ITaskStatusRepository.cs new file mode 100644 index 00000000..43e73ff1 --- /dev/null +++ b/PARR.Core/Repositories/Interfaces/ITaskStatusRepository.cs @@ -0,0 +1,7 @@ +namespace PARR.Core.Repositories.Interfaces +{ + public interface ITaskStatusRepository + { + IQueryable Get(); + } +} diff --git a/PARR.Core/Repositories/Interfaces/ITemplateHistoryRepository.cs b/PARR.Core/Repositories/Interfaces/ITemplateHistoryRepository.cs new file mode 100644 index 00000000..5427acd8 --- /dev/null +++ b/PARR.Core/Repositories/Interfaces/ITemplateHistoryRepository.cs @@ -0,0 +1,9 @@ +using PARR.Core.Repositories.Base; +using PARR.Domain.Entities; + +namespace PARR.Core.Repositories.Interfaces +{ + public interface ITemplateHistoryRepository : IBaseRepository + { + } +} diff --git a/PARR.DAL/Services/Interfaces/ITemplateService.cs b/PARR.Core/Repositories/Interfaces/ITemplateRepository.cs similarity index 85% rename from PARR.DAL/Services/Interfaces/ITemplateService.cs rename to PARR.Core/Repositories/Interfaces/ITemplateRepository.cs index 68bdfe12..67389abc 100644 --- a/PARR.DAL/Services/Interfaces/ITemplateService.cs +++ b/PARR.Core/Repositories/Interfaces/ITemplateRepository.cs @@ -1,10 +1,10 @@ -using PARR.DAL.Models; -using PARR.DAL.Services.Interfaces.Base; +using PARR.Core.Repositories.Base; +using PARR.Domain.Entities; using PARR.Domain.Entities.Base.History; -namespace PARR.DAL.Services.Interfaces +namespace PARR.Core.Repositories.Interfaces { - public interface ITemplateService : IBaseService