feat: создана структура проекта, core, domain, infrastructure. Перенесены enum и task согласно архитектуры

This commit is contained in:
Mikhail Trubnikov
2026-04-13 16:58:30 +10:00
parent 0bbbac09fe
commit da83aff19c
160 changed files with 482 additions and 267 deletions

View File

@@ -96,6 +96,12 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PARR.TemplateUpdater", "PAR
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PARR.DAL.IntegrationTests", "PARR.DAL.IntegrationTests\PARR.DAL.IntegrationTests.csproj", "{D1C65DB8-77BC-00FD-5BA1-6C7303FD093C}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PARR.DAL.IntegrationTests", "PARR.DAL.IntegrationTests\PARR.DAL.IntegrationTests.csproj", "{D1C65DB8-77BC-00FD-5BA1-6C7303FD093C}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PARR.Core", "PARR.Core\PARR.Core.csproj", "{E93DFC30-9886-486A-9F67-F782ABE0D1E0}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PARR.Domain", "PARR.Domain\PARR.Domain.csproj", "{3740461A-7235-4C26-81F3-3977529D646D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PARR.Infrastructure", "PARR.Infrastructure\PARR.Infrastructure.csproj", "{8EB3BC72-2EFA-48AA-A305-C28ABEDB03AD}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
@@ -268,6 +274,18 @@ Global
{D1C65DB8-77BC-00FD-5BA1-6C7303FD093C}.Debug|Any CPU.Build.0 = Debug|Any CPU {D1C65DB8-77BC-00FD-5BA1-6C7303FD093C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D1C65DB8-77BC-00FD-5BA1-6C7303FD093C}.Release|Any CPU.ActiveCfg = Release|Any CPU {D1C65DB8-77BC-00FD-5BA1-6C7303FD093C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D1C65DB8-77BC-00FD-5BA1-6C7303FD093C}.Release|Any CPU.Build.0 = Release|Any CPU {D1C65DB8-77BC-00FD-5BA1-6C7303FD093C}.Release|Any CPU.Build.0 = Release|Any CPU
{E93DFC30-9886-486A-9F67-F782ABE0D1E0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E93DFC30-9886-486A-9F67-F782ABE0D1E0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E93DFC30-9886-486A-9F67-F782ABE0D1E0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E93DFC30-9886-486A-9F67-F782ABE0D1E0}.Release|Any CPU.Build.0 = Release|Any CPU
{3740461A-7235-4C26-81F3-3977529D646D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3740461A-7235-4C26-81F3-3977529D646D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3740461A-7235-4C26-81F3-3977529D646D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3740461A-7235-4C26-81F3-3977529D646D}.Release|Any CPU.Build.0 = Release|Any CPU
{8EB3BC72-2EFA-48AA-A305-C28ABEDB03AD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8EB3BC72-2EFA-48AA-A305-C28ABEDB03AD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8EB3BC72-2EFA-48AA-A305-C28ABEDB03AD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8EB3BC72-2EFA-48AA-A305-C28ABEDB03AD}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE

View File

@@ -1,4 +1,4 @@
using PARR.DAL.Contracts; using PARR.Domain.Enums;
namespace PARR.API.Contracts.V1.Requests namespace PARR.API.Contracts.V1.Requests
{ {

View File

@@ -1,4 +1,4 @@
using PARR.DAL.Contracts; using PARR.Domain.Enums;
namespace PARR.API.Contracts.V1.Requests namespace PARR.API.Contracts.V1.Requests
{ {

View File

@@ -1,5 +1,5 @@
using PARR.Constants; using PARR.Constants;
using PARR.DAL.Contracts; using PARR.Domain.Enums;
namespace PARR.API.Contracts.V1.Requests.Queries namespace PARR.API.Contracts.V1.Requests.Queries
{ {

View File

@@ -1,4 +1,4 @@
using PARR.DAL.Contracts; using PARR.Domain.Enums;
namespace PARR.API.Contracts.V1.Requests.Queries namespace PARR.API.Contracts.V1.Requests.Queries
{ {

View File

@@ -1,4 +1,4 @@
using PARR.Constants; using PARR.Domain.Enums;
namespace PARR.API.Contracts.V1.Requests.Queries namespace PARR.API.Contracts.V1.Requests.Queries
{ {

View File

@@ -1,4 +1,4 @@
using PARR.DAL.Contracts; using PARR.Domain.Enums;
namespace PARR.API.Contracts.V1.Requests namespace PARR.API.Contracts.V1.Requests
{ {

View File

@@ -1,4 +1,4 @@
using PARR.DAL.Contracts; using PARR.Domain.Enums;
namespace PARR.API.Contracts.V1.Requests namespace PARR.API.Contracts.V1.Requests
{ {

View File

@@ -1,4 +1,4 @@
using PARR.DAL.Contracts; using PARR.Domain.Enums;
namespace PARR.API.Contracts.V1.Responses namespace PARR.API.Contracts.V1.Responses
{ {

View File

@@ -9,10 +9,9 @@ using PARR.API.Services.Interfaces;
using PARR.API.Settings; using PARR.API.Settings;
using PARR.BLL.Domain.Mq; using PARR.BLL.Domain.Mq;
using PARR.BLL.Services.Interfaces; using PARR.BLL.Services.Interfaces;
using PARR.Common.Domain;
using PARR.Constants; using PARR.Constants;
using System.Text.Encodings.Web; using PARR.Domain.Entities.Base.History;
using System.Text.Json; using PARR.Domain.Enums;
namespace PARR.API.Controllers.V1 namespace PARR.API.Controllers.V1
{ {

View File

@@ -9,9 +9,9 @@ using PARR.API.Services.Interfaces;
using PARR.API.Settings; using PARR.API.Settings;
using PARR.BLL.Domain.Mq; using PARR.BLL.Domain.Mq;
using PARR.BLL.Services.Interfaces; using PARR.BLL.Services.Interfaces;
using PARR.Common.Domain;
using PARR.Constants; using PARR.Constants;
using System.Text.Json; using PARR.Domain.Entities.Base.History;
using PARR.Domain.Enums;
namespace PARR.API.Controllers.V1 namespace PARR.API.Controllers.V1
{ {

View File

@@ -15,10 +15,7 @@ using PARR.API.Settings;
using PARR.BLL.Domain.Mq; using PARR.BLL.Domain.Mq;
using PARR.BLL.Helpers; using PARR.BLL.Helpers;
using PARR.BLL.Services.Interfaces; using PARR.BLL.Services.Interfaces;
using PARR.Common.Domain;
using PARR.Constants; using PARR.Constants;
using PARR.DAL.Cache.Services;
using PARR.DAL.Contracts;
using PARR.DAL.DomainModels; using PARR.DAL.DomainModels;
using PARR.DAL.DomainServices.Interfaces; using PARR.DAL.DomainServices.Interfaces;
using PARR.DAL.DomainServices.UnitFilterService; using PARR.DAL.DomainServices.UnitFilterService;
@@ -27,7 +24,8 @@ using PARR.DAL.Models.Job;
using PARR.DAL.Services.Interfaces; using PARR.DAL.Services.Interfaces;
using PARR.DAL.Services.Interfaces.Job; using PARR.DAL.Services.Interfaces.Job;
using PARR.DAL.Services.Interfaces.Unit; using PARR.DAL.Services.Interfaces.Unit;
using System.Text.Json; using PARR.Domain.Entities.Base.History;
using PARR.Domain.Enums;
namespace PARR.API.Controllers.V1 namespace PARR.API.Controllers.V1
{ {

View File

@@ -15,9 +15,7 @@ using PARR.API.Settings;
using PARR.BLL.Domain.Mq; using PARR.BLL.Domain.Mq;
using PARR.BLL.Helpers; using PARR.BLL.Helpers;
using PARR.BLL.Services.Interfaces; using PARR.BLL.Services.Interfaces;
using PARR.Common.Domain;
using PARR.Constants; using PARR.Constants;
using PARR.DAL.Contracts;
using PARR.DAL.DomainModels; using PARR.DAL.DomainModels;
using PARR.DAL.DomainServices.Interfaces; using PARR.DAL.DomainServices.Interfaces;
using PARR.DAL.Models; using PARR.DAL.Models;
@@ -25,6 +23,8 @@ using PARR.DAL.Models.Job;
using PARR.DAL.Services.Interfaces; using PARR.DAL.Services.Interfaces;
using PARR.DAL.Services.Interfaces.Job; using PARR.DAL.Services.Interfaces.Job;
using PARR.DAL.Services.Interfaces.Schedule; using PARR.DAL.Services.Interfaces.Schedule;
using PARR.Domain.Entities.Base.History;
using PARR.Domain.Enums;
namespace PARR.API.Controllers.V1 namespace PARR.API.Controllers.V1
{ {

View File

@@ -7,10 +7,10 @@ using PARR.API.Controllers.V1.Base;
using PARR.API.Settings; using PARR.API.Settings;
using PARR.BLL.Domain.Mq; using PARR.BLL.Domain.Mq;
using PARR.BLL.Services.Interfaces; using PARR.BLL.Services.Interfaces;
using PARR.Common.Domain;
using PARR.Constants; using PARR.Constants;
using PARR.DAL.Services.Interfaces.Job; using PARR.DAL.Services.Interfaces.Job;
using Serilog.Core; using PARR.Domain.Entities.Base.History;
using PARR.Domain.Enums;
namespace PARR.API.Controllers.V1 namespace PARR.API.Controllers.V1
{ {

View File

@@ -9,7 +9,6 @@ using PARR.API.Contracts.V1.Responses.Base;
using PARR.API.Controllers.V1.Base; using PARR.API.Controllers.V1.Base;
using PARR.API.Services.Interfaces; using PARR.API.Services.Interfaces;
using PARR.BLL.Helpers; using PARR.BLL.Helpers;
using PARR.Common.Domain;
using PARR.Constants; using PARR.Constants;
using PARR.DAL.Contracts; using PARR.DAL.Contracts;
using PARR.DAL.DomainServices.Shortcodes; using PARR.DAL.DomainServices.Shortcodes;
@@ -17,6 +16,8 @@ using PARR.DAL.Models;
using PARR.DAL.NextRunServices; using PARR.DAL.NextRunServices;
using PARR.DAL.Services.Interfaces; using PARR.DAL.Services.Interfaces;
using PARR.DAL.Services.Interfaces.Schedule; using PARR.DAL.Services.Interfaces.Schedule;
using PARR.Domain.Entities.Base.History;
using PARR.Domain.Enums;
namespace PARR.API.Controllers.V1 namespace PARR.API.Controllers.V1
{ {

View File

@@ -12,6 +12,7 @@ using PARR.Constants;
using PARR.DAL.Contracts; using PARR.DAL.Contracts;
using PARR.DAL.Models; using PARR.DAL.Models;
using PARR.DAL.Services.Interfaces; using PARR.DAL.Services.Interfaces;
using PARR.Domain.Enums;
namespace PARR.API.Controllers.V1 namespace PARR.API.Controllers.V1
{ {

View File

@@ -11,6 +11,7 @@ using PARR.API.Controllers.V1.Base;
using PARR.Constants; using PARR.Constants;
using PARR.DAL.Contracts; using PARR.DAL.Contracts;
using PARR.DAL.Services.Interfaces; using PARR.DAL.Services.Interfaces;
using PARR.Domain.Enums;
namespace PARR.API.Controllers.V1.Statistics namespace PARR.API.Controllers.V1.Statistics
{ {

View File

@@ -9,6 +9,7 @@ using PARR.API.Helpers;
using PARR.Constants; using PARR.Constants;
using PARR.DAL.NextRunServices; using PARR.DAL.NextRunServices;
using PARR.DAL.Services.Interfaces; using PARR.DAL.Services.Interfaces;
using PARR.Domain.Enums;
namespace PARR.API.Controllers.V1.Statistics namespace PARR.API.Controllers.V1.Statistics
{ {
@@ -50,7 +51,7 @@ namespace PARR.API.Controllers.V1.Statistics
var templates = await templateService.Get() var templates = await templateService.Get()
.Where(t => .Where(t =>
t.InitiatorParrComponentId == Constants.ParrComponentsEnum.JobAutoControl t.InitiatorParrComponentId == ParrComponentsEnum.JobAutoControl
&& &&
(( ((
// измененные // измененные
@@ -87,7 +88,7 @@ namespace PARR.API.Controllers.V1.Statistics
//&& t.DateCreated.DateTime.AddHours(timeZoneQuery.TimeZoneOffsetHours).Date <= endPeriod.Date //&& t.DateCreated.DateTime.AddHours(timeZoneQuery.TimeZoneOffsetHours).Date <= endPeriod.Date
t.DateCreated.UtcDateTime >= utcStartPeriod t.DateCreated.UtcDateTime >= utcStartPeriod
&& t.DateCreated.UtcDateTime <= utcEndPeriod && t.DateCreated.UtcDateTime <= utcEndPeriod
&& t.TemplateHistories.Any(x => x.InitiatorParrComponentId == Constants.ParrComponentsEnum.JobAutoControl) && t.TemplateHistories.Any(x => x.InitiatorParrComponentId == ParrComponentsEnum.JobAutoControl)
) )
.ToListAsync(); .ToListAsync();
@@ -97,14 +98,14 @@ namespace PARR.API.Controllers.V1.Statistics
x.InitiatorComment != null x.InitiatorComment != null
&& !x.InitiatorComment.Contains(TemplateActivatorActionsEnum.ActivateAllForAutoControl.ToString()) && !x.InitiatorComment.Contains(TemplateActivatorActionsEnum.ActivateAllForAutoControl.ToString())
&& !x.InitiatorComment.Contains(TemplateActivatorActionsEnum.DeactivateAllForAutoControl.ToString()) && !x.InitiatorComment.Contains(TemplateActivatorActionsEnum.DeactivateAllForAutoControl.ToString())
&& x.InitiatorParrComponentId == Constants.ParrComponentsEnum.JobAutoControl && x.InitiatorParrComponentId == ParrComponentsEnum.JobAutoControl
)).ToList(); )).ToList();
//TODO: createdTemplatesAndMoveToHistory - возможно тут ошибка. Не убираются дубли шаблонов из template //TODO: createdTemplatesAndMoveToHistory - возможно тут ошибка. Не убираются дубли шаблонов из template
#endregion #endregion
var history = await templateHistoryService.Get() var history = await templateHistoryService.Get()
.Where(t => .Where(t =>
t.InitiatorParrComponentId == Constants.ParrComponentsEnum.JobAutoControl t.InitiatorParrComponentId == ParrComponentsEnum.JobAutoControl
&& t.DateModified.HasValue && t.DateModified.HasValue
//&& t.DateModified.Value.DateTime.AddHours(timeZoneQuery.TimeZoneOffsetHours).Date >= startPeriod.Date //&& t.DateModified.Value.DateTime.AddHours(timeZoneQuery.TimeZoneOffsetHours).Date >= startPeriod.Date
//&& t.DateModified.Value.DateTime.AddHours(timeZoneQuery.TimeZoneOffsetHours).Date <= endPeriod.Date //&& t.DateModified.Value.DateTime.AddHours(timeZoneQuery.TimeZoneOffsetHours).Date <= endPeriod.Date

View File

@@ -11,6 +11,7 @@ using PARR.Constants;
using PARR.DAL.Contracts; using PARR.DAL.Contracts;
using PARR.DAL.NextRunServices; using PARR.DAL.NextRunServices;
using PARR.DAL.Services.Interfaces; using PARR.DAL.Services.Interfaces;
using PARR.Domain.Enums;
namespace PARR.API.Controllers.V1.Statistics namespace PARR.API.Controllers.V1.Statistics
{ {

View File

@@ -7,11 +7,9 @@ using PARR.API.Services.Interfaces;
using PARR.API.Settings; using PARR.API.Settings;
using PARR.BLL.Domain.Mq; using PARR.BLL.Domain.Mq;
using PARR.BLL.Services.Interfaces; using PARR.BLL.Services.Interfaces;
using PARR.Common.Domain;
using PARR.Constants;
using PARR.DAL.Cache.Services;
using PARR.DAL.DomainServices.Interfaces; using PARR.DAL.DomainServices.Interfaces;
using System.Text.Json; using PARR.Domain.Entities.Base.History;
using PARR.Domain.Enums;
namespace PARR.API.Controllers.V1 namespace PARR.API.Controllers.V1
{ {

View File

@@ -9,10 +9,10 @@ using PARR.API.Services.Interfaces;
using PARR.API.Settings; using PARR.API.Settings;
using PARR.BLL.Domain.Mq; using PARR.BLL.Domain.Mq;
using PARR.BLL.Services.Interfaces; using PARR.BLL.Services.Interfaces;
using PARR.Common.Domain;
using PARR.Constants; using PARR.Constants;
using PARR.DAL.Services.Interfaces.Job; using PARR.DAL.Services.Interfaces.Job;
using System.Text.Json; using PARR.Domain.Entities.Base.History;
using PARR.Domain.Enums;
namespace PARR.API.Controllers.V1 namespace PARR.API.Controllers.V1
{ {

View File

@@ -11,7 +11,6 @@ using PARR.API.Controllers.V1.Base;
using PARR.API.Extensions; using PARR.API.Extensions;
using PARR.API.Services.Interfaces; using PARR.API.Services.Interfaces;
using PARR.BLL.Helpers; using PARR.BLL.Helpers;
using PARR.Common.Domain;
using PARR.Constants; using PARR.Constants;
using PARR.DAL.Contracts; using PARR.DAL.Contracts;
using PARR.DAL.DomainModels; using PARR.DAL.DomainModels;
@@ -19,6 +18,8 @@ using PARR.DAL.DomainServices.Shortcodes;
using PARR.DAL.Models; using PARR.DAL.Models;
using PARR.DAL.Services.Interfaces; using PARR.DAL.Services.Interfaces;
using PARR.DAL.Services.Interfaces.Schedule; using PARR.DAL.Services.Interfaces.Schedule;
using PARR.Domain.Entities.Base.History;
using PARR.Domain.Enums;
namespace PARR.API.Controllers.V1 namespace PARR.API.Controllers.V1
{ {

View File

@@ -9,6 +9,7 @@ using PARR.API.Controllers.V1.Base;
using PARR.Constants; using PARR.Constants;
using PARR.DAL.Contracts; using PARR.DAL.Contracts;
using PARR.DAL.Services.Interfaces; using PARR.DAL.Services.Interfaces;
using PARR.Domain.Enums;
namespace PARR.API.Controllers.V1 namespace PARR.API.Controllers.V1
{ {

View File

@@ -13,6 +13,7 @@ using PARR.DAL.Contracts;
using PARR.DAL.DomainModels; using PARR.DAL.DomainModels;
using PARR.DAL.Models; using PARR.DAL.Models;
using PARR.DAL.Services.Interfaces; using PARR.DAL.Services.Interfaces;
using PARR.Domain.Enums;
namespace PARR.API.Controllers.V1 namespace PARR.API.Controllers.V1
{ {

View File

@@ -2,12 +2,12 @@
using PARR.API.Authentication.Models; using PARR.API.Authentication.Models;
using PARR.API.Contracts.V1.Responses; using PARR.API.Contracts.V1.Responses;
using PARR.API.MappingProfiles.Resolvers; using PARR.API.MappingProfiles.Resolvers;
using PARR.Common.Domain;
using PARR.DAL.DomainModels; using PARR.DAL.DomainModels;
using PARR.DAL.Models; using PARR.DAL.Models;
using PARR.DAL.Models.Job; using PARR.DAL.Models.Job;
using PARR.DAL.Models.Schedule; using PARR.DAL.Models.Schedule;
using PARR.DAL.Models.Unit; using PARR.DAL.Models.Unit;
using PARR.Domain.Entities.Base.History;
namespace PARR.API.MappingProfiles namespace PARR.API.MappingProfiles
{ {

View File

@@ -1,8 +1,8 @@
using AutoMapper; using AutoMapper;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using PARR.API.Contracts.V1.Responses; using PARR.API.Contracts.V1.Responses;
using PARR.Common.Domain;
using PARR.DAL.Services.Interfaces; using PARR.DAL.Services.Interfaces;
using PARR.Domain.Entities.Base.History;
namespace PARR.API.MappingProfiles.Resolvers namespace PARR.API.MappingProfiles.Resolvers
{ {

View File

@@ -1,8 +1,8 @@
using AutoMapper; using AutoMapper;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using PARR.API.Contracts.V1.Responses; using PARR.API.Contracts.V1.Responses;
using PARR.Common.Domain;
using PARR.DAL.Services.Interfaces; using PARR.DAL.Services.Interfaces;
using PARR.Domain.Entities.Base.History;
namespace PARR.API.MappingProfiles.Resolvers namespace PARR.API.MappingProfiles.Resolvers
{ {

View File

@@ -35,7 +35,9 @@
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\PARR.BLL\PARR.BLL.csproj" /> <ProjectReference Include="..\PARR.BLL\PARR.BLL.csproj" />
<ProjectReference Include="..\PARR.Core\PARR.Core.csproj" />
<ProjectReference Include="..\PARR.DAL\PARR.DAL.csproj" /> <ProjectReference Include="..\PARR.DAL\PARR.DAL.csproj" />
<ProjectReference Include="..\PARR.Infrastructure\PARR.Infrastructure.csproj" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@@ -4,7 +4,9 @@ using Microsoft.AspNetCore.HttpOverrides;
using PARR.API.Authentication; using PARR.API.Authentication;
using PARR.API.Installers; using PARR.API.Installers;
using PARR.BLL; using PARR.BLL;
using PARR.Core;
using PARR.DAL; using PARR.DAL;
using PARR.Infrastructure;
using Serilog; using Serilog;
using System.Reflection; using System.Reflection;
@@ -22,6 +24,8 @@ builder.Host.UseSerilog((context, config) =>
// Add services to the container. // Add services to the container.
builder.Services.InstallDalServices(builder.Configuration); builder.Services.InstallDalServices(builder.Configuration);
builder.Services.AddCoreServices(builder.Configuration);
builder.Services.AddInfrastructureServices(builder.Configuration);
builder.Services.InstallBllServices(builder.Configuration); builder.Services.InstallBllServices(builder.Configuration);
builder.Services.InstallApiServices(builder.Configuration); builder.Services.InstallApiServices(builder.Configuration);
builder.Services.InstallSettings(builder.Configuration); builder.Services.InstallSettings(builder.Configuration);

View File

@@ -1,5 +1,5 @@
using PARR.BLL.Contracts.Interfaces; using PARR.BLL.Contracts.Interfaces;
using PARR.DAL.Contracts; using PARR.Domain.Enums;
namespace PARR.API.Settings namespace PARR.API.Settings
{ {

View File

@@ -1,6 +1,6 @@
using FluentValidation; using FluentValidation;
using PARR.API.Contracts.V1.Requests; using PARR.API.Contracts.V1.Requests;
using PARR.DAL.Contracts; using PARR.Domain.Enums;
namespace PARR.API.Validators namespace PARR.API.Validators
{ {

View File

@@ -1,6 +1,6 @@
using FluentValidation; using FluentValidation;
using PARR.API.Contracts.V1.Requests; using PARR.API.Contracts.V1.Requests;
using PARR.DAL.Contracts; using PARR.Domain.Enums;
namespace PARR.API.Validators namespace PARR.API.Validators
{ {

View File

@@ -7,6 +7,7 @@ using PARR.DAL.Services.Interfaces;
using PARR.DAL.Services.Interfaces.Job; using PARR.DAL.Services.Interfaces.Job;
using PARR.DAL.Services.Interfaces.Schedule; using PARR.DAL.Services.Interfaces.Schedule;
using PARR.DAL.Services.Interfaces.Unit; using PARR.DAL.Services.Interfaces.Unit;
using PARR.Domain.Enums;
namespace PARR.API.Validators namespace PARR.API.Validators
{ {

View File

@@ -1,6 +1,7 @@
using FluentValidation; using FluentValidation;
using PARR.API.Contracts.V1.Requests; using PARR.API.Contracts.V1.Requests;
using PARR.DAL.Contracts; using PARR.DAL.Contracts;
using PARR.Domain.Enums;
namespace PARR.API.Validators namespace PARR.API.Validators
{ {

View File

@@ -1,6 +1,7 @@
using FluentValidation; using FluentValidation;
using PARR.API.Contracts.V1.Requests; using PARR.API.Contracts.V1.Requests;
using PARR.DAL.Contracts; using PARR.DAL.Contracts;
using PARR.Domain.Enums;
namespace PARR.API.Validators namespace PARR.API.Validators
{ {

View File

@@ -1,4 +1,4 @@
using PARR.Common.Domain; using PARR.Domain.Entities.Base.History;
namespace PARR.BLL.Domain.Mq namespace PARR.BLL.Domain.Mq
{ {

View File

@@ -1,4 +1,4 @@
using PARR.Common.Domain; using PARR.Domain.Entities.Base.History;
namespace PARR.BLL.Domain.Mq namespace PARR.BLL.Domain.Mq
{ {

View File

@@ -1,5 +1,5 @@
using PARR.Common.Domain; using PARR.Constants;
using PARR.Constants; using PARR.Domain.Entities.Base.History;
namespace PARR.BLL.Domain.Mq namespace PARR.BLL.Domain.Mq
{ {

View File

@@ -1,4 +1,4 @@
using PARR.Common.Domain; using PARR.Domain.Entities.Base.History;
namespace PARR.BLL.Domain.Mq namespace PARR.BLL.Domain.Mq
{ {

View File

@@ -1,4 +1,4 @@
using PARR.Common.Domain; using PARR.Domain.Entities.Base.History;
namespace PARR.BLL.Domain.Mq namespace PARR.BLL.Domain.Mq
{ {

View File

@@ -1,5 +1,5 @@
using PARR.Common.Domain; using PARR.Constants;
using PARR.Constants; using PARR.Domain.Entities.Base.History;
namespace PARR.BLL.Domain.Mq namespace PARR.BLL.Domain.Mq
{ {

View File

@@ -1,5 +1,5 @@
using PARR.Common.Domain; using PARR.Constants;
using PARR.Constants; using PARR.Domain.Entities.Base.History;
namespace PARR.BLL.Domain.Mq namespace PARR.BLL.Domain.Mq
{ {

View File

@@ -18,6 +18,7 @@
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\PARR.Common\PARR.Common.csproj" /> <ProjectReference Include="..\PARR.Common\PARR.Common.csproj" />
<ProjectReference Include="..\PARR.Constants\PARR.Constants.csproj" /> <ProjectReference Include="..\PARR.Constants\PARR.Constants.csproj" />
<ProjectReference Include="..\PARR.Domain\PARR.Domain.csproj" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@@ -1,5 +1,7 @@
namespace PARR.Common namespace PARR.Common
{ {
//TODO:!!! Удалить этот класс !!!
/// <summary> /// <summary>
/// Даты и часовые пояса /// Даты и часовые пояса
/// </summary> /// </summary>

View File

@@ -0,0 +1,44 @@
using FluentValidation;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
namespace PARR.Core
{
public static class DependencyInjection
{
/// <summary>
/// Регистрация Core (BLL) сервисов
/// </summary>
/// <param name="services"></param>
/// <param name="configuration"></param>
/// <returns></returns>
public static IServiceCollection AddCoreServices(this IServiceCollection services, IConfiguration configuration)
{
// Регим профили AutoMapper
services.AddBllMapping();
// Регим все валидаторы в Core
services.AddValidatorsFromAssembly(typeof(DependencyInjection).Assembly, includeInternalTypes: true);
// Регистрируем сревисы Core
//services.AddScoped<IUserService, UserService>();
return services;
}
private static IServiceCollection AddBllMapping(this IServiceCollection services)
{
// AutoMapper
services.AddAutoMapper(cfg =>
{
// регим все в Core
cfg.AddMaps(typeof(DependencyInjection).Assembly);
});
return services;
}
}
}

View File

@@ -0,0 +1,27 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<Folder Include="Infrastructure\" />
<Folder Include="Common\" />
<Folder Include="Services\" />
<Folder Include="Repositories\" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="12.0.1" />
<PackageReference Include="FluentValidation.DependencyInjectionExtensions" Version="11.5.2" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.20" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\PARR.Domain\PARR.Domain.csproj" />
</ItemGroup>
</Project>

View File

@@ -2,6 +2,7 @@
using PARR.DAL.Contracts; using PARR.DAL.Contracts;
using PARR.DAL.Models.Job; using PARR.DAL.Models.Job;
using PARR.DAL.Models.Unit; using PARR.DAL.Models.Unit;
using PARR.Domain.Enums;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;

View File

@@ -3,6 +3,7 @@ using PARR.DAL.Context;
using PARR.DAL.Contracts; using PARR.DAL.Contracts;
using PARR.DAL.Models.Job; using PARR.DAL.Models.Job;
using PARR.DAL.Models.Unit; using PARR.DAL.Models.Unit;
using PARR.Domain.Enums;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;

View File

@@ -1,10 +1,10 @@
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using Moq; using Moq;
using PARR.DAL.Contracts;
using PARR.DAL.DomainModels; using PARR.DAL.DomainModels;
using PARR.DAL.Models; using PARR.DAL.Models;
using PARR.DAL.NextRunServices.Subservices; using PARR.DAL.NextRunServices.Subservices;
using PARR.DAL.Services.Interfaces; using PARR.DAL.Services.Interfaces;
using PARR.Domain.Enums;
namespace PARR.DAL.Tests.TransformServices namespace PARR.DAL.Tests.TransformServices
{ {

View File

@@ -6,8 +6,9 @@ using PARR.DAL.Extensions;
using PARR.DAL.Models; using PARR.DAL.Models;
using PARR.DAL.Models.Job; using PARR.DAL.Models.Job;
using PARR.DAL.Models.Schedule; using PARR.DAL.Models.Schedule;
using PARR.DAL.Models.TaskModels;
using PARR.DAL.Models.Unit; using PARR.DAL.Models.Unit;
using PARR.Domain.Entities.TaskEntities;
using PARR.Domain.Enums;
namespace PARR.DAL.Context namespace PARR.DAL.Context
{ {
@@ -121,7 +122,7 @@ namespace PARR.DAL.Context
#region Tasks #region Tasks
public DbSet<TaskItem> Tasks { get; set; } public DbSet<TaskItem> Tasks { get; set; }
public DbSet<Models.TaskModels.TaskStatus> TaskStatus { get; set; } public DbSet<Domain.Entities.TaskEntities.TaskStatus> TaskStatus { get; set; }
public DbSet<TaskType> TaskTypes { get; set; } public DbSet<TaskType> TaskTypes { get; set; }
public DbSet<TaskError> TaskErrors { get; set; } public DbSet<TaskError> TaskErrors { get; set; }
@@ -581,9 +582,9 @@ namespace PARR.DAL.Context
#region TaskStatus #region TaskStatus
modelBuilder.Entity<PARR.DAL.Models.TaskModels.TaskStatus>(f => modelBuilder.Entity<Domain.Entities.TaskEntities.TaskStatus>(f =>
{ {
f.HasData(new PARR.DAL.Models.TaskModels.TaskStatus[] f.HasData(new Domain.Entities.TaskEntities.TaskStatus[]
{ {
new(){Code=TaskItemStatusEnum.Pending, Name=TaskItemStatusEnum.Pending.ToString(), Description="Ожидание"}, new(){Code=TaskItemStatusEnum.Pending, Name=TaskItemStatusEnum.Pending.ToString(), Description="Ожидание"},
new(){Code=TaskItemStatusEnum.Processing, Name=TaskItemStatusEnum.Processing.ToString(), Description="В работе"}, new(){Code=TaskItemStatusEnum.Processing, Name=TaskItemStatusEnum.Processing.ToString(), Description="В работе"},

View File

@@ -11,6 +11,7 @@ using PARR.DAL.Models.Job;
using PARR.DAL.Services.Interfaces; using PARR.DAL.Services.Interfaces;
using PARR.DAL.Services.Interfaces.Job; using PARR.DAL.Services.Interfaces.Job;
using PARR.DAL.Services.Interfaces.Unit; using PARR.DAL.Services.Interfaces.Unit;
using PARR.Domain.Enums;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;

View File

@@ -9,6 +9,7 @@ using PARR.DAL.Models.Job;
using PARR.DAL.Models.Unit; using PARR.DAL.Models.Unit;
using PARR.DAL.Services.Interfaces.Job; using PARR.DAL.Services.Interfaces.Job;
using PARR.DAL.Services.Interfaces.Unit; using PARR.DAL.Services.Interfaces.Unit;
using PARR.Domain.Enums;
using System.Diagnostics; using System.Diagnostics;
namespace PARR.DAL.DomainServices.UnitFilterService; namespace PARR.DAL.DomainServices.UnitFilterService;

View File

@@ -1,4 +1,4 @@
using PARR.DAL.Models.Base; using PARR.Domain.Entities.Base;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
@@ -8,7 +8,7 @@ namespace PARR.DAL.Models
/// История работы агентов /// История работы агентов
/// </summary> /// </summary>
[Table("AgentHistories")] [Table("AgentHistories")]
public class AgentHistory : IBase public class AgentHistory : IBaseEntity
{ {
[Key] [Key]
public Guid Id { get; set; } public Guid Id { get; set; }

View File

@@ -1,5 +1,5 @@
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using PARR.DAL.Models.Base; using PARR.Domain.Entities.Base;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
@@ -7,7 +7,7 @@ namespace PARR.DAL.Models
{ {
[Table("Applications")] [Table("Applications")]
[Index(nameof(Name), nameof(ApplicationTypeId), IsUnique = true)] [Index(nameof(Name), nameof(ApplicationTypeId), IsUnique = true)]
public class Application : IBase public class Application : IBaseEntity
{ {
[Key] [Key]
public Guid Id { get; set; } public Guid Id { get; set; }

View File

@@ -1,10 +1,10 @@
using PARR.DAL.Models.Base; using PARR.Domain.Entities.Base;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
namespace PARR.DAL.Models namespace PARR.DAL.Models
{ {
[Table("ApplicationsInHost")] [Table("ApplicationsInHost")]
public class ApplicationInHost : IBase public class ApplicationInHost : IBaseEntity
{ {
public Guid Id { get; set; } public Guid Id { get; set; }
public DateTimeOffset DateCreated { get; set; } public DateTimeOffset DateCreated { get; set; }

View File

@@ -1,10 +1,10 @@
using PARR.DAL.Models.Base; using PARR.Domain.Entities.Base;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
namespace PARR.DAL.Models namespace PARR.DAL.Models
{ {
[Table("ApplicationTypes")] [Table("ApplicationTypes")]
public class ApplicationType : IBase public class ApplicationType : IBaseEntity
{ {
public Guid Id { get; set; } public Guid Id { get; set; }
public DateTimeOffset DateCreated { get; set; } public DateTimeOffset DateCreated { get; set; }

View File

@@ -1,6 +1,6 @@
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using PARR.DAL.Models.Base;
using PARR.DAL.Settings; using PARR.DAL.Settings;
using PARR.Domain.Entities.Base;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
@@ -8,7 +8,7 @@ namespace PARR.DAL.Models
{ {
[Table("ApplicationsInWorks")] [Table("ApplicationsInWorks")]
[Index(nameof(WorkId), nameof(ApplicationId), IsUnique = true)] [Index(nameof(WorkId), nameof(ApplicationId), IsUnique = true)]
public class ApplicationsInWork : IBase public class ApplicationsInWork : IBaseEntity
{ {
[Key] [Key]
public Guid Id { get; set; } public Guid Id { get; set; }

View File

@@ -1,11 +0,0 @@
namespace PARR.DAL.Models.Base
{
public interface IBase: IBaseDateCreated, IBaseDateModified
{
Guid Id { get; set; }
//DateTimeOffset DateCreated { get; set; }
//DateTimeOffset? DateModified { get; set; }
}
}

View File

@@ -1,7 +0,0 @@
namespace PARR.DAL.Models.Base
{
public interface IBaseDateCreated
{
DateTimeOffset DateCreated { get; set; }
}
}

View File

@@ -1,7 +0,0 @@
namespace PARR.DAL.Models.Base
{
public interface IBaseDateModified
{
DateTimeOffset? DateModified { get; set; }
}
}

View File

@@ -1,7 +1,6 @@
using PARR.Constants; using PARR.DAL.Context;
using PARR.DAL.Context;
using PARR.DAL.Models.Base;
using PARR.DAL.Models.Job; using PARR.DAL.Models.Job;
using PARR.Domain.Entities.Base;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
@@ -11,7 +10,7 @@ namespace PARR.DAL.Models
/// Период автоматического распеделения РР /// Период автоматического распеделения РР
/// </summary> /// </summary>
[Table("DistributionPeriods", Schema = DataContextSettings.Schedule)] [Table("DistributionPeriods", Schema = DataContextSettings.Schedule)]
public class DistributionPeriod : IBase public class DistributionPeriod : IBaseEntity
{ {
[Key] [Key]
public Guid Id { get; set; } public Guid Id { get; set; }

View File

@@ -1,6 +1,6 @@
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using PARR.DAL.Context; using PARR.DAL.Context;
using PARR.DAL.Models.Base; using PARR.Domain.Entities.Base;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
@@ -11,7 +11,7 @@ namespace PARR.DAL.Models
/// </summary> /// </summary>
[Table("EsppSchTypeConfigs", Schema = DataContextSettings.Schedule)] [Table("EsppSchTypeConfigs", Schema = DataContextSettings.Schedule)]
[Index(nameof(TypeScheduleId), nameof(TypeId), IsUnique = true)] [Index(nameof(TypeScheduleId), nameof(TypeId), IsUnique = true)]
public class EsppSchTypeConfig : IBase public class EsppSchTypeConfig : IBaseEntity
{ {
[Key] [Key]
public Guid Id { get; set; } public Guid Id { get; set; }

View File

@@ -1,5 +1,5 @@
using PARR.DAL.Context; using PARR.DAL.Context;
using PARR.DAL.Models.Base; using PARR.Domain.Entities.Base;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
@@ -9,7 +9,7 @@ namespace PARR.DAL.Models
/// Расписание ЕСПП: значения типов повторений /// Расписание ЕСПП: значения типов повторений
/// </summary> /// </summary>
[Table("EsppSchTypeValues", Schema = DataContextSettings.Schedule)] [Table("EsppSchTypeValues", Schema = DataContextSettings.Schedule)]
public class EsppSchTypeValue : IBase public class EsppSchTypeValue : IBaseEntity
{ {
[Key] [Key]
public Guid Id { get; set; } public Guid Id { get; set; }

View File

@@ -1,5 +1,5 @@
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using PARR.DAL.Models.Base; using PARR.Domain.Entities.Base;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
@@ -8,7 +8,7 @@ namespace PARR.DAL.Models
[Table("Hosts")] [Table("Hosts")]
[Index(nameof(IP))] [Index(nameof(IP))]
[Index(nameof(Ek), IsUnique = true)] [Index(nameof(Ek), IsUnique = true)]
public class Host : IBase public class Host : IBaseEntity
{ {
[Key] [Key]
public Guid Id { get; set; } public Guid Id { get; set; }

View File

@@ -1,6 +1,6 @@
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using PARR.DAL.Context; using PARR.DAL.Context;
using PARR.DAL.Models.Base; using PARR.Domain.Entities.Base;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
@@ -8,7 +8,7 @@ namespace PARR.DAL.Models.Job
{ {
[Table("Jobs", Schema = DataContextSettings.Job)] [Table("Jobs", Schema = DataContextSettings.Job)]
[Comment("Таблица видов работ")] [Comment("Таблица видов работ")]
public class Job : IBase public class Job : IBaseEntity
{ {
[Key] [Key]
public Guid Id { get; set; } public Guid Id { get; set; }

View File

@@ -1,7 +1,7 @@
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using PARR.DAL.Context; using PARR.DAL.Context;
using PARR.DAL.Models.Base;
using PARR.DAL.Models.Unit; using PARR.DAL.Models.Unit;
using PARR.Domain.Entities.Base;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
@@ -9,7 +9,7 @@ namespace PARR.DAL.Models.Job
{ {
[Table("FieldFilters", Schema = DataContextSettings.Job)] [Table("FieldFilters", Schema = DataContextSettings.Job)]
[Comment("Таблица описания критериев выборки аттрибутов ЭК")] [Comment("Таблица описания критериев выборки аттрибутов ЭК")]
public class JobFieldFilter : IBase public class JobFieldFilter : IBaseEntity
{ {
[Key] [Key]
public Guid Id { get; set; } public Guid Id { get; set; }

View File

@@ -1,9 +1,9 @@
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using PARR.DAL.Context; using PARR.DAL.Context;
using PARR.DAL.Models.Base;
using PARR.DAL.Models.Schedule; using PARR.DAL.Models.Schedule;
using PARR.DAL.Models.Unit; using PARR.DAL.Models.Unit;
using PARR.DAL.Settings; using PARR.DAL.Settings;
using PARR.Domain.Entities.Base;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
@@ -11,7 +11,7 @@ namespace PARR.DAL.Models.Job
{ {
[Table("Groups", Schema = DataContextSettings.Job)] [Table("Groups", Schema = DataContextSettings.Job)]
[Comment("Таблица описания групп работ, для реализации зонтиков")] [Comment("Таблица описания групп работ, для реализации зонтиков")]
public class JobGroup : IBase public class JobGroup : IBaseEntity
{ {
[Key] [Key]
public Guid Id { get; set; } public Guid Id { get; set; }

View File

@@ -1,7 +1,7 @@
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using PARR.DAL.Context; using PARR.DAL.Context;
using PARR.DAL.Contracts; using PARR.Domain.Entities.Base;
using PARR.DAL.Models.Base; using PARR.Domain.Enums;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
@@ -9,7 +9,7 @@ namespace PARR.DAL.Models.Job
{ {
[Table("GroupTypes", Schema = DataContextSettings.Job)] [Table("GroupTypes", Schema = DataContextSettings.Job)]
[Comment("Таблица типов групп работ")] [Comment("Таблица типов групп работ")]
public class JobGroupType : IBase public class JobGroupType : IBaseEntity
{ {
[Key] [Key]
public Guid Id { get; set; } public Guid Id { get; set; }

View File

@@ -1,6 +1,6 @@
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using PARR.DAL.Context; using PARR.DAL.Context;
using PARR.DAL.Models.Base; using PARR.Domain.Entities.Base;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
@@ -8,7 +8,7 @@ namespace PARR.DAL.Models.Job
{ {
[Table("UnitFilters", Schema = DataContextSettings.Job)] [Table("UnitFilters", Schema = DataContextSettings.Job)]
[Comment("Таблица описания критериев выборки ЭК, описание полей в АСУ ЕСПП")] [Comment("Таблица описания критериев выборки ЭК, описание полей в АСУ ЕСПП")]
public class JobUnitFilter : IBase public class JobUnitFilter : IBaseEntity
{ {
[Key] [Key]
public Guid Id { get; set; } public Guid Id { get; set; }

View File

@@ -1,5 +1,5 @@
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using PARR.DAL.Models.Base; using PARR.Domain.Entities.Base;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
@@ -10,7 +10,7 @@ namespace PARR.DAL.Models
/// </summary> /// </summary>
[Table("Orders")] [Table("Orders")]
[Index(nameof(Number), IsUnique = true)] [Index(nameof(Number), IsUnique = true)]
public class Order : IBase public class Order : IBaseEntity
{ {
[Key] [Key]
public Guid Id { get; set; } public Guid Id { get; set; }

View File

@@ -1,5 +1,5 @@
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using PARR.Constants; using PARR.Domain.Enums;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;

View File

@@ -1,5 +1,5 @@
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using PARR.DAL.Models.Base; using PARR.Domain.Entities.Base;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
@@ -7,7 +7,7 @@ namespace PARR.DAL.Models
{ {
[Table("Processes")] [Table("Processes")]
[Index(nameof(EsppId), IsUnique = true)] [Index(nameof(EsppId), IsUnique = true)]
public class Process : IBase public class Process : IBaseEntity
{ {
[Key] [Key]
public Guid Id { get; set; } public Guid Id { get; set; }

View File

@@ -1,5 +1,5 @@
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using PARR.DAL.Models.Base; using PARR.Domain.Entities.Base;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
@@ -9,7 +9,7 @@ namespace PARR.DAL.Models
[Index(nameof(TemplateId), nameof(RobotCode), IsUnique = true)] [Index(nameof(TemplateId), nameof(RobotCode), IsUnique = true)]
[Index(nameof(TemplateId), nameof(TaskStatusCode))] [Index(nameof(TemplateId), nameof(TaskStatusCode))]
[Index(nameof(TemplateId), nameof(RobotStatusCode))] [Index(nameof(TemplateId), nameof(RobotStatusCode))]
public class RobotConfiguration : IBase public class RobotConfiguration : IBaseEntity
{ {
[Key] [Key]
public Guid Id { get; set; } public Guid Id { get; set; }

View File

@@ -1,10 +1,10 @@
using PARR.DAL.Models.Base; using PARR.Domain.Entities.Base;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
namespace PARR.DAL.Models namespace PARR.DAL.Models
{ {
[Table("RobotHistories")] [Table("RobotHistories")]
public class RobotHistory : IBase public class RobotHistory : IBaseEntity
{ {
public Guid Id { get; set; } public Guid Id { get; set; }

View File

@@ -1,11 +1,11 @@
using PARR.DAL.Models.Base; using PARR.Domain.Entities.Base;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
namespace PARR.DAL.Models namespace PARR.DAL.Models
{ {
[Table("Roles")] [Table("Roles")]
public class Role : IBase public class Role : IBaseEntity
{ {
[Key] [Key]
public Guid Id { get; set; } public Guid Id { get; set; }

View File

@@ -1,7 +1,7 @@
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using PARR.DAL.Context; using PARR.DAL.Context;
using PARR.DAL.Models.Base;
using PARR.DAL.Models.Job; using PARR.DAL.Models.Job;
using PARR.Domain.Entities.Base;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
@@ -12,7 +12,7 @@ namespace PARR.DAL.Models.Schedule
/// </summary> /// </summary>
[Table("ExcludeTypes", Schema = DataContextSettings.Schedule)] [Table("ExcludeTypes", Schema = DataContextSettings.Schedule)]
[Comment("Расписание регламентной работы - Тип исключения")] [Comment("Расписание регламентной работы - Тип исключения")]
public class ScheduleExcludeType : IBase public class ScheduleExcludeType : IBaseEntity
{ {
[Key] [Key]
public Guid Id { get; set; } public Guid Id { get; set; }

View File

@@ -1,7 +1,7 @@
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using PARR.DAL.Context; using PARR.DAL.Context;
using PARR.DAL.Models.Base;
using PARR.DAL.Models.Job; using PARR.DAL.Models.Job;
using PARR.Domain.Entities.Base;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
@@ -12,7 +12,7 @@ namespace PARR.DAL.Models.Schedule
/// </summary> /// </summary>
[Table("ExcludeTypeCalendars", Schema = DataContextSettings.Schedule)] [Table("ExcludeTypeCalendars", Schema = DataContextSettings.Schedule)]
[Comment("Расписание регламентной работы, исключение - Календарь")] [Comment("Расписание регламентной работы, исключение - Календарь")]
public class ScheduleExcludeTypeCalendar : IBase public class ScheduleExcludeTypeCalendar : IBaseEntity
{ {
[Key] [Key]
public Guid Id { get; set; } public Guid Id { get; set; }

View File

@@ -1,5 +1,5 @@
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using PARR.DAL.Models.Base; using PARR.Domain.Entities.Base;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
@@ -7,7 +7,7 @@ namespace PARR.DAL.Models
{ {
[Table("Subprocesses")] [Table("Subprocesses")]
[Index(nameof(EsppId), IsUnique = true)] [Index(nameof(EsppId), IsUnique = true)]
public class Subprocess : IBase public class Subprocess : IBaseEntity
{ {
[Key] [Key]
public Guid Id { get; set; } public Guid Id { get; set; }

View File

@@ -1,9 +1,9 @@
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using PARR.Common.Domain;
using PARR.Constants; using PARR.Constants;
using PARR.DAL.Models.Base; using PARR.Domain.Entities.Base;
using PARR.DAL.Models.Base.History; using PARR.Domain.Entities.Base.History;
using PARR.DAL.Models.Base.History.Base; using PARR.Domain.Entities.Base.History.Base;
using PARR.Domain.Enums;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
@@ -11,7 +11,7 @@ namespace PARR.DAL.Models
{ {
[Table("Templates")] [Table("Templates")]
[Index(nameof(Name), nameof(Index), IsUnique = true)] [Index(nameof(Name), nameof(Index), IsUnique = true)]
public class Template : IBase, ITemplateGeneralProps, IHistoryInitiator, IMyHistory<TemplateHistory> public class Template : IBaseEntity, ITemplateGeneralProps, IHistoryInitiator, IMyHistory<TemplateHistory>
{ {
[Key] [Key]
public Guid Id { get; set; } public Guid Id { get; set; }

View File

@@ -1,15 +1,15 @@
using PARR.Common.Domain; using PARR.Constants;
using PARR.Constants; using PARR.Domain.Entities.Base;
using PARR.DAL.Models.Base; using PARR.Domain.Entities.Base.History;
using PARR.DAL.Models.Base.History; using PARR.Domain.Entities.Base.History.Base;
using PARR.DAL.Models.Base.History.Base; using PARR.Domain.Enums;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
namespace PARR.DAL.Models namespace PARR.DAL.Models
{ {
[Table("TemplateHistories")] [Table("TemplateHistories")]
public class TemplateHistory : IBase, ITemplateGeneralProps, IHistoryInitiator, IHistoryTable public class TemplateHistory : IBaseEntity, ITemplateGeneralProps, IHistoryInitiator, IHistoryTable
{ {
[Key] [Key]
public Guid Id { get; set; } public Guid Id { get; set; }

View File

@@ -1,4 +1,4 @@
using PARR.DAL.Models.Base; using PARR.Domain.Entities.Base;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
@@ -6,7 +6,7 @@ namespace PARR.DAL.Models
{ {
[Table("Tnks")] [Table("Tnks")]
//[Index(nameof(EsppId), IsUnique = true)] //[Index(nameof(EsppId), IsUnique = true)]
public class Tnk : IBase public class Tnk : IBaseEntity
{ {
[Key] [Key]
public Guid Id { get; set; } public Guid Id { get; set; }

View File

@@ -1,6 +1,6 @@
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using PARR.DAL.Context; using PARR.DAL.Context;
using PARR.DAL.Models.Base; using PARR.Domain.Entities.Base;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
@@ -9,7 +9,7 @@ namespace PARR.DAL.Models.Unit
[Table("Units", Schema = DataContextSettings.Unit)] [Table("Units", Schema = DataContextSettings.Unit)]
[Comment("Таблица с ЭК")] [Comment("Таблица с ЭК")]
[Index(nameof(Name), IsUnique = true)] [Index(nameof(Name), IsUnique = true)]
public class Unit : IBase public class Unit : IBaseEntity
{ {
[Key] [Key]
public Guid Id { get; set; } public Guid Id { get; set; }

View File

@@ -1,7 +1,7 @@
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using PARR.DAL.Context; using PARR.DAL.Context;
using PARR.DAL.Models.Base;
using PARR.DAL.Models.Job; using PARR.DAL.Models.Job;
using PARR.Domain.Entities.Base;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
@@ -14,7 +14,7 @@ namespace PARR.DAL.Models.Unit
[Comment("Справочник полей ЭК")] [Comment("Справочник полей ЭК")]
[Index(nameof(AihitName))] [Index(nameof(AihitName))]
[Index(nameof(EsppName))] [Index(nameof(EsppName))]
public class UnitField : IBase public class UnitField : IBaseEntity
{ {
[Key] [Key]
public Guid Id { get; set; } public Guid Id { get; set; }

View File

@@ -1,6 +1,6 @@
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using PARR.DAL.Context; using PARR.DAL.Context;
using PARR.DAL.Models.Base; using PARR.Domain.Entities.Base;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
namespace PARR.DAL.Models.Unit namespace PARR.DAL.Models.Unit
@@ -8,7 +8,7 @@ namespace PARR.DAL.Models.Unit
[Table("FieldInFieldValues", Schema = DataContextSettings.Unit)] [Table("FieldInFieldValues", Schema = DataContextSettings.Unit)]
[Comment("Значения полей ЭК")] [Comment("Значения полей ЭК")]
[PrimaryKey(nameof(FieldId), nameof(FieldValueId))] [PrimaryKey(nameof(FieldId), nameof(FieldValueId))]
public class UnitFieldInUnitFieldValue : IBaseDateCreated public class UnitFieldInUnitFieldValue : IBaseEntityDateCreated
{ {
public Guid FieldId { get; set; } public Guid FieldId { get; set; }

View File

@@ -1,6 +1,6 @@
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using PARR.DAL.Context; using PARR.DAL.Context;
using PARR.DAL.Models.Base; using PARR.Domain.Entities.Base;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
@@ -9,7 +9,7 @@ namespace PARR.DAL.Models.Unit
[Table("FieldValues", Schema = DataContextSettings.Unit)] [Table("FieldValues", Schema = DataContextSettings.Unit)]
[Comment("Значения полей ЭК")] [Comment("Значения полей ЭК")]
[Index(nameof(Value), IsUnique = true)] [Index(nameof(Value), IsUnique = true)]
public class UnitFieldValue : IBase public class UnitFieldValue : IBaseEntity
{ {
[Key] [Key]
public Guid Id { get; set; } public Guid Id { get; set; }

View File

@@ -1,6 +1,6 @@
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using PARR.DAL.Context; using PARR.DAL.Context;
using PARR.DAL.Models.Base; using PARR.Domain.Entities.Base;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
namespace PARR.DAL.Models.Unit namespace PARR.DAL.Models.Unit
@@ -12,7 +12,7 @@ namespace PARR.DAL.Models.Unit
[Index(nameof(FieldId), nameof(ValueId))] [Index(nameof(FieldId), nameof(ValueId))]
[Index(nameof(UnitId), nameof(FieldId))] [Index(nameof(UnitId), nameof(FieldId))]
[Index(nameof(FieldId), nameof(UnitId))] [Index(nameof(FieldId), nameof(UnitId))]
public class UnitInValue : IBaseDateModified, IBaseDateCreated public class UnitInValue : IBaseEntityDateModified, IBaseEntityDateCreated
{ {
public Guid UnitId { get; set; } public Guid UnitId { get; set; }

View File

@@ -1,5 +1,5 @@
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using PARR.DAL.Models.Base; using PARR.Domain.Entities.Base;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
@@ -7,7 +7,7 @@ namespace PARR.DAL.Models
{ {
[Table("Users")] [Table("Users")]
[Index(nameof(Ip), IsUnique = true)] [Index(nameof(Ip), IsUnique = true)]
public class User : IBase public class User : IBaseEntity
{ {
[Key] [Key]
public Guid Id { get; set; } public Guid Id { get; set; }

View File

@@ -1,6 +1,6 @@
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using PARR.DAL.Context; using PARR.DAL.Context;
using PARR.DAL.Models.Base; using PARR.Domain.Entities.Base;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
@@ -8,7 +8,7 @@ namespace PARR.DAL.Models
{ {
[Table("WeekendDays", Schema = DataContextSettings.Schedule)] [Table("WeekendDays", Schema = DataContextSettings.Schedule)]
[Index(nameof(Date), IsUnique = true)] [Index(nameof(Date), IsUnique = true)]
public class WeekendDay : IBase public class WeekendDay : IBaseEntity
{ {
[Key] [Key]
public Guid Id { get; set; } public Guid Id { get; set; }

View File

@@ -1,11 +1,11 @@
using PARR.DAL.Models.Base; using PARR.Domain.Entities.Base;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
namespace PARR.DAL.Models namespace PARR.DAL.Models
{ {
[Table("WorkGroups")] [Table("WorkGroups")]
public class WorkGroup : IBase public class WorkGroup : IBaseEntity
{ {
[Key] [Key]
public Guid Id { get; set; } public Guid Id { get; set; }

View File

@@ -1,7 +1,7 @@
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using PARR.DAL.Contracts;
using PARR.DAL.DomainModels; using PARR.DAL.DomainModels;
using PARR.DAL.Services.Interfaces; using PARR.DAL.Services.Interfaces;
using PARR.Domain.Enums;
using System.Text.Json; using System.Text.Json;
namespace PARR.DAL.NextRunServices.Subservices namespace PARR.DAL.NextRunServices.Subservices

View File

@@ -23,5 +23,11 @@
<ProjectReference Include="..\PARR.BLL\PARR.BLL.csproj" /> <ProjectReference Include="..\PARR.BLL\PARR.BLL.csproj" />
<ProjectReference Include="..\PARR.Common\PARR.Common.csproj" /> <ProjectReference Include="..\PARR.Common\PARR.Common.csproj" />
<ProjectReference Include="..\PARR.Constants\PARR.Constants.csproj" /> <ProjectReference Include="..\PARR.Constants\PARR.Constants.csproj" />
<ProjectReference Include="..\PARR.Core\PARR.Core.csproj" />
<ProjectReference Include="..\PARR.Domain\PARR.Domain.csproj" />
</ItemGroup>
<ItemGroup>
<Folder Include="Repositories\Base\" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@@ -33,6 +33,11 @@ namespace PARR.DAL
{ {
public static class ParrDalInstaller public static class ParrDalInstaller
{ {
// TODO: Переименовать InstallDalServices -> DependencyInjection
// TODO: Переименовать InstallDalServices -> AddDalServices
// TODO: Избавиться от лишнего
/// <summary> /// <summary>
/// Устанавливает Dal сервисы (1) /// Устанавливает Dal сервисы (1)
/// </summary> /// </summary>

View File

@@ -1,17 +1,17 @@
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.ChangeTracking; using Microsoft.EntityFrameworkCore.ChangeTracking;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using PARR.Common.Domain;
using PARR.DAL.Context; using PARR.DAL.Context;
using PARR.DAL.DomainModels; using PARR.DAL.DomainModels;
using PARR.DAL.Models.Base;
using PARR.DAL.Models.Base.History.Base;
using PARR.DAL.Services.Interfaces.Base; using PARR.DAL.Services.Interfaces.Base;
using PARR.Domain.Entities.Base;
using PARR.Domain.Entities.Base.History;
using PARR.Domain.Entities.Base.History.Base;
using System.Reflection; using System.Reflection;
namespace PARR.DAL.Services.Abstracts namespace PARR.DAL.Services.Abstracts
{ {
internal abstract class BaseService<T> : IBaseService<T> where T : class, IBase internal abstract class BaseService<T> : IBaseService<T> where T : class, IBaseEntity
{ {
private readonly ILogger<BaseService<T>> logger; private readonly ILogger<BaseService<T>> logger;
@@ -118,10 +118,10 @@ namespace PARR.DAL.Services.Abstracts
/// <param name="obj"></param> /// <param name="obj"></param>
private void DateModifiedResolver(EntityEntry obj) private void DateModifiedResolver(EntityEntry obj)
{ {
if (obj.Entity is IBaseDateModified) if (obj.Entity is IBaseEntityDateModified)
{ {
logger.LogDebug("Обновляю DateModified для сущности типа {EntityType}", obj.Entity.GetType().Name); logger.LogDebug("Обновляю DateModified для сущности типа {EntityType}", obj.Entity.GetType().Name);
(obj.Entity as IBaseDateModified)!.DateModified = DateTimeOffset.UtcNow; (obj.Entity as IBaseEntityDateModified)!.DateModified = DateTimeOffset.UtcNow;
} }
} }
@@ -168,7 +168,7 @@ namespace PARR.DAL.Services.Abstracts
FillHistoryProp(ref historyInstance, nameof(IHistoryTable.DateAddedToHistory), DateTimeOffset.UtcNow); FillHistoryProp(ref historyInstance, nameof(IHistoryTable.DateAddedToHistory), DateTimeOffset.UtcNow);
// Заполняем Id // Заполняем Id
FillHistoryProp(ref historyInstance, nameof(IBase.Id), Guid.NewGuid()); FillHistoryProp(ref historyInstance, nameof(IBaseEntity.Id), Guid.NewGuid());
try try
{ {
@@ -202,7 +202,7 @@ namespace PARR.DAL.Services.Abstracts
return; return;
//Смотрим, если это Id, записываем его в ParentId //Смотрим, если это Id, записываем его в ParentId
var histPropName = prop.Name == nameof(IBase.Id) ? nameof(IHistoryTable.ParentId) : prop.Name; var histPropName = prop.Name == nameof(IBaseEntity.Id) ? nameof(IHistoryTable.ParentId) : prop.Name;
var histProp = historyInstance.GetType().GetProperty(histPropName); var histProp = historyInstance.GetType().GetProperty(histPropName);
if (histProp == null) continue; if (histProp == null) continue;

View File

@@ -2,10 +2,10 @@
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using PARR.Constants; using PARR.Constants;
using PARR.DAL.Context; using PARR.DAL.Context;
using PARR.DAL.Contracts;
using PARR.DAL.Models; using PARR.DAL.Models;
using PARR.DAL.Services.Abstracts; using PARR.DAL.Services.Abstracts;
using PARR.DAL.Services.Interfaces; using PARR.DAL.Services.Interfaces;
using PARR.Domain.Enums;
namespace PARR.DAL.Services.Implementations namespace PARR.DAL.Services.Implementations
{ {

View File

@@ -1,9 +1,9 @@
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using PARR.DAL.Context; using PARR.DAL.Context;
using PARR.DAL.Models.TaskModels;
using PARR.DAL.Services.Abstracts; using PARR.DAL.Services.Abstracts;
using PARR.DAL.Services.Interfaces.TaskServices; using PARR.DAL.Services.Interfaces.TaskServices;
using PARR.Domain.Entities.TaskEntities;
namespace PARR.DAL.Services.Implementations.TaskServices namespace PARR.DAL.Services.Implementations.TaskServices
{ {

View File

@@ -1,9 +1,9 @@
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using PARR.DAL.Context; using PARR.DAL.Context;
using PARR.DAL.Models.TaskModels;
using PARR.DAL.Services.Abstracts; using PARR.DAL.Services.Abstracts;
using PARR.DAL.Services.Interfaces.TaskServices; using PARR.DAL.Services.Interfaces.TaskServices;
using PARR.Domain.Entities.TaskEntities;
namespace PARR.DAL.Services.Implementations.TaskServices namespace PARR.DAL.Services.Implementations.TaskServices
{ {

View File

@@ -1,6 +1,6 @@
using PARR.DAL.Context; using PARR.DAL.Context;
using PARR.DAL.Models.TaskModels;
using PARR.DAL.Services.Interfaces.TaskServices; using PARR.DAL.Services.Interfaces.TaskServices;
using PARR.Domain.Entities.TaskEntities;
namespace PARR.DAL.Services.Implementations.TaskServices namespace PARR.DAL.Services.Implementations.TaskServices
{ {

View File

@@ -1,13 +1,13 @@
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using Npgsql; using Npgsql;
using PARR.Common.Domain;
using PARR.Constants; using PARR.Constants;
using PARR.DAL.Context; using PARR.DAL.Context;
using PARR.DAL.Contracts;
using PARR.DAL.Models; using PARR.DAL.Models;
using PARR.DAL.Services.Abstracts; using PARR.DAL.Services.Abstracts;
using PARR.DAL.Services.Interfaces; using PARR.DAL.Services.Interfaces;
using PARR.Domain.Entities.Base.History;
using PARR.Domain.Enums;
namespace PARR.DAL.Services.Implementations namespace PARR.DAL.Services.Implementations
{ {

View File

@@ -1,10 +1,10 @@
using PARR.Common.Domain; using PARR.DAL.DomainModels;
using PARR.DAL.DomainModels; using PARR.Domain.Entities.Base;
using PARR.DAL.Models.Base; using PARR.Domain.Entities.Base.History;
namespace PARR.DAL.Services.Interfaces.Base namespace PARR.DAL.Services.Interfaces.Base
{ {
public interface IBaseService<T> where T : class, IBase public interface IBaseService<T> where T : class, IBaseEntity
{ {
Task<T?> GetAsync(Guid id); Task<T?> GetAsync(Guid id);
IQueryable<T> Get(); IQueryable<T> Get();

View File

@@ -1,7 +1,7 @@
using PARR.Constants; using PARR.Constants;
using PARR.DAL.Contracts;
using PARR.DAL.Models; using PARR.DAL.Models;
using PARR.DAL.Services.Interfaces.Base; using PARR.DAL.Services.Interfaces.Base;
using PARR.Domain.Enums;
namespace PARR.DAL.Services.Interfaces namespace PARR.DAL.Services.Interfaces
{ {

Some files were not shown because too many files have changed in this diff Show More