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

@@ -0,0 +1,48 @@
using PARR.Core.Repositories.Base;
using PARR.Domain.Entities.Schedule;
namespace PARR.Core.Repositories.Interfaces.Schedule
{
public interface IEsppSchTypeConfigRepository : IBaseRepository<EsppSchTypeConfig>
{
/// <summary>
/// Формирует расписание в нормальном понятном виде из БД синхронно
/// </summary>
/// <param name="jobGroupId"></param>
/// <returns></returns>
EsppScheduleDto? GetEsppScheduleDto(Guid jobGroupId);
/// <summary>
/// Формирует расписание в нормальном понятном виде из БД асинхронно
/// </summary>
/// <param name="jobGroupId"></param>
/// <returns></returns>
Task<EsppScheduleDto?> GetEsppScheduleDtoAsync(Guid jobGroupId);
IQueryable<EsppSchTypeConfig> GetWithSchIncludes();
}
//todo: эти методы GetEsppScheduleDto, GetEsppScheduleDtoAsync должны быть в сервисе а не в репозитории. И модели тогда переедут в Domain или в Core
/// <summary>
/// Расписание ЕСПП в нормальном виде
/// </summary>
public class EsppScheduleDto
{
public required EsppSchTypeSchedule TypeSchedule { get; set; }
public required List<EsppScheduleValDto> Values { get; set; }
}
public class EsppScheduleValDto
{
public int Order { get; set; }
public required EsppSchType Type { get; set; }
public required EsppSchTypeValue Value { get; set; }
}
}

View File

@@ -0,0 +1,10 @@
using PARR.Domain.Entities.Schedule;
namespace PARR.Core.Repositories.Interfaces.Schedule
{
public interface IEsppSchTypeScheduleRepository
{
IQueryable<EsppSchTypeSchedule> Get();
Task<EsppSchTypeSchedule?> GetAsync(int id);
}
}

View File

@@ -0,0 +1,9 @@
using PARR.Core.Repositories.Base;
using PARR.Domain.Entities.Schedule;
namespace PARR.Core.Repositories.Interfaces.Schedule
{
public interface IEsppSchTypeValueRepository : IBaseRepository<EsppSchTypeValue>
{
}
}

View File

@@ -0,0 +1,9 @@
using PARR.Core.Repositories.Base;
using PARR.Domain.Entities.Schedule;
namespace PARR.Core.Repositories.Interfaces.Schedule
{
public interface IScheduleExcludeTypeCalendarRepository: IBaseRepository<ScheduleExcludeTypeCalendar>
{
}
}

View File

@@ -0,0 +1,9 @@
using PARR.Core.Repositories.Base;
using PARR.Domain.Entities.Schedule;
namespace PARR.Core.Repositories.Interfaces.Schedule
{
public interface IScheduleExcludeTypeRepository : IBaseRepository<ScheduleExcludeType>
{
}
}

View File

@@ -0,0 +1,24 @@
using PARR.Domain.Entities.Schedule;
namespace PARR.Core.Repositories.Interfaces.Schedule
{
public interface IScheduleResponseAreaTimeOffsetRepository
{
/// <summary>
/// Список всех значений
/// </summary>
IReadOnlyDictionary<string, ScheduleResponseAreaTimeOffset> GetAll { get; }
/// <summary>
/// Значение по умолчанию
/// </summary>
ScheduleResponseAreaTimeOffset GetDefault { get; }
/// <summary>
/// Получить значение по ЗО, если не найдет, то значение по умолчанию
/// </summary>
/// <param name="responseArea"></param>
/// <returns></returns>
ScheduleResponseAreaTimeOffset GetByResponseAreaOrDefault(string responseArea);
}
}