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