feat: Из dal перенесены все модели в Domain. Из dal переименованы service в repository, вынесены в Core.

This commit is contained in:
Mikhail Trubnikov
2026-04-30 10:35:31 +10:00
parent f1ea69da1f
commit eb78dfd6a8
356 changed files with 1817 additions and 1985 deletions

View File

@@ -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<DistributeRequest>
{
public DistributeRequestValidator(IJobGroupService jobGroupService)
public DistributeRequestValidator(IJobGroupRepository jobGroupService)
{
RuleFor(t => t.JobGroupId).NotEmpty().MustAsync(async (entity, value, c) =>
{

View File

@@ -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<JobGroupRequest>
{
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)

View File

@@ -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<JobRequest>
{
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;

View File

@@ -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<SubprocessRequest>
{
private readonly IProcessService processService;
private readonly IProcessRepository processService;
private bool? isValid = null;
public SubprocessValidator(
IProcessService processService
IProcessRepository processService
)
{
this.processService = processService;

View File

@@ -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<TemplateActivatorRequest>
{
public TemplateActivatorRequestValidator(
ITemplateService templateService,
IJobService jobService,
IJobGroupService jobGroupService
ITemplateRepository templateService,
IJobRepository jobService,
IJobGroupRepository jobGroupService
)
{
RuleFor(t => t.EntityType).Must(type =>

View File

@@ -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<TnkRequest>
{
private readonly ISubprocessService subprocessService;
private readonly ISubprocessRepository subprocessService;
private bool? isValid = null;
public TnkRequestValidator(
ISubprocessService subprocessService
ISubprocessRepository subprocessService
)
{
this.subprocessService = subprocessService;

View File

@@ -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<WeekendRequest>
{
private readonly IWeekendDayService weekendDayService;
private readonly IWeekendDayRepository weekendDayService;
public WeekendRequestValidator(IWeekendDayService weekendDayService)
public WeekendRequestValidator(IWeekendDayRepository weekendDayService)
{
this.weekendDayService = weekendDayService;

View File

@@ -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<WorkRequest>
{
private readonly ITnkService tnkService;
private readonly ITnkRepository tnkService;
private bool? isValid = null;
public WorkRequestValidator(
ITnkService tnkService
ITnkRepository tnkService
//ITemplateMaskValidator templateMaskValidator
)
{