feat: Из dal перенесены все модели в Domain. Из dal переименованы service в repository, вынесены в Core.
This commit is contained in:
@@ -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) =>
|
||||
{
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 =>
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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
|
||||
)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user