diff --git a/PARR.API/Contracts/V1/Requests/BaseRequests/TimeZoneOffsetClient.cs b/PARR.API/Contracts/V1/Requests/BaseRequests/TimeZoneOffsetClient.cs
index 386ed565..cead2206 100644
--- a/PARR.API/Contracts/V1/Requests/BaseRequests/TimeZoneOffsetClient.cs
+++ b/PARR.API/Contracts/V1/Requests/BaseRequests/TimeZoneOffsetClient.cs
@@ -1,10 +1,23 @@
-namespace PARR.API.Contracts.V1.Requests.BaseRequests
+using Microsoft.AspNetCore.Mvc.ModelBinding;
+
+namespace PARR.API.Contracts.V1.Requests.BaseRequests
{
///
/// Смещение таймзоны относительно клиента
///
public class TimeZoneOffsetClient
{
+ ///
+ /// Удалить TimeZoneOffsetHours и не использовать!!!!!! Использовать только в минутах TimeZoneOffsetMinutes
+ ///
public int TimeZoneOffsetHours { get; set; } = 0;
+
+ ///
+ /// Часовая зона клиента, в минутах
+ ///
+ public int TimeZoneOffsetMinutes { get; set; } = 0;
+
+ [BindNever]
+ public TimeSpan TimeZoneOffset => TimeSpan.FromMinutes(TimeZoneOffsetMinutes);
}
}
diff --git a/PARR.API/Contracts/V1/Requests/JobGroupRequest.cs b/PARR.API/Contracts/V1/Requests/JobGroupRequest.cs
index 9380f968..8f6b06ba 100644
--- a/PARR.API/Contracts/V1/Requests/JobGroupRequest.cs
+++ b/PARR.API/Contracts/V1/Requests/JobGroupRequest.cs
@@ -23,6 +23,8 @@
public DateTimeOffset ReferenceDate { get; set; }
+ public int? UserTimeZoneOffsetMinutes { get; set; }
+
///
/// Использовать таймзону рабочей группы ответственного за ЭК шаблона
///
diff --git a/PARR.API/Contracts/V1/Responses/JobGroupResponse.cs b/PARR.API/Contracts/V1/Responses/JobGroupResponse.cs
index 0935433e..50a3dd4c 100644
--- a/PARR.API/Contracts/V1/Responses/JobGroupResponse.cs
+++ b/PARR.API/Contracts/V1/Responses/JobGroupResponse.cs
@@ -18,6 +18,8 @@
public DateTimeOffset ReferenceDate { get; set; }
+ public int? UserTimeZoneOffsetMinutes { get; set; }
+
public bool IsWorkGroupTimezone { get; set; }
public required JobGroupTypeResponse GroupType { get; set; }
diff --git a/PARR.API/Contracts/V1/Responses/Statistics/StatTemplateDistributorResponse.cs b/PARR.API/Contracts/V1/Responses/Statistics/StatTemplateDistributorResponse.cs
index 7a090e07..61298176 100644
--- a/PARR.API/Contracts/V1/Responses/Statistics/StatTemplateDistributorResponse.cs
+++ b/PARR.API/Contracts/V1/Responses/Statistics/StatTemplateDistributorResponse.cs
@@ -29,7 +29,10 @@
public class StatDistributorItemResponse
{
- public string? WorkGroupName { get; set; }
+ ///
+ /// Наименование поля по которому группируется
+ ///
+ public string? GroupFieldName { get; set; }
public int AllCount => Statistics?.Sum(t => t.AllCount) ?? 0;
public int IsActivatedCount => Statistics?.Sum(t => t.IsActivatedCount) ?? 0;
@@ -47,15 +50,19 @@
public int IsActivatedCount { get; set; }
public int IsDeactivatedCount { get; set; }
public int TemplatesInWeekendCount => !IsWorkDay && Templates != null ? Templates.Count : 0;
- public List? Templates { get; set; }
+ public List? Templates { get; set; }
}
- public class StatTempleteDistribItem
+ public class StatTemplateDistribItem
{
+ ///
+ /// TemplateId
+ ///
+ public Guid Id { get; set; }
public required string Name { get; set; }
public DateTimeOffset NextRun { get; set; }
public bool IsActiveTemplate { get; set; }
public bool IsActiveSchedular { get; set; }
- public required ScheduleResponseAreaTimeOffsetResponse ResponseAreaOffset { get; set; }
+ //public required ScheduleResponseAreaTimeOffsetResponse ResponseAreaOffset { get; set; }
}
}
diff --git a/PARR.API/Contracts/V1/Responses/TemplateResponse.cs b/PARR.API/Contracts/V1/Responses/TemplateResponse.cs
index f7810309..3fd702f8 100644
--- a/PARR.API/Contracts/V1/Responses/TemplateResponse.cs
+++ b/PARR.API/Contracts/V1/Responses/TemplateResponse.cs
@@ -45,7 +45,7 @@
public bool IsAutoDistributionEnabled { get; set; }
- public ScheduleResponseAreaTimeOffsetResponse? ResponseAreaOffset { get; set; }
+ //public ScheduleResponseAreaTimeOffsetResponse? ResponseAreaOffset { get; set; }
}
diff --git a/PARR.API/Controllers/V1/JobGroupController.cs b/PARR.API/Controllers/V1/JobGroupController.cs
index a9608703..532fd288 100644
--- a/PARR.API/Controllers/V1/JobGroupController.cs
+++ b/PARR.API/Controllers/V1/JobGroupController.cs
@@ -39,7 +39,6 @@ namespace PARR.API.Controllers.V1
private readonly IEsppSchTypeConfigService esppConfigService;
private readonly IValidator validator;
private readonly IJobGroupTypeService jobGroupTypeService;
- private readonly SettingsFromDb settingsFromDb;
private readonly IMatchingStatusService matchingStatusService;
private readonly IScheduleResponseAreaTimeOffsetService scheduleResponseAreaTimeOffsetService;
@@ -52,7 +51,6 @@ namespace PARR.API.Controllers.V1
IEsppSchTypeConfigService esppConfigService,
IValidator validator,
IJobGroupTypeService jobGroupTypeService,
- SettingsFromDb settingsFromDb,
IMatchingStatusService matchingStatusService,
IScheduleResponseAreaTimeOffsetService scheduleResponseAreaTimeOffsetService
)
@@ -65,7 +63,6 @@ namespace PARR.API.Controllers.V1
this.esppConfigService = esppConfigService;
this.validator = validator;
this.jobGroupTypeService = jobGroupTypeService;
- this.settingsFromDb = settingsFromDb;
this.matchingStatusService = matchingStatusService;
this.scheduleResponseAreaTimeOffsetService = scheduleResponseAreaTimeOffsetService;
}
@@ -168,6 +165,7 @@ namespace PARR.API.Controllers.V1
Solution = request.Solution.Trim(),
TemplateDuration = request.TemplateDuration.Trim(),
ReferenceDate = request.ReferenceDate,
+ UserTimeZoneOffsetMinutes = request.UserTimeZoneOffsetMinutes,
ScheduleExcludeTypeId = request.ScheduleExcludeTypeId,
ScheduleExcludeTypeCalendarId = request.ScheduleExcludeTypeCalendarId,
IsAutoDistributionEnabled = request.IsAutoDistributionEnabled,
@@ -262,6 +260,7 @@ namespace PARR.API.Controllers.V1
orig.Solution = request.Solution.Trim();
orig.TemplateDuration = request.TemplateDuration.Trim();
orig.ReferenceDate = request.ReferenceDate;
+ orig.UserTimeZoneOffsetMinutes = request.UserTimeZoneOffsetMinutes;
orig.ScheduleExcludeTypeId = request.ScheduleExcludeTypeId;
orig.ScheduleExcludeTypeCalendarId = request.ScheduleExcludeTypeCalendarId;
orig.IsAutoDistributionEnabled = request.IsAutoDistributionEnabled;
diff --git a/PARR.API/Controllers/V1/RobotTaskController.cs b/PARR.API/Controllers/V1/RobotTaskController.cs
index b86a4e33..a2c54b19 100644
--- a/PARR.API/Controllers/V1/RobotTaskController.cs
+++ b/PARR.API/Controllers/V1/RobotTaskController.cs
@@ -31,7 +31,7 @@ namespace PARR.API.Controllers.V1
private readonly IClientService clientService;
private readonly IRobotHistoryService robotHistoryService;
private readonly IShortcodesService shortcodesService;
- private readonly INextRunService nextRunService;
+ private readonly INextRunServiceV2 nextRunService;
private readonly IScheduleResponseAreaTimeOffsetService scheduleResponseAreaTimeOffsetService;
public RobotTaskController(
@@ -43,7 +43,7 @@ namespace PARR.API.Controllers.V1
IClientService clientService,
IRobotHistoryService robotHistoryService,
IShortcodesService shortcodesService,
- INextRunService nextRunService,
+ INextRunServiceV2 nextRunService,
IScheduleResponseAreaTimeOffsetService scheduleResponseAreaTimeOffsetService
)
{
@@ -156,11 +156,6 @@ namespace PARR.API.Controllers.V1
// сортируем по NextRun, чтобы те у которых дата след срабатывания ближе к текущей, выполнились скорее
query = query.OrderBy(t => t.Template!.NextRun).ThenBy(t => t.Template!.IsActiveSchedule).ThenBy(t => t.Template.IsActiveTemplate);
- #region Так нельзя делать!!! Должно всегда сортироваться по NextRun и не важно какой тип у шаблона!!!
- // Сортируем сначала по StatusTypeId, т е те что used, будут первыми, потом сортируем по NextRun, чтобы ближайшие даты выполнились скорее
- //query = query.OrderBy(t => t.Template!.StatusTypeId).ThenBy(t => t.Template!.NextRun);
- #endregion
-
RobotConfiguration? task = null;
//ищем задание в ожидании, если нашли, выбираем его
@@ -213,20 +208,35 @@ namespace PARR.API.Controllers.V1
}
case RobotsEnum.ScheduleOrder:
{ // если был запрос на расписание, проверяем у него nextRun, lastRun, обновляем их
- await UpdateLastNextRunDate(task);
+ var resultUpdateNextRun = await UpdateNextRunAsync(task);
+ if (!resultUpdateNextRun)
+ {
+ logger.LogError("Ошибка при расчете NextRun для templateId: {templateId}", task.TemplateId);
+ return BadRequest(new Response(false, new List { new ErrorModel { Message = "Ошибка при расчете NextRun" } }));
+ }
//RobotTaskScheduleResponse
var robotTaskScheduleResponse = mapper.Map(task);
- robotTaskScheduleResponse.Timezone = GetTimezoneForTemplate(task.Template!);
+ robotTaskScheduleResponse.Timezone = settingsFromDb.EsppScheduleTimezone;
robotTaskScheduleResponse.WorkGroup = await shortcodesService.ApplyShortcodesAsync(robotTaskScheduleResponse.WorkGroup, task.Template!);
robotTaskScheduleResponse.ResponseArea = await shortcodesService.ApplyShortcodesAsync(robotTaskScheduleResponse.ResponseArea, task.Template!);
- var nextRunWithTimezone = nextRunService.GetNextRunWithTimezoneEsppAndResponseArea(task.Template!.NextRun, task.Template!.Job?.Group?.IsResponseAreaTimezone, robotTaskScheduleResponse.ResponseArea);
+ //var nextRunWithRobotTz = nextRunService.GetNextRunWithTimezoneEsppAndResponseArea(task.Template!.NextRun, task.Template!.Job?.Group?.IsResponseAreaTimezone, robotTaskScheduleResponse.ResponseArea);
+ //nextRun в часовой зоне УЗ Робота ЕСПП
+ var nextRunWithRobotTz = task.Template!.NextRun.Add(nextRunService.GetEsppAccountOffset());
- robotTaskScheduleResponse.NextStart = EsppScheduleHelpers.GetNextRun(nextRunWithTimezone);
- robotTaskScheduleResponse.GenerationTime = EsppScheduleHelpers.GetGenerationTime(nextRunWithTimezone);
+ //на всякий случай еще раз проверяем, что дата не устарела и отправляем задание
+ if (nextRunWithRobotTz < DateTimeOffset.UtcNow)
+ {
+ logger.LogError("Ошибка при расчете NextRun для templateId: {templateId}, итоговое значение для робота, меньше чем сейчас {nextRunWithRobotTz}<{now}",
+ task.TemplateId, nextRunWithRobotTz, DateTimeOffset.UtcNow);
+ return BadRequest(new Response(false, new List { new ErrorModel { Message = "Ошибка при расчете NextRun" } }));
+ }
+
+ robotTaskScheduleResponse.NextStart = EsppScheduleHelpers.GetNextRun(nextRunWithRobotTz);
+ robotTaskScheduleResponse.GenerationTime = EsppScheduleHelpers.GetGenerationTime(nextRunWithRobotTz);
return Ok(new Response(robotTaskScheduleResponse, true));
}
@@ -243,54 +253,36 @@ namespace PARR.API.Controllers.V1
///
///
///
- private async Task UpdateLastNextRunDate(RobotConfiguration task)
+ private async Task UpdateNextRunAsync(RobotConfiguration task)
{
var template = task.Template!;
- #region old
- // передаем LastRun, если его нет, то NextRun
- //var nextRun = await esppScheduleTransformService.GetNextDateAsync(task.Template!.ApplicationInWorkId, task.Template.ApplicationsInWork!.LastRun ?? task.Template.ApplicationsInWork.NextRun);
- // всегда считаем по nextRun
- //var nextRun = await esppScheduleTransformService.GetNextDateAsync(template.Job!.GroupId, template.NextRun);
- #endregion
-
//var nextRun = await esppScheduleTransformService.GetNextDateAsync(template.Job!.GroupId, template!.Job!.Group!.ReferenceDate);
var nextRun = await nextRunService.GetNextRunForTemplateAsync(template.Id, false);
+ if (!nextRun.HasValue)
+ {
+ logger.LogError("При обновлении nextRun для шаблона {templateId}, расчитанный nextRun=null, ошибка в расчетах.", template.Id);
+ return false;
+ }
+
+ if (nextRun.Value < DateTimeOffset.UtcNow)
+ {
+ logger.LogError("При обновлении nextRun для шаблона {templateId}, расчитанный nextRun
- /// Получить таймзону для шаблона
- ///
- ///
- ///
- ///
- private string GetTimezoneForTemplate(Template template)
- {
- if (template.Job?.Group?.IsResponseAreaTimezone != true)
- return scheduleResponseAreaTimeOffsetService.GetDefault.EsppValue;
-
- var responseArea = template.Unit?.BaseFields?.ResponseArea;
-
- if (string.IsNullOrEmpty(responseArea))
- {
- throw new InvalidOperationException(
- $"У шаблона Id={template.Id}, Name='{template.Name}' не задана ResponseArea в Unit.BaseFields, " +
- "но включена настройка 'использовать часовой пояс рабочей группы'.");
- }
-
- return scheduleResponseAreaTimeOffsetService.GetByResponseAreaOrDefault(responseArea).EsppValue;
- }
-
}
}
diff --git a/PARR.API/Controllers/V1/Statistics/StatTemplateDistributionController.cs b/PARR.API/Controllers/V1/Statistics/StatTemplateDistributionController.cs
index 862a196f..378843f8 100644
--- a/PARR.API/Controllers/V1/Statistics/StatTemplateDistributionController.cs
+++ b/PARR.API/Controllers/V1/Statistics/StatTemplateDistributionController.cs
@@ -29,7 +29,7 @@ namespace PARR.API.Controllers.V1.Statistics
private readonly IJobGroupService jobGroupService;
private readonly IMapper mapper;
private readonly IShortcodesService shortcodesService;
- private readonly INextRunService nextRunService;
+ private readonly INextRunServiceV2 nextRunService;
private readonly ILogger logger;
private readonly IScheduleResponseAreaTimeOffsetService scheduleResponseAreaTimeOffsetService;
@@ -38,7 +38,7 @@ namespace PARR.API.Controllers.V1.Statistics
IJobGroupService jobGroupService,
IMapper mapper,
IShortcodesService shortcodesService,
- INextRunService nextRunService,
+ INextRunServiceV2 nextRunService,
ILogger logger,
IScheduleResponseAreaTimeOffsetService scheduleResponseAreaTimeOffsetService
)
@@ -63,8 +63,6 @@ namespace PARR.API.Controllers.V1.Statistics
{
// eadc5498-dba6-4f10-9b4b-a1653e3c3e61
- //TODO: похоже что timeZoneQuery лишняя
-
var jobGroup = await jobGroupService.Get()
.Include(t => t.DistributionConfig)
.ThenInclude(t => t.DistributionPeriod)
@@ -95,65 +93,86 @@ namespace PARR.API.Controllers.V1.Statistics
ItemsList = null
}, true));
- var (dateStart, dateEnd) = GetStartEndPeriod(jobGroup, items.Max(t => t.Template.NextRun), timeZoneQuery.TimeZoneOffsetHours);
+
+ var (dateStart, dateEnd) = GetStartEndPeriod(jobGroup, items.Min(t => t.Template.NextRun), items.Max(t => t.Template.NextRun), timeZoneQuery.TimeZoneOffset);
// получаем список рабочих дней
// получет все дни, даже с выходными, чтоб видеть реальную картину
- var workDays = await nextRunService.GetWorkDaysAsync(dateStart, dateEnd, false, jobGroup.ReferenceDate);
+ var allDays = await nextRunService.GetWorkDaysAsync(dateStart, dateEnd, false);
// получить список выходных дней (показываем только если IsExcludeWeekends = true)
var weekends = jobGroup.DistributionConfig.IsExcludeWeekends
- ? await nextRunService.GetWeekendsAsync(dateStart, dateEnd, jobGroup.ReferenceDate)
+ ? await nextRunService.GetWeekendsAsync(dateStart, dateEnd)
: new HashSet();
+
var responseItemsList = new List();
if (jobGroup.DistributionConfig.IsGroupingByWorkGroup)
{
// тут группируем по рабочим группам
+ logger.LogDebug("Группируем по рабочим группам");
// Получаем список пар (WorkGroupName, Template)
- var templatesWithWorkGroupNames = new List<(string WorkGroupName, (Template Template, string ResponseArea))>();
+ var templatesWithWorkGroupNames = new List<(string WorkGroupName, Template Template)>();
- // получаем названия рабочих групп и ЗО
+ // получаем названия рабочих групп
foreach (var item in items)
{
var workGroupName = await shortcodesService.ApplyShortcodesAsync(item.WorkGroupMask, item.Template);
- var responseArea = await shortcodesService.ApplyShortcodesAsync(item.ResponseAreaMask, item.Template);
- templatesWithWorkGroupNames.Add((workGroupName, (item.Template, responseArea)));
+ templatesWithWorkGroupNames.Add((workGroupName, item.Template));
}
// Группируем по WorkGroupName
var grouped = templatesWithWorkGroupNames
.GroupBy(x => x.WorkGroupName)
- .ToDictionary(g => g.Key, g => g.Select(x => x.Item2).ToList());
+ .ToDictionary(g => g.Key, g => g.Select(x => x.Template).ToList());
foreach (var groupedItem in grouped)
{
- var statResult = GetResponseByWorkGroup(groupedItem.Key, groupedItem.Value.ToList(), workDays, weekends, timeZoneQuery.TimeZoneOffsetHours, jobGroup.ReferenceDate);
+ var statResult = GetResponseByWorkGroup(groupedItem.Key, groupedItem.Value.ToList(), allDays, weekends, timeZoneQuery.TimeZoneOffset);
+ responseItemsList.Add(statResult);
+ }
+ }
+ else if (jobGroup.IsResponseAreaTimezone && !jobGroup.DistributionConfig.IsGroupingByWorkGroup)
+ {
+ // грппируем только по ЗО
+ logger.LogDebug("Группируем по ЗО");
+
+ // Будет группироваться по EsppValue, по MSK, MSK+1...
+ // получаем названия ЗО, из ЗО часовой пояс, формируем список шаблонов с часовым поясом ЗО
+ var templatesWithTimeZone = new List<(Template Template, string MskTimeZone)>();
+ foreach (var item in items)
+ {
+ var responseArea = await shortcodesService.ApplyShortcodesAsync(item.ResponseAreaMask, item.Template);
+ var mskTimeZone = scheduleResponseAreaTimeOffsetService.GetByResponseAreaOrDefault(responseArea);
+ templatesWithTimeZone.Add((item.Template, mskTimeZone.EsppValue));
+ }
+
+ // Группируем по часовому поясу
+ var grouped = templatesWithTimeZone
+ .GroupBy(x => x.MskTimeZone)
+ .ToDictionary(g => g.Key, g => g.Select(x => x.Template).ToList());
+
+ foreach (var groupedItem in grouped)
+ {
+ var statResult = GetResponseByWorkGroup(groupedItem.Key, groupedItem.Value.ToList(), allDays, weekends, timeZoneQuery.TimeZoneOffset);
responseItemsList.Add(statResult);
}
}
else
{
- // не нужно группировать по рабочим группам
-
- // получаем названия ЗО
- var templatesWithResponseArea = new List<(Template Template, string ResponseArea)>();
- foreach (var item in items)
- {
- var responseArea = await shortcodesService.ApplyShortcodesAsync(item.ResponseAreaMask, item.Template);
- templatesWithResponseArea.Add((item.Template, responseArea));
- }
+ // не нужно группировать
+ logger.LogDebug("Без группировки");
// сразу формируем response
- responseItemsList.Add(GetResponseByWorkGroup(null, templatesWithResponseArea, workDays, weekends, timeZoneQuery.TimeZoneOffsetHours, jobGroup.ReferenceDate));
+ responseItemsList.Add(GetResponseByWorkGroup(null, items.Select(t => t.Template).ToList(), allDays, weekends, timeZoneQuery.TimeZoneOffset));
}
var response = new StatTemplateDistributorResponse
{
JobGroup = mapper.Map(jobGroup),
- ItemsList = responseItemsList.OrderBy(t => t.WorkGroupName).ToList()
+ ItemsList = responseItemsList.OrderBy(t => t.GroupFieldName).ToList()
};
return Ok(new Response(response, true));
@@ -163,29 +182,33 @@ namespace PARR.API.Controllers.V1.Statistics
/// Получить дату начала и конца периода
///
///
+ ///
///
- ///
+ ///
///
- private (DateOnly dateStart, DateOnly dateEnd) GetStartEndPeriod(JobGroup jobGroup, DateTimeOffset maxNextRunTemplate, int timeZoneOffsetHours)
+ private (DateOnly dateStart, DateOnly dateEnd) GetStartEndPeriod(JobGroup jobGroup, DateTimeOffset minNextRunTemplate, DateTimeOffset maxNextRunTemplate, TimeSpan clientOffset)
{
var durationDays = nextRunService.GetDurationDays(jobGroup.DistributionConfig!);
- var dateStart = DateOnly.FromDateTime(DateTime.UtcNow.AddHours(timeZoneOffsetHours));
+ var dateStart = DateOnly.FromDateTime(DateTime.UtcNow.Add(clientOffset));
// последний день, не может быть меньше чем durationDays
var dateEnd = dateStart.AddDays(durationDays);
// последний день, не может быть меньше чем refDate+durationDays
- var sumRefDuration = DateOnly.FromDateTime(jobGroup.ReferenceDate.AddHours(timeZoneOffsetHours).AddDays(durationDays).Date);
+ var sumRefDuration = DateOnly.FromDateTime(jobGroup.ReferenceDate.Add(clientOffset).AddDays(durationDays).Date);
if (dateEnd < sumRefDuration)
dateEnd = sumRefDuration;
- // с DateEnd вообще какая-то шурпатня :(
- // как наглядно понять ок не ок распределяется, если на каком-то графике dateEnd может ухеать за период распределения
// последний день, не может быть меньше чем дата последнего шаблона maxNextRunTemplate
- var lastTempalteDate = DateOnly.FromDateTime(maxNextRunTemplate.AddHours(timeZoneOffsetHours).Date);
- if (dateEnd < lastTempalteDate)
- dateEnd = lastTempalteDate;
+ var lastTemplateDate = DateOnly.FromDateTime(maxNextRunTemplate.Add(clientOffset).Date);
+ if (dateEnd < lastTemplateDate)
+ dateEnd = lastTemplateDate;
+
+ // Дата начала, не может быть меньше чем minNextRunTemplate
+ var minNextRunDate = DateOnly.FromDateTime(minNextRunTemplate.Add(clientOffset).Date);
+ if (dateStart > minNextRunDate)
+ dateStart = minNextRunDate;
return (dateStart, dateEnd);
}
@@ -193,49 +216,49 @@ namespace PARR.API.Controllers.V1.Statistics
///
/// Заполнить респонс
///
- ///
+ ///
///
- ///
- ///
+ ///
+ ///
+ ///
///
- private StatDistributorItemResponse GetResponseByWorkGroup(string? workGroupName, List<(Template Template, string ResponseArea)> templateList, List workDays, HashSet weekends, int timeZoneOffsetHours, DateTimeOffset referenceDate)
+ private StatDistributorItemResponse GetResponseByWorkGroup(string? groupFieldName, List templateList, List allDays, HashSet weekends, TimeSpan clientOffset)
{
var result = new StatDistributorItemResponse
{
- WorkGroupName = workGroupName,
- Statistics = workDays.OrderBy(t => t).Select(t => new StatTemplateDistributorDateStat
+ GroupFieldName = groupFieldName,
+ Statistics = allDays.OrderBy(t => t).Select(t => new StatTemplateDistributorDateStat
{
AllCount = 0,
- Date = new DateTimeOffset(t.Year, t.Month, t.Day, referenceDate.Hour, referenceDate.Minute, referenceDate.Second, referenceDate.Offset),
+ // вычтем clientOffset, чтоб когда на клиенте он прибавился обратно, дата стала верной для клиента
+ Date = new DateTimeOffset(t.Year, t.Month, t.Day, 0, 0, 0, TimeSpan.Zero).Add(-clientOffset),
IsWorkDay = !weekends.Contains(t),
IsActivatedCount = 0,
IsDeactivatedCount = 0,
- Templates = new List()
+ Templates = new List()
}).ToList()
};
- //foreach (var templatesFromDate in templates.GroupBy(t => DateOnly.FromDateTime(t.NextRun.Date)))
- // смещаем по часовой зоне и группируем по дате
- //foreach (var templatesFromDate in templates.GroupBy(t => DateOnly.FromDateTime(t.NextRun.AddHours(timeZoneOffsetHours).Date)))
- foreach (var templatesFromDate in templateList.GroupBy(t => DateOnly.FromDateTime(t.Template.NextRun.AddHours(timeZoneOffsetHours).Date)))
+ // смещаем по часовой зоне клиента и группируем по дате
+ foreach (var templatesFromDate in templateList.GroupBy(t => DateOnly.FromDateTime(t.NextRun.Add(clientOffset).Date)))
{
- var statisticsForDate = result.Statistics.FirstOrDefault(t => DateOnly.FromDateTime(t.Date.AddHours(timeZoneOffsetHours).Date) == templatesFromDate.Key);
+ var statisticsForDate = result.Statistics.FirstOrDefault(t => DateOnly.FromDateTime(t.Date.Add(clientOffset).Date) == templatesFromDate.Key);
if (statisticsForDate == null)
{
- logger.LogWarning("В списке рабочих дней, нет дня для шаблонов {count} шт. выполняющихся в {date}", templatesFromDate.Count(), templatesFromDate.Key);
+ logger.LogWarning("В списке дней, нет дня для шаблонов {count} шт. выполняющихся в {date}", templatesFromDate.Count(), templatesFromDate.Key);
continue;
}
statisticsForDate.AllCount = templatesFromDate.Count();
- statisticsForDate.IsDeactivatedCount = templatesFromDate.Count(t => !t.Template.IsActiveTemplate || !t.Template.IsActiveSchedule);
- statisticsForDate.IsActivatedCount = templatesFromDate.Count(t => t.Template.IsActiveTemplate && t.Template.IsActiveSchedule);
- statisticsForDate.Templates = templatesFromDate.Select(t => new StatTempleteDistribItem
+ statisticsForDate.IsDeactivatedCount = templatesFromDate.Count(t => !t.IsActiveTemplate || !t.IsActiveSchedule);
+ statisticsForDate.IsActivatedCount = templatesFromDate.Count(t => t.IsActiveTemplate && t.IsActiveSchedule);
+ statisticsForDate.Templates = templatesFromDate.Select(t => new StatTemplateDistribItem
{
- Name = t.Template.Name,
- IsActiveSchedular = t.Template.IsActiveSchedule,
- IsActiveTemplate = t.Template.IsActiveTemplate,
- NextRun = t.Template.NextRun,
- ResponseAreaOffset = mapper.Map(scheduleResponseAreaTimeOffsetService.GetByResponseAreaOrDefault(t.ResponseArea))
+ Id = t.Id,
+ Name = t.Name,
+ IsActiveSchedular = t.IsActiveSchedule,
+ IsActiveTemplate = t.IsActiveTemplate,
+ NextRun = t.NextRun
})
.OrderBy(t => t.Name)
.ToList();
diff --git a/PARR.API/Controllers/V1/TemplateController.cs b/PARR.API/Controllers/V1/TemplateController.cs
index af348e92..bdc1a240 100644
--- a/PARR.API/Controllers/V1/TemplateController.cs
+++ b/PARR.API/Controllers/V1/TemplateController.cs
@@ -17,7 +17,6 @@ using PARR.DAL.Contracts;
using PARR.DAL.DomainModels;
using PARR.DAL.DomainServices.Shortcodes;
using PARR.DAL.Models;
-using PARR.DAL.NextRunServices;
using PARR.DAL.Services.Interfaces;
using PARR.DAL.Services.Interfaces.Schedule;
@@ -36,7 +35,6 @@ namespace PARR.API.Controllers.V1
private readonly ILogger logger;
private readonly IShortcodesService shortcodesService;
private readonly IOrderService orderService;
- private readonly INextRunService nextRunService;
private readonly SettingsFromDb settingsFromDb;
private readonly IScheduleResponseAreaTimeOffsetService scheduleResponseAreaTimeOffsetService;
@@ -48,7 +46,6 @@ namespace PARR.API.Controllers.V1
ILogger logger,
IShortcodesService shortcodesService,
IOrderService orderService,
- INextRunService nextRunService,
SettingsFromDb settingsFromDb,
IScheduleResponseAreaTimeOffsetService scheduleResponseAreaTimeOffsetService
)
@@ -60,7 +57,6 @@ namespace PARR.API.Controllers.V1
this.logger = logger;
this.shortcodesService = shortcodesService;
this.orderService = orderService;
- this.nextRunService = nextRunService;
this.settingsFromDb = settingsFromDb;
this.scheduleResponseAreaTimeOffsetService = scheduleResponseAreaTimeOffsetService;
}
@@ -138,7 +134,7 @@ namespace PARR.API.Controllers.V1
{
//await ApplyTemplateShortcodesAsync(responseItem, templates.First(t => t.Id == responseItem.Id));
await ApplyTemplateShortcodesAsync(responseItem, templatesDict[responseItem.Id]);
- FillResponseAreaOffset(responseItem);
+ //FillResponseAreaOffset(responseItem);
}
//logger.LogDebug("Получение шорткодов: {ElapsedMs} мс", sw.ElapsedMilliseconds);
//sw.Stop();
@@ -183,7 +179,7 @@ namespace PARR.API.Controllers.V1
var response = mapper.Map(template);
await ApplyTemplateShortcodesAsync(response, template);
- FillResponseAreaOffset(response);
+ //FillResponseAreaOffset(response);
var ordersCountResult = await GetOrdersCountAsync(new List { response.Id });
response.OrderCount = ordersCountResult.Count > 0 ? ordersCountResult.First().Value : 0;
@@ -277,7 +273,7 @@ namespace PARR.API.Controllers.V1
var response = mapper.Map(templateToResponse);
await ApplyTemplateShortcodesAsync(response, templateToResponse);
- FillResponseAreaOffset(response);
+ //FillResponseAreaOffset(response);
var ordersCountResult = await GetOrdersCountAsync(new List { response.Id });
response.OrderCount = ordersCountResult.Count > 0 ? ordersCountResult.First().Value : 0;
@@ -323,36 +319,36 @@ namespace PARR.API.Controllers.V1
}
- ///
- /// Заполнить ResponseAreaOffset
- ///
- ///
- private void FillResponseAreaOffset(TemplateBaseResponse response)
- {
- // если стоит галка IsResponseAreaTimezone и есть ЗО, то возвращаем оффсет
- if (response.IsResponseAreaTimezone && !string.IsNullOrEmpty(response.ResponseArea))
- {
- var responseArea = response.ResponseArea;
- response.ResponseAreaOffset = mapper.Map(scheduleResponseAreaTimeOffsetService.GetByResponseAreaOrDefault(responseArea));
- }
- else
- {
- response.ResponseAreaOffset = null;
- }
+ /////
+ ///// Заполнить ResponseAreaOffset
+ /////
+ /////
+ //private void FillResponseAreaOffset(TemplateBaseResponse response)
+ //{
+ // // если стоит галка IsResponseAreaTimezone и есть ЗО, то возвращаем оффсет
+ // if (response.IsResponseAreaTimezone && !string.IsNullOrEmpty(response.ResponseArea))
+ // {
+ // var responseArea = response.ResponseArea;
+ // response.ResponseAreaOffset = mapper.Map(scheduleResponseAreaTimeOffsetService.GetByResponseAreaOrDefault(responseArea));
+ // }
+ // else
+ // {
+ // response.ResponseAreaOffset = null;
+ // }
- //var responseArea = response.IsResponseAreaTimezone && !string.IsNullOrEmpty(response.ResponseArea)
- // ? response.ResponseArea
- // : settingsFromDb.DefaultResponseAreaToTimeOffset;
+ // //var responseArea = response.IsResponseAreaTimezone && !string.IsNullOrEmpty(response.ResponseArea)
+ // // ? response.ResponseArea
+ // // : settingsFromDb.DefaultResponseAreaToTimeOffset;
- //response.NextRunResponseAreaInLocal = response.IsResponseAreaTimezone && !string.IsNullOrEmpty(response.ResponseArea)
- // ? nextRunService.GetNextRunWithResponseAreaOffset(response.NextRun, response.ResponseArea)
- // // возвращаем в дефолтной зоне
- // : nextRunService.GetNextRunWithResponseAreaOffset(response.NextRun, settingsFromDb.DefaultResponseAreaToTimeOffset);
+ // //response.NextRunResponseAreaInLocal = response.IsResponseAreaTimezone && !string.IsNullOrEmpty(response.ResponseArea)
+ // // ? nextRunService.GetNextRunWithResponseAreaOffset(response.NextRun, response.ResponseArea)
+ // // // возвращаем в дефолтной зоне
+ // // : nextRunService.GetNextRunWithResponseAreaOffset(response.NextRun, settingsFromDb.DefaultResponseAreaToTimeOffset);
- //response.NextRunResponseAreaInLocal = nextRunService.GetNextRunWithResponseAreaOffset(response.NextRun, responseArea);
+ // //response.NextRunResponseAreaInLocal = nextRunService.GetNextRunWithResponseAreaOffset(response.NextRun, responseArea);
- //response.ResponseAreaOffset = mapper.Map(scheduleResponseAreaTimeOffsetService.GetByResponseAreaOrDefault(responseArea));
- }
+ // //response.ResponseAreaOffset = mapper.Map(scheduleResponseAreaTimeOffsetService.GetByResponseAreaOrDefault(responseArea));
+ //}
}
}
diff --git a/PARR.API/Validators/JobGroupValidator.cs b/PARR.API/Validators/JobGroupValidator.cs
index 1823937c..7e5afb1d 100644
--- a/PARR.API/Validators/JobGroupValidator.cs
+++ b/PARR.API/Validators/JobGroupValidator.cs
@@ -1,5 +1,6 @@
using FluentValidation;
using Microsoft.EntityFrameworkCore;
+using Newtonsoft.Json.Linq;
using PARR.API.Contracts.V1.Requests;
using PARR.DAL.Contracts;
using PARR.DAL.Services.Interfaces;
@@ -123,6 +124,14 @@ namespace PARR.API.Validators
return true;
}).WithMessage("Некорректное значение периода распределения");
+ RuleFor(t => t.UserTimeZoneOffsetMinutes)
+ .Must((entity, value, c) =>
+ {
+ // если IsResponseAreaTimezone == true, то поле UserTimeZoneOffsetMinutes обязательно.
+ // если IsResponseAreaTimezone == false, то UserTimeZoneOffsetMinutes должно быть null
+ return (entity.IsWorkGroupTimezone && value != null) || (!entity.IsWorkGroupTimezone && value == null);
+ }).WithMessage("Некорректное значение."); ;
+
}
}
}
diff --git a/PARR.DAL/Context/DataContext.cs b/PARR.DAL/Context/DataContext.cs
index 836b116f..3a90aeaf 100644
--- a/PARR.DAL/Context/DataContext.cs
+++ b/PARR.DAL/Context/DataContext.cs
@@ -189,7 +189,7 @@ namespace PARR.DAL.Context
new { Name = nameof(SettingsFromDb.TemplatePrefixName), Description = "Префикс имени шаблона в ЕСПП", Value = "%PREFIX%-ЭИТИ-ПТК-ПАРР" },
new { Name = nameof(SettingsFromDb.RobotAttemptsNumber), Description = "Количество попыток выполнения задания роботом", Value = "3" },
new { Name = nameof(SettingsFromDb.RobotWaitTime), Description = "Время ожидания выполнения роботом задания", Value = "00:15:00" },
- //new { Name = nameof(SettingsFromDb.ScheduleTimezone), Description = "Расписание регламентной работы - В каком часовом поясе", Value = "MSK" },
+ new { Name = nameof(SettingsFromDb.EsppScheduleTimezone), Description = "Расписание регламентной работы - В каком часовом поясе", Value = "MSK" },
//new { Name = nameof(SettingsFromDb.ScheduleExcludeType), Description = "Расписание регламентной работы - Тип исключения", Value = "Выполнить ТОЛЬКО В указанном календаре" },
//new { Name = nameof(SettingsFromDb.ScheduleExcludeCalendar), Description = "Расписание регламентной работы - Календарь", Value = "8x5 (8.00-17.00)" },
new { Name = nameof(SettingsFromDb.ScheduleRepeatRange), Description = "Расписание регламентной работы - Диапазн повторов", Value = "Отсутствует дата завершения" },
diff --git a/PARR.DAL/Contracts/SettingsFromDb.cs b/PARR.DAL/Contracts/SettingsFromDb.cs
index e8416866..178b0502 100644
--- a/PARR.DAL/Contracts/SettingsFromDb.cs
+++ b/PARR.DAL/Contracts/SettingsFromDb.cs
@@ -76,6 +76,21 @@ namespace PARR.DAL.Contracts
///
public TimeSpan RobotWaitTime { get; set; }
+ ///
+ /// Расписание регламентной работы, В каком часовом поясе
+ ///
+ public string EsppScheduleTimezone { get; set; } = string.Empty;
+
+ /////
+ ///// Расписание регламентной работы - Тип исключения
+ /////
+ //public string ScheduleExcludeType { get; set; } = string.Empty;
+
+ /////
+ ///// Расписание регламентной работы - Календарь
+ /////
+ //public string ScheduleExcludeCalendar { get; set; } = string.Empty;
+
///
/// Расписание регламентной работы - Диапазон повторов
///
diff --git a/PARR.DAL/Migrations/20260209010657_tblJobGroupAddUserTimeZoneOffsetMinutes.Designer.cs b/PARR.DAL/Migrations/20260209010657_tblJobGroupAddUserTimeZoneOffsetMinutes.Designer.cs
new file mode 100644
index 00000000..9bc07bf9
--- /dev/null
+++ b/PARR.DAL/Migrations/20260209010657_tblJobGroupAddUserTimeZoneOffsetMinutes.Designer.cs
@@ -0,0 +1,4148 @@
+//
+using System;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
+using PARR.DAL.Context;
+
+#nullable disable
+
+namespace PARR.DAL.Migrations
+{
+ [DbContext(typeof(DataContext))]
+ [Migration("20260209010657_tblJobGroupAddUserTimeZoneOffsetMinutes")]
+ partial class tblJobGroupAddUserTimeZoneOffsetMinutes
+ {
+ ///
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("ProductVersion", "7.0.5")
+ .HasAnnotation("Relational:MaxIdentifierLength", 63);
+
+ NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
+
+ modelBuilder.Entity("PARR.DAL.Models.AgentHistory", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uuid");
+
+ b.Property("DateCreated")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("HistoryLevelId")
+ .HasColumnType("integer");
+
+ b.Property("Message")
+ .HasColumnType("text");
+
+ b.Property("OrderId")
+ .HasColumnType("uuid");
+
+ b.Property("TemplateId")
+ .HasColumnType("uuid");
+
+ b.HasKey("Id");
+
+ b.HasIndex("HistoryLevelId");
+
+ b.HasIndex("OrderId");
+
+ b.HasIndex("TemplateId");
+
+ b.ToTable("AgentHistories");
+ });
+
+ modelBuilder.Entity("PARR.DAL.Models.AgentHistoryLevel", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("Description")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.HasKey("Id");
+
+ b.ToTable("AgentHistoryLevels");
+
+ b.HasData(
+ new
+ {
+ Id = 1,
+ Description = "Агент начал выполнять задание",
+ Name = "Start"
+ },
+ new
+ {
+ Id = 5,
+ Description = "Агент завершил выполнение задания",
+ Name = "End"
+ });
+ });
+
+ modelBuilder.Entity("PARR.DAL.Models.AppInWorkInWorkGroup", b =>
+ {
+ b.Property("ApplicationsInWorkId")
+ .HasColumnType("uuid");
+
+ b.Property("WorkGroupId")
+ .HasColumnType("uuid");
+
+ b.HasKey("ApplicationsInWorkId", "WorkGroupId");
+
+ b.HasIndex("WorkGroupId");
+
+ b.ToTable("AppInWorkInWorkGroups");
+ });
+
+ modelBuilder.Entity("PARR.DAL.Models.Application", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uuid");
+
+ b.Property("ApplicationTypeId")
+ .HasColumnType("uuid");
+
+ b.Property("DateCreated")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("DateModified")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.HasKey("Id");
+
+ b.HasIndex("ApplicationTypeId");
+
+ b.HasIndex("Name", "ApplicationTypeId")
+ .IsUnique();
+
+ b.ToTable("Applications");
+ });
+
+ modelBuilder.Entity("PARR.DAL.Models.ApplicationInHost", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uuid");
+
+ b.Property("ApplicationId")
+ .HasColumnType("uuid");
+
+ b.Property("DateCreated")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("DateModified")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("HostId")
+ .HasColumnType("uuid");
+
+ b.HasKey("Id");
+
+ b.HasIndex("ApplicationId");
+
+ b.HasIndex("HostId");
+
+ b.ToTable("ApplicationsInHost");
+ });
+
+ modelBuilder.Entity("PARR.DAL.Models.ApplicationType", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uuid");
+
+ b.Property("DateCreated")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("DateModified")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("Description")
+ .HasColumnType("text");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.HasKey("Id");
+
+ b.ToTable("ApplicationTypes");
+
+ b.HasData(
+ new
+ {
+ Id = new Guid("32c28386-6f13-4f7b-8508-be165b7fabdb"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ Description = "Сервер приложений",
+ Name = "APP"
+ },
+ new
+ {
+ Id = new Guid("7848a96c-cdee-48c1-a786-de9cb889723a"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ Description = "ОС",
+ Name = "OS"
+ },
+ new
+ {
+ Id = new Guid("aae2636f-b93a-42dc-873e-0764a90a0a40"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ Description = "СУБД",
+ Name = "DB"
+ },
+ new
+ {
+ Id = new Guid("749f4c34-b883-4f28-90dd-c161dd3c4270"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ Description = "ЦК БС",
+ Name = "CKBS"
+ },
+ new
+ {
+ Id = new Guid("0bd96f9b-d36b-4dfb-bd8a-9c356bc6912b"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ Description = "ИБ",
+ Name = "IB"
+ },
+ new
+ {
+ Id = new Guid("4466148b-510d-4423-a58f-ce878152ff01"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ Description = "Инфраструктура",
+ Name = "SI"
+ },
+ new
+ {
+ Id = new Guid("725a96db-358e-489b-a7c9-a84b06ec15df"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ Description = "Мониторинг",
+ Name = "SM"
+ });
+ });
+
+ modelBuilder.Entity("PARR.DAL.Models.ApplicationsInWork", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uuid");
+
+ b.Property("AgentName")
+ .HasColumnType("text");
+
+ b.Property("AgentScript")
+ .HasColumnType("text");
+
+ b.Property("AgentTimeOutSec")
+ .HasColumnType("integer");
+
+ b.Property("ApplicationId")
+ .HasColumnType("uuid");
+
+ b.Property("DateCreated")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("DateModified")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("FullDescription")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("IsAgent")
+ .HasColumnType("boolean");
+
+ b.Property("IsAutoDistributionEnabled")
+ .HasColumnType("boolean");
+
+ b.Property("ReferenceDate")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("ShortDescription")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("Solution")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("TemplateDuration")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("WorkId")
+ .HasColumnType("uuid");
+
+ b.HasKey("Id");
+
+ b.HasIndex("ApplicationId");
+
+ b.HasIndex("WorkId", "ApplicationId")
+ .IsUnique();
+
+ b.ToTable("ApplicationsInWorks");
+ });
+
+ modelBuilder.Entity("PARR.DAL.Models.DistributionPeriod", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uuid");
+
+ b.Property("Duration")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("Type")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.HasKey("Id");
+
+ b.HasIndex("Type");
+
+ b.ToTable("DistributionPeriods", "schedule");
+
+ b.HasData(
+ new
+ {
+ Id = new Guid("9bd0bfa8-c316-480b-a001-e09ffe8c9340"),
+ Duration = "7",
+ Name = "Еженедельно",
+ Type = "Day"
+ },
+ new
+ {
+ Id = new Guid("3a7341a8-085c-461c-babc-6b78dd5d2c67"),
+ Duration = "30",
+ Name = "Ежемесячно",
+ Type = "Day"
+ },
+ new
+ {
+ Id = new Guid("0ad2dfdb-3833-46d9-979a-c408b7eadc6c"),
+ Duration = "90",
+ Name = "Каждые 90 дней",
+ Type = "Day"
+ },
+ new
+ {
+ Id = new Guid("31dd3947-8471-4f09-852c-a4f075f1ba7f"),
+ Duration = "182",
+ Name = "Каждые пол года",
+ Type = "Day"
+ });
+ });
+
+ modelBuilder.Entity("PARR.DAL.Models.DistributionPeriodType", b =>
+ {
+ b.Property("Type")
+ .HasColumnType("text");
+
+ b.Property("Description")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.HasKey("Type");
+
+ b.ToTable("DistributionPeriodTypes", "schedule");
+
+ b.HasData(
+ new
+ {
+ Type = "Day",
+ Description = "День"
+ },
+ new
+ {
+ Type = "Month",
+ Description = "Месяц"
+ },
+ new
+ {
+ Type = "Year",
+ Description = "Год"
+ });
+ });
+
+ modelBuilder.Entity("PARR.DAL.Models.EkStatus", b =>
+ {
+ b.Property("Code")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Code"));
+
+ b.Property("Name")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.HasKey("Code");
+
+ b.ToTable("EkStatuses");
+
+ b.HasData(
+ new
+ {
+ Code = 1,
+ Name = "1-Новый"
+ },
+ new
+ {
+ Code = 2,
+ Name = "2-Подготовка к эксплуатации"
+ },
+ new
+ {
+ Code = 3,
+ Name = "3-В эксплуатации"
+ },
+ new
+ {
+ Code = 4,
+ Name = "4-В ремонте"
+ },
+ new
+ {
+ Code = 5,
+ Name = "5-В резерве"
+ },
+ new
+ {
+ Code = 6,
+ Name = "6-Выведен из эксплуатации"
+ },
+ new
+ {
+ Code = 7,
+ Name = "7-Тестовый"
+ },
+ new
+ {
+ Code = 9,
+ Name = "9-В разработке"
+ });
+ });
+
+ modelBuilder.Entity("PARR.DAL.Models.EsppSchType", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("Description")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.HasKey("Id");
+
+ b.ToTable("EsppSchTypes", "schedule");
+
+ b.HasData(
+ new
+ {
+ Id = 1,
+ Description = "Через интервал",
+ Name = "Interval"
+ },
+ new
+ {
+ Id = 2,
+ Description = "День недели: пнд, вт...",
+ Name = "DayOfWeek"
+ },
+ new
+ {
+ Id = 3,
+ Description = "Число месяца: 1,2,3,4",
+ Name = "DayOfMonth"
+ },
+ new
+ {
+ Id = 4,
+ Description = "Каждый: первый, второй, третий, четвертый, последний",
+ Name = "Order"
+ },
+ new
+ {
+ Id = 5,
+ Description = "Месяц: январь, февраль...",
+ Name = "Month"
+ },
+ new
+ {
+ Id = 6,
+ Description = "Месяц (родительный падеж): января, февраля...",
+ Name = "MonthGenitive"
+ });
+ });
+
+ modelBuilder.Entity("PARR.DAL.Models.EsppSchTypeConfig", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uuid");
+
+ b.Property("DateCreated")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("DateModified")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("Order")
+ .HasColumnType("integer");
+
+ b.Property("TypeId")
+ .HasColumnType("integer");
+
+ b.Property("TypeScheduleId")
+ .HasColumnType("integer");
+
+ b.HasKey("Id");
+
+ b.HasIndex("TypeId");
+
+ b.HasIndex("TypeScheduleId", "TypeId")
+ .IsUnique();
+
+ b.ToTable("EsppSchTypeConfigs", "schedule");
+
+ b.HasData(
+ new
+ {
+ Id = new Guid("d2693562-b3eb-41e9-97db-c6b5d2ef1bea"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ Order = 0,
+ TypeId = 1,
+ TypeScheduleId = 1
+ },
+ new
+ {
+ Id = new Guid("06b2e7aa-6927-4fbf-99fb-67c92a4fce8a"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ Order = 0,
+ TypeId = 2,
+ TypeScheduleId = 2
+ },
+ new
+ {
+ Id = new Guid("78079071-ff80-417e-9bb0-d928cec853e7"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ Order = 0,
+ TypeId = 3,
+ TypeScheduleId = 3
+ },
+ new
+ {
+ Id = new Guid("accb1d46-e1c1-4396-9182-4c0766155921"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ Order = 0,
+ TypeId = 4,
+ TypeScheduleId = 4
+ },
+ new
+ {
+ Id = new Guid("162ffe73-2428-4abe-8f83-235c2593664c"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ Order = 1,
+ TypeId = 2,
+ TypeScheduleId = 4
+ },
+ new
+ {
+ Id = new Guid("8470d1ef-165d-42fc-ab05-8203e4d263cf"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ Order = 0,
+ TypeId = 5,
+ TypeScheduleId = 5
+ },
+ new
+ {
+ Id = new Guid("006900b5-f65c-413e-bc67-09e6dae60b7c"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ Order = 1,
+ TypeId = 3,
+ TypeScheduleId = 5
+ },
+ new
+ {
+ Id = new Guid("85635bc8-f17a-46b8-9c15-8615761be3d9"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ Order = 0,
+ TypeId = 4,
+ TypeScheduleId = 6
+ },
+ new
+ {
+ Id = new Guid("439460c2-deca-4b54-80e7-2f20806696ec"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ Order = 1,
+ TypeId = 2,
+ TypeScheduleId = 6
+ },
+ new
+ {
+ Id = new Guid("5c63ad8c-e9b4-43fd-9d24-5c2eed80dadd"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ Order = 2,
+ TypeId = 6,
+ TypeScheduleId = 6
+ });
+ });
+
+ modelBuilder.Entity("PARR.DAL.Models.EsppSchTypeSchedule", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("Description")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.HasKey("Id");
+
+ b.ToTable("EsppSchTypeSchedules", "schedule");
+
+ b.HasData(
+ new
+ {
+ Id = 1,
+ Description = "Регулярно",
+ Name = "Regularly"
+ },
+ new
+ {
+ Id = 2,
+ Description = "Еженедельно",
+ Name = "Weekly"
+ },
+ new
+ {
+ Id = 3,
+ Description = "Ежемесячно",
+ Name = "Monthly"
+ },
+ new
+ {
+ Id = 4,
+ Description = "Ежемесячно-2",
+ Name = "Monthly2"
+ },
+ new
+ {
+ Id = 5,
+ Description = "Ежегодно",
+ Name = "Annually"
+ },
+ new
+ {
+ Id = 6,
+ Description = "Ежегодно-2",
+ Name = "Annually2"
+ });
+ });
+
+ modelBuilder.Entity("PARR.DAL.Models.EsppSchTypeValue", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uuid");
+
+ b.Property("DateCreated")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("EsppExportValue")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("Order")
+ .HasColumnType("integer");
+
+ b.Property("TypeId")
+ .HasColumnType("integer");
+
+ b.Property("Value")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.HasKey("Id");
+
+ b.HasIndex("TypeId");
+
+ b.ToTable("EsppSchTypeValues", "schedule");
+
+ b.HasData(
+ new
+ {
+ Id = new Guid("6e3b5dd2-b2f7-40bc-bace-15bfa6bbd4ff"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ EsppExportValue = "01:00:00",
+ Order = 0,
+ TypeId = 1,
+ Value = "Каждый час"
+ },
+ new
+ {
+ Id = new Guid("4df04834-f14f-43d9-8984-334f080f4107"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ EsppExportValue = "02:00:00",
+ Order = 1,
+ TypeId = 1,
+ Value = "Каждые 2 часа"
+ },
+ new
+ {
+ Id = new Guid("dab6e3f9-2385-4966-b77c-133ad233c592"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ EsppExportValue = "03:00:00",
+ Order = 2,
+ TypeId = 1,
+ Value = "Каждые 3 часа"
+ },
+ new
+ {
+ Id = new Guid("035f485d-8451-47df-bfaa-ba4dd36cf146"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ EsppExportValue = "04:00:00",
+ Order = 3,
+ TypeId = 1,
+ Value = "Каждые 4 часа"
+ },
+ new
+ {
+ Id = new Guid("d627daa7-3eed-4571-acae-ffbb3c5bedb9"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ EsppExportValue = "06:00:00",
+ Order = 4,
+ TypeId = 1,
+ Value = "Каждые 6 часов"
+ },
+ new
+ {
+ Id = new Guid("ae0a0015-0f1e-4496-b71e-6244f7e321e7"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ EsppExportValue = "12:00:00",
+ Order = 5,
+ TypeId = 1,
+ Value = "Каждые 12 часов"
+ },
+ new
+ {
+ Id = new Guid("8df097aa-9860-4a62-9675-a8eecd3f2ce7"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ EsppExportValue = "1 00:00:00",
+ Order = 6,
+ TypeId = 1,
+ Value = "Ежедневно"
+ },
+ new
+ {
+ Id = new Guid("dee32e60-c1a1-4206-98bc-aa03deabfdf6"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ EsppExportValue = "3 00:00:00",
+ Order = 7,
+ TypeId = 1,
+ Value = "Каждые 72 часа"
+ },
+ new
+ {
+ Id = new Guid("e0465fbf-e3a5-4486-9f53-5bb85c6feeca"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ EsppExportValue = "4 00:00:00",
+ Order = 8,
+ TypeId = 1,
+ Value = "Каждые 96 часов"
+ },
+ new
+ {
+ Id = new Guid("4e3f73d1-a0f3-4dd1-bca9-68ada0dd5ce2"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ EsppExportValue = "14 00:00:00",
+ Order = 9,
+ TypeId = 1,
+ Value = "Каждые 2 недели"
+ },
+ new
+ {
+ Id = new Guid("55833417-6a24-42f6-bcc2-5d032f883202"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ EsppExportValue = "60 00:00:00",
+ Order = 10,
+ TypeId = 1,
+ Value = "Каждые 60 дней"
+ },
+ new
+ {
+ Id = new Guid("7fefa052-29db-4ce5-9c57-2fd9ff855f21"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ EsppExportValue = "80 00:00:00",
+ Order = 11,
+ TypeId = 1,
+ Value = "Каждые 80 дней"
+ },
+ new
+ {
+ Id = new Guid("b0ca99f9-5ee0-45b3-bb80-948f82b1fcb1"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ EsppExportValue = "90 00:00:00",
+ Order = 12,
+ TypeId = 1,
+ Value = "Каждые 90 дней"
+ },
+ new
+ {
+ Id = new Guid("086f7a37-9848-423a-a3cc-36dbb5ad43e3"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ EsppExportValue = "182 00:00:00",
+ Order = 13,
+ TypeId = 1,
+ Value = "Каждые полгода"
+ },
+ new
+ {
+ Id = new Guid("f2da9e02-d619-4517-a598-374880a8c8e8"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ EsppExportValue = "540 00:00:00",
+ Order = 14,
+ TypeId = 1,
+ Value = "Каждые 1,5 года"
+ },
+ new
+ {
+ Id = new Guid("f38d7d30-8923-4ea0-aa7c-5b251e19ab61"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ EsppExportValue = "1095 00:00:00",
+ Order = 15,
+ TypeId = 1,
+ Value = "Каждые 3 года"
+ },
+ new
+ {
+ Id = new Guid("b7303461-9a30-43fa-8e55-305aa13f186f"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ EsppExportValue = "1",
+ Order = 0,
+ TypeId = 2,
+ Value = "Понедельник"
+ },
+ new
+ {
+ Id = new Guid("e951135e-71f2-4262-9342-df4d5315ab6c"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ EsppExportValue = "2",
+ Order = 1,
+ TypeId = 2,
+ Value = "Вторник"
+ },
+ new
+ {
+ Id = new Guid("c34d5375-70e7-4632-b3af-30e279a0621a"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ EsppExportValue = "3",
+ Order = 2,
+ TypeId = 2,
+ Value = "Среда"
+ },
+ new
+ {
+ Id = new Guid("ec9540df-c2de-4bda-a063-34d02d4b6e03"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ EsppExportValue = "4",
+ Order = 3,
+ TypeId = 2,
+ Value = "Четверг"
+ },
+ new
+ {
+ Id = new Guid("2ed85534-4684-4eb2-9ccb-e264d212c945"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ EsppExportValue = "5",
+ Order = 4,
+ TypeId = 2,
+ Value = "Пятница"
+ },
+ new
+ {
+ Id = new Guid("a6804315-96ef-484e-82ee-c5795694468b"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ EsppExportValue = "6",
+ Order = 5,
+ TypeId = 2,
+ Value = "Суббота"
+ },
+ new
+ {
+ Id = new Guid("eb71e699-937f-4894-9688-f7a7f95e5e58"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ EsppExportValue = "7",
+ Order = 6,
+ TypeId = 2,
+ Value = "Воскресенье"
+ },
+ new
+ {
+ Id = new Guid("e86adbfb-3345-4e0c-aa3b-b4418f9cfe88"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ EsppExportValue = "1",
+ Order = 0,
+ TypeId = 3,
+ Value = "1"
+ },
+ new
+ {
+ Id = new Guid("5b4d7ca6-31e7-475b-b7c8-13c6680c3dc3"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ EsppExportValue = "2",
+ Order = 1,
+ TypeId = 3,
+ Value = "2"
+ },
+ new
+ {
+ Id = new Guid("0da03db0-9404-425d-bea1-5da0c9b60b59"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ EsppExportValue = "3",
+ Order = 2,
+ TypeId = 3,
+ Value = "3"
+ },
+ new
+ {
+ Id = new Guid("199474c8-0a77-47e5-aab8-ba33c216cc9e"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ EsppExportValue = "4",
+ Order = 3,
+ TypeId = 3,
+ Value = "4"
+ },
+ new
+ {
+ Id = new Guid("e6619da1-f7e8-45b9-bbd3-9c17bec2ccd3"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ EsppExportValue = "5",
+ Order = 4,
+ TypeId = 3,
+ Value = "5"
+ },
+ new
+ {
+ Id = new Guid("a8708763-c838-49a5-95fe-bf4f73518d71"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ EsppExportValue = "6",
+ Order = 5,
+ TypeId = 3,
+ Value = "6"
+ },
+ new
+ {
+ Id = new Guid("7ec056aa-820c-4900-96cb-4564d2ea6398"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ EsppExportValue = "7",
+ Order = 6,
+ TypeId = 3,
+ Value = "7"
+ },
+ new
+ {
+ Id = new Guid("554d7d0c-91b1-4b81-b94d-1ee864192962"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ EsppExportValue = "8",
+ Order = 7,
+ TypeId = 3,
+ Value = "8"
+ },
+ new
+ {
+ Id = new Guid("8b7847a4-23de-4199-8aad-3b5c0323b5a2"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ EsppExportValue = "9",
+ Order = 8,
+ TypeId = 3,
+ Value = "9"
+ },
+ new
+ {
+ Id = new Guid("fb7f41ca-950b-4dc1-a0a6-bd9a221ab2ad"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ EsppExportValue = "10",
+ Order = 9,
+ TypeId = 3,
+ Value = "10"
+ },
+ new
+ {
+ Id = new Guid("a28b530f-ea38-4a2c-a16b-0b7fa3770d3c"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ EsppExportValue = "11",
+ Order = 10,
+ TypeId = 3,
+ Value = "11"
+ },
+ new
+ {
+ Id = new Guid("7a004a11-32e1-40ae-ab35-0d3dc3a69785"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ EsppExportValue = "12",
+ Order = 11,
+ TypeId = 3,
+ Value = "12"
+ },
+ new
+ {
+ Id = new Guid("e0f2f4d1-4a5e-4997-8336-83c3c35f38df"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ EsppExportValue = "13",
+ Order = 12,
+ TypeId = 3,
+ Value = "13"
+ },
+ new
+ {
+ Id = new Guid("9c5aaf48-88ec-4c67-b936-2be45550f8bf"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ EsppExportValue = "14",
+ Order = 13,
+ TypeId = 3,
+ Value = "14"
+ },
+ new
+ {
+ Id = new Guid("8dbd680c-ce49-4d2e-8a1a-05619685e240"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ EsppExportValue = "15",
+ Order = 14,
+ TypeId = 3,
+ Value = "15"
+ },
+ new
+ {
+ Id = new Guid("2f476f70-b1ef-419d-aad5-3911f1e3231f"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ EsppExportValue = "16",
+ Order = 15,
+ TypeId = 3,
+ Value = "16"
+ },
+ new
+ {
+ Id = new Guid("2c635ce2-fc18-47be-b3e9-98c211abf312"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ EsppExportValue = "17",
+ Order = 16,
+ TypeId = 3,
+ Value = "17"
+ },
+ new
+ {
+ Id = new Guid("f9d5b03b-624a-4f9f-8da3-1490ea5d2914"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ EsppExportValue = "18",
+ Order = 17,
+ TypeId = 3,
+ Value = "18"
+ },
+ new
+ {
+ Id = new Guid("4f4b249c-db60-4582-86ed-75cfee4edd0c"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ EsppExportValue = "19",
+ Order = 18,
+ TypeId = 3,
+ Value = "19"
+ },
+ new
+ {
+ Id = new Guid("220a1464-4d39-416c-b4b2-3093eb007298"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ EsppExportValue = "20",
+ Order = 19,
+ TypeId = 3,
+ Value = "20"
+ },
+ new
+ {
+ Id = new Guid("c887ca60-b05d-4d3c-ad1f-223c879b1a6d"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ EsppExportValue = "21",
+ Order = 20,
+ TypeId = 3,
+ Value = "21"
+ },
+ new
+ {
+ Id = new Guid("2905765d-63fb-41fe-a111-ee2f1d03d62e"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ EsppExportValue = "22",
+ Order = 21,
+ TypeId = 3,
+ Value = "22"
+ },
+ new
+ {
+ Id = new Guid("dbbe704a-8d6d-40e7-bd30-6974035b1fab"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ EsppExportValue = "23",
+ Order = 22,
+ TypeId = 3,
+ Value = "23"
+ },
+ new
+ {
+ Id = new Guid("cf7b9645-52ed-43a2-8267-267e0aed19b1"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ EsppExportValue = "24",
+ Order = 23,
+ TypeId = 3,
+ Value = "24"
+ },
+ new
+ {
+ Id = new Guid("454788d6-d0ad-4c07-878c-da3fd3cd05e1"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ EsppExportValue = "25",
+ Order = 24,
+ TypeId = 3,
+ Value = "25"
+ },
+ new
+ {
+ Id = new Guid("40d70d73-8582-4be6-a9e6-503b96ae3d49"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ EsppExportValue = "26",
+ Order = 25,
+ TypeId = 3,
+ Value = "26"
+ },
+ new
+ {
+ Id = new Guid("8f6610dc-ef46-4842-a57e-18d7aaa75931"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ EsppExportValue = "27",
+ Order = 26,
+ TypeId = 3,
+ Value = "27"
+ },
+ new
+ {
+ Id = new Guid("03858472-d4ce-47fd-9497-8051728766e4"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ EsppExportValue = "28",
+ Order = 27,
+ TypeId = 3,
+ Value = "28"
+ },
+ new
+ {
+ Id = new Guid("b1018e07-e90e-42ee-b399-19f3d0c14dd6"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ EsppExportValue = "29",
+ Order = 28,
+ TypeId = 3,
+ Value = "29"
+ },
+ new
+ {
+ Id = new Guid("a1669207-aa31-40fe-98d0-d941008d1655"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ EsppExportValue = "30",
+ Order = 29,
+ TypeId = 3,
+ Value = "30"
+ },
+ new
+ {
+ Id = new Guid("0936aa99-73e0-43de-b6df-334c1228a226"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ EsppExportValue = "31",
+ Order = 30,
+ TypeId = 3,
+ Value = "31"
+ },
+ new
+ {
+ Id = new Guid("626ca076-f09e-4a7a-8610-b7de6337b24a"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ EsppExportValue = "1",
+ Order = 0,
+ TypeId = 4,
+ Value = "Первый"
+ },
+ new
+ {
+ Id = new Guid("032fbd02-67d0-4b8c-bed0-42629ab7113b"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ EsppExportValue = "2",
+ Order = 1,
+ TypeId = 4,
+ Value = "Второй"
+ },
+ new
+ {
+ Id = new Guid("fa8a8f60-e41e-495e-ac86-35174d9976bf"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ EsppExportValue = "3",
+ Order = 2,
+ TypeId = 4,
+ Value = "Третий"
+ },
+ new
+ {
+ Id = new Guid("d2f90168-2b49-42f2-820b-79db2c522adf"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ EsppExportValue = "4",
+ Order = 3,
+ TypeId = 4,
+ Value = "Четвертый"
+ },
+ new
+ {
+ Id = new Guid("12bb8db2-cf7f-4113-baff-6883770f1ba5"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ EsppExportValue = "5",
+ Order = 4,
+ TypeId = 4,
+ Value = "Последний"
+ },
+ new
+ {
+ Id = new Guid("18260e91-3fbe-4401-9edc-78dbc419370e"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ EsppExportValue = "1",
+ Order = 0,
+ TypeId = 5,
+ Value = "Январь"
+ },
+ new
+ {
+ Id = new Guid("361526aa-3e1c-452e-bb44-0ade8521830d"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ EsppExportValue = "2",
+ Order = 1,
+ TypeId = 5,
+ Value = "Февраль"
+ },
+ new
+ {
+ Id = new Guid("fad4bdb0-6c51-4810-a30b-6d031a0d4c46"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ EsppExportValue = "3",
+ Order = 2,
+ TypeId = 5,
+ Value = "Март"
+ },
+ new
+ {
+ Id = new Guid("06ab835d-3d3e-4057-8422-a553b6b40995"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ EsppExportValue = "4",
+ Order = 3,
+ TypeId = 5,
+ Value = "Апрель"
+ },
+ new
+ {
+ Id = new Guid("83f56b5d-b16b-4aa5-89d7-a253fee4e4ad"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ EsppExportValue = "5",
+ Order = 4,
+ TypeId = 5,
+ Value = "Май"
+ },
+ new
+ {
+ Id = new Guid("e679ec84-a9ee-4bed-a051-2b14edddcb18"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ EsppExportValue = "6",
+ Order = 5,
+ TypeId = 5,
+ Value = "Июнь"
+ },
+ new
+ {
+ Id = new Guid("d439808a-6a10-409b-8809-a755b7cca60b"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ EsppExportValue = "7",
+ Order = 6,
+ TypeId = 5,
+ Value = "Июль"
+ },
+ new
+ {
+ Id = new Guid("6e9972c4-6bf7-4fe4-b4ea-bbb333fb69c8"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ EsppExportValue = "8",
+ Order = 7,
+ TypeId = 5,
+ Value = "Август"
+ },
+ new
+ {
+ Id = new Guid("0883aac2-9d5b-4098-b672-c684d2a3a0c9"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ EsppExportValue = "9",
+ Order = 8,
+ TypeId = 5,
+ Value = "Сентябрь"
+ },
+ new
+ {
+ Id = new Guid("5e6592bc-acb2-45a4-979b-fdecf8457453"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ EsppExportValue = "10",
+ Order = 9,
+ TypeId = 5,
+ Value = "Октябрь"
+ },
+ new
+ {
+ Id = new Guid("edd7cb49-d6a0-4969-b2d6-1967da69b336"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ EsppExportValue = "11",
+ Order = 10,
+ TypeId = 5,
+ Value = "Ноябрь"
+ },
+ new
+ {
+ Id = new Guid("dd695fb2-4ad0-4cda-a4df-e15059c56b24"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ EsppExportValue = "12",
+ Order = 11,
+ TypeId = 5,
+ Value = "Декабрь"
+ },
+ new
+ {
+ Id = new Guid("2f473624-4eb3-49b4-a4b9-cc7fc08a50f5"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ EsppExportValue = "1",
+ Order = 0,
+ TypeId = 6,
+ Value = "Января"
+ },
+ new
+ {
+ Id = new Guid("f0003490-a249-44bd-814f-4566999915d8"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ EsppExportValue = "2",
+ Order = 1,
+ TypeId = 6,
+ Value = "Февраля"
+ },
+ new
+ {
+ Id = new Guid("f4c3fe38-aeaa-42f7-a9ba-190ea2dfe339"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ EsppExportValue = "3",
+ Order = 2,
+ TypeId = 6,
+ Value = "Марта"
+ },
+ new
+ {
+ Id = new Guid("06a8bd2f-68e1-42f5-961c-ac3b98a2181e"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ EsppExportValue = "4",
+ Order = 3,
+ TypeId = 6,
+ Value = "Апреля"
+ },
+ new
+ {
+ Id = new Guid("963b9c41-d607-444a-9fe0-fe429590e326"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ EsppExportValue = "5",
+ Order = 4,
+ TypeId = 6,
+ Value = "Мая"
+ },
+ new
+ {
+ Id = new Guid("ec8554c8-dee4-49a1-b1b7-474ad8ec1473"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ EsppExportValue = "6",
+ Order = 5,
+ TypeId = 6,
+ Value = "Июня"
+ },
+ new
+ {
+ Id = new Guid("e15c7c63-e29f-41a3-9c82-f70eb6c24fde"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ EsppExportValue = "7",
+ Order = 6,
+ TypeId = 6,
+ Value = "Июля"
+ },
+ new
+ {
+ Id = new Guid("0b1f3cea-301a-4d74-9ce1-2cd93b41897d"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ EsppExportValue = "8",
+ Order = 7,
+ TypeId = 6,
+ Value = "Августа"
+ },
+ new
+ {
+ Id = new Guid("e2fa3769-f66f-4753-a161-35adad7717a5"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ EsppExportValue = "9",
+ Order = 8,
+ TypeId = 6,
+ Value = "Сентября"
+ },
+ new
+ {
+ Id = new Guid("c1de4aca-9f49-48ae-9279-cf9ec4092112"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ EsppExportValue = "10",
+ Order = 9,
+ TypeId = 6,
+ Value = "Октября"
+ },
+ new
+ {
+ Id = new Guid("a74b9ebd-bcd8-4537-b371-194de2fe0a4d"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ EsppExportValue = "11",
+ Order = 10,
+ TypeId = 6,
+ Value = "Ноября"
+ },
+ new
+ {
+ Id = new Guid("852a5ebd-4545-494b-bc69-c27409a41adc"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ EsppExportValue = "12",
+ Order = 11,
+ TypeId = 6,
+ Value = "Декабря"
+ });
+ });
+
+ modelBuilder.Entity("PARR.DAL.Models.EsppSchValue", b =>
+ {
+ b.Property("JobGroupId")
+ .HasColumnType("uuid");
+
+ b.Property("TypeValueId")
+ .HasColumnType("uuid");
+
+ b.Property("TypeConfigId")
+ .HasColumnType("uuid");
+
+ b.HasKey("JobGroupId", "TypeValueId", "TypeConfigId");
+
+ b.HasIndex("TypeConfigId");
+
+ b.HasIndex("TypeValueId");
+
+ b.ToTable("EsppSchValues", "schedule");
+ });
+
+ modelBuilder.Entity("PARR.DAL.Models.Host", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uuid");
+
+ b.Property("DateCreated")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("DateModified")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("Ek")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("EkStatusCode")
+ .HasColumnType("integer");
+
+ b.Property("IP")
+ .HasColumnType("text");
+
+ b.Property("LastLogon")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("ResponseAreaCode")
+ .HasColumnType("integer");
+
+ b.Property("WorkGroupId")
+ .HasColumnType("uuid");
+
+ b.HasKey("Id");
+
+ b.HasIndex("Ek")
+ .IsUnique();
+
+ b.HasIndex("EkStatusCode");
+
+ b.HasIndex("IP");
+
+ b.HasIndex("ResponseAreaCode");
+
+ b.HasIndex("WorkGroupId");
+
+ b.ToTable("Hosts");
+ });
+
+ modelBuilder.Entity("PARR.DAL.Models.Job.Job", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uuid");
+
+ b.Property("DateCreated")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("DateModified")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("GroupId")
+ .HasColumnType("uuid");
+
+ b.Property("IsParentRelationships")
+ .HasColumnType("boolean");
+
+ b.Property("MaxValueRelationships")
+ .HasColumnType("integer");
+
+ b.Property("MinValueRelationships")
+ .HasColumnType("integer");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("ResponseAreaMask")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("TemplateNameMask")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("TnkId")
+ .HasColumnType("uuid");
+
+ b.Property("WorkGroupMask")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("WorkName")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.HasKey("Id");
+
+ b.HasIndex("GroupId");
+
+ b.HasIndex("TnkId");
+
+ b.ToTable("Jobs", "job", t =>
+ {
+ t.HasComment("Таблица видов работ");
+ });
+ });
+
+ modelBuilder.Entity("PARR.DAL.Models.Job.JobAutoControl", b =>
+ {
+ b.Property("JobId")
+ .HasColumnType("uuid");
+
+ b.Property("InitUsedScheduleState")
+ .HasColumnType("boolean");
+
+ b.Property("InitUsedTemplateState")
+ .HasColumnType("boolean");
+
+ b.Property("IsEnable")
+ .HasColumnType("boolean");
+
+ b.HasKey("JobId");
+
+ b.ToTable("AutoControls", "job", t =>
+ {
+ t.HasComment("Таблица управления автоконтролем для работ");
+ });
+ });
+
+ modelBuilder.Entity("PARR.DAL.Models.Job.JobFieldFilter", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uuid");
+
+ b.Property("DateCreated")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("DateModified")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("FieldId")
+ .HasColumnType("uuid");
+
+ b.Property("IsInverse")
+ .HasColumnType("boolean");
+
+ b.Property("UnitFilterId")
+ .HasColumnType("uuid");
+
+ b.Property("ValueMask")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.HasKey("Id");
+
+ b.HasIndex("FieldId");
+
+ b.HasIndex("UnitFilterId");
+
+ b.ToTable("FieldFilters", "job", t =>
+ {
+ t.HasComment("Таблица описания критериев выборки аттрибутов ЭК");
+ });
+ });
+
+ modelBuilder.Entity("PARR.DAL.Models.Job.JobGroup", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uuid");
+
+ b.Property("AgentName")
+ .HasColumnType("text");
+
+ b.Property("AgentScript")
+ .HasColumnType("text");
+
+ b.Property("AgentTimeOutSec")
+ .HasColumnType("integer");
+
+ b.Property("DateCreated")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("DateModified")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("FullDescription")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("GroupName")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("GroupTypeId")
+ .HasColumnType("uuid");
+
+ b.Property("GroupingUnitFieldId")
+ .HasColumnType("uuid");
+
+ b.Property("IsAgent")
+ .HasColumnType("boolean");
+
+ b.Property("IsAutoDistributionEnabled")
+ .HasColumnType("boolean");
+
+ b.Property("IsResponseAreaTimezone")
+ .HasColumnType("boolean");
+
+ b.Property("ReferenceDate")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("ScheduleExcludeTypeCalendarId")
+ .HasColumnType("uuid");
+
+ b.Property("ScheduleExcludeTypeId")
+ .HasColumnType("uuid");
+
+ b.Property("ShortDescription")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("Solution")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("TemplateDuration")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("UserTimeZoneOffsetMinutes")
+ .HasColumnType("integer")
+ .HasComment("Смещение часового пояса пользователя в минутах относительно UTC на момент ReferenceDate");
+
+ b.HasKey("Id");
+
+ b.HasIndex("GroupTypeId");
+
+ b.HasIndex("GroupingUnitFieldId");
+
+ b.HasIndex("ScheduleExcludeTypeCalendarId");
+
+ b.HasIndex("ScheduleExcludeTypeId");
+
+ b.ToTable("Groups", "job", t =>
+ {
+ t.HasComment("Таблица описания групп работ, для реализации зонтиков");
+ });
+ });
+
+ modelBuilder.Entity("PARR.DAL.Models.Job.JobGroupDistributionConfig", b =>
+ {
+ b.Property("GroupId")
+ .HasColumnType("uuid");
+
+ b.Property("DistributionPeriodId")
+ .HasColumnType("uuid");
+
+ b.Property("IsExcludeWeekends")
+ .HasColumnType("boolean");
+
+ b.Property("IsGroupingByWorkGroup")
+ .HasColumnType("boolean");
+
+ b.HasKey("GroupId");
+
+ b.HasIndex("DistributionPeriodId");
+
+ b.ToTable("GroupDistributionConfigs", "job", t =>
+ {
+ t.HasComment("Настройки автораспределения для группы работ");
+ });
+ });
+
+ modelBuilder.Entity("PARR.DAL.Models.Job.JobGroupType", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uuid");
+
+ b.Property("Code")
+ .HasColumnType("integer");
+
+ b.Property("DateCreated")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("Description")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.HasKey("Id");
+
+ b.ToTable("GroupTypes", "job", t =>
+ {
+ t.HasComment("Таблица типов групп работ");
+ });
+
+ b.HasData(
+ new
+ {
+ Id = new Guid("4fa62e79-86bb-47c2-be1a-72a716a170fa"),
+ Code = 0,
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ Description = "Обычный",
+ Name = "Simple"
+ },
+ new
+ {
+ Id = new Guid("6ec58b1a-5c40-47b9-b036-4fa490e8d503"),
+ Code = 1,
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ Description = "Зонтик",
+ Name = "Umbrella"
+ },
+ new
+ {
+ Id = new Guid("318625e5-f833-436a-99df-2a382a1e71c7"),
+ Code = 2,
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ Description = "Сгруппированный",
+ Name = "Group"
+ });
+ });
+
+ modelBuilder.Entity("PARR.DAL.Models.Job.JobRelationshipFilter", b =>
+ {
+ b.Property("UnitFilterId")
+ .HasColumnType("uuid");
+
+ b.Property("FieldId")
+ .HasColumnType("uuid");
+
+ b.Property("IsFullMatch")
+ .HasColumnType("boolean");
+
+ b.Property("IsInverse")
+ .HasColumnType("boolean");
+
+ b.Property("IsParent")
+ .HasColumnType("boolean");
+
+ b.Property("ValueMask")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.HasKey("UnitFilterId", "FieldId");
+
+ b.HasIndex("FieldId");
+
+ b.ToTable("RelationshipFilters", "job", t =>
+ {
+ t.HasComment("Таблица фильтров связей ЭК");
+ });
+ });
+
+ modelBuilder.Entity("PARR.DAL.Models.Job.JobUnitFilter", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uuid");
+
+ b.Property("DateCreated")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("DateModified")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("JobId")
+ .HasColumnType("uuid");
+
+ b.Property("UnitFilter")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.HasKey("Id");
+
+ b.HasIndex("JobId");
+
+ b.ToTable("UnitFilters", "job", t =>
+ {
+ t.HasComment("Таблица описания критериев выборки ЭК, описание полей в АСУ ЕСПП");
+ });
+ });
+
+ modelBuilder.Entity("PARR.DAL.Models.Order", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uuid");
+
+ b.Property("DateCreated")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("DateModified")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("ExpirationDate")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("GenerateDate")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("NextStatusCode")
+ .HasColumnType("integer");
+
+ b.Property("Number")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("ShortName")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("StatusCode")
+ .HasColumnType("integer");
+
+ b.Property("TemplateId")
+ .HasColumnType("uuid");
+
+ b.Property("WorkGroup")
+ .HasColumnType("text");
+
+ b.HasKey("Id");
+
+ b.HasIndex("NextStatusCode");
+
+ b.HasIndex("Number")
+ .IsUnique();
+
+ b.HasIndex("StatusCode");
+
+ b.HasIndex("TemplateId");
+
+ b.ToTable("Orders");
+ });
+
+ modelBuilder.Entity("PARR.DAL.Models.OrderStatus", b =>
+ {
+ b.Property("Code")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Code"));
+
+ b.Property("Description")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.HasKey("Code");
+
+ b.ToTable("OrderStatuses");
+
+ b.HasData(
+ new
+ {
+ Code = 1,
+ Description = "1-Направлен в группу",
+ Name = "New"
+ },
+ new
+ {
+ Code = 2,
+ Description = "2-В работе",
+ Name = "InWork"
+ },
+ new
+ {
+ Code = 3,
+ Description = "3-Приостановлен",
+ Name = "Stop"
+ },
+ new
+ {
+ Code = 4,
+ Description = "4-Выполнен",
+ Name = "Complete"
+ },
+ new
+ {
+ Code = 5,
+ Description = "5-Закрыт",
+ Name = "Closed"
+ });
+ });
+
+ modelBuilder.Entity("PARR.DAL.Models.ParrComponent", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("integer");
+
+ b.Property("Description")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.HasKey("Id");
+
+ b.HasIndex("Name")
+ .IsUnique();
+
+ b.ToTable("ParrComponents");
+
+ b.HasData(
+ new
+ {
+ Id = 0,
+ Description = "API",
+ Name = "Api"
+ },
+ new
+ {
+ Id = 1,
+ Description = "Загрузчик из АИХИТ",
+ Name = "AihitLoader"
+ },
+ new
+ {
+ Id = 2,
+ Description = "Синхронизатор АИХИТ",
+ Name = "AihitSyncer"
+ },
+ new
+ {
+ Id = 3,
+ Description = "Загрузчик нарядов из ЕСПП",
+ Name = "EsppOrderLoader"
+ },
+ new
+ {
+ Id = 4,
+ Description = "Управление нарядами ЕСПП",
+ Name = "EsppOrderManager"
+ },
+ new
+ {
+ Id = 5,
+ Description = "Синхронизатор расписаний",
+ Name = "EsppScheduleSync"
+ },
+ new
+ {
+ Id = 6,
+ Description = "Синхронизатор шаблонов",
+ Name = "EsppTemplateSync"
+ },
+ new
+ {
+ Id = 7,
+ Description = "Генератор шаблонов",
+ Name = "GeneratorTemplates"
+ },
+ new
+ {
+ Id = 8,
+ Description = "Авто-контроль РР",
+ Name = "JobAutoControl"
+ },
+ new
+ {
+ Id = 9,
+ Description = "Связывание нарядов ЕСПП с ПАРР (шаблонами, агентами)",
+ Name = "Master"
+ },
+ new
+ {
+ Id = 10,
+ Description = "Рассчет даты следующего срабатывания",
+ Name = "NextRun"
+ },
+ new
+ {
+ Id = 11,
+ Description = "Активатор шаблонов / расписаний",
+ Name = "TemplateActivator"
+ },
+ new
+ {
+ Id = 12,
+ Description = "Автораспределение РР",
+ Name = "TemplateDistributor"
+ });
+ });
+
+ modelBuilder.Entity("PARR.DAL.Models.Process", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uuid");
+
+ b.Property("DateCreated")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("DateModified")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("EsppId")
+ .HasColumnType("integer");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.HasKey("Id");
+
+ b.HasIndex("EsppId")
+ .IsUnique();
+
+ b.ToTable("Processes");
+ });
+
+ modelBuilder.Entity("PARR.DAL.Models.ResponseArea", b =>
+ {
+ b.Property("Code")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Code"));
+
+ b.Property("Name")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.HasKey("Code");
+
+ b.ToTable("ResponseAreas");
+
+ b.HasData(
+ new
+ {
+ Code = 96,
+ Name = "96-ДВС"
+ },
+ new
+ {
+ Code = 94,
+ Name = "94-ЗАБ"
+ },
+ new
+ {
+ Code = 92,
+ Name = "92-ВСИБ"
+ },
+ new
+ {
+ Code = 88,
+ Name = "88-КРАСН"
+ },
+ new
+ {
+ Code = 83,
+ Name = "83-ЗСИБ"
+ },
+ new
+ {
+ Code = 80,
+ Name = "80-ЮУР"
+ },
+ new
+ {
+ Code = 76,
+ Name = "76-СВРД"
+ },
+ new
+ {
+ Code = 63,
+ Name = "63-КБШ"
+ },
+ new
+ {
+ Code = 61,
+ Name = "61-ПРИВ"
+ },
+ new
+ {
+ Code = 58,
+ Name = "58-ЮВСТ"
+ },
+ new
+ {
+ Code = 51,
+ Name = "51-СКВ"
+ },
+ new
+ {
+ Code = 28,
+ Name = "28-СЕВ"
+ },
+ new
+ {
+ Code = 24,
+ Name = "24-ГОР"
+ },
+ new
+ {
+ Code = 17,
+ Name = "17-МСК"
+ },
+ new
+ {
+ Code = 10,
+ Name = "10-КЛГ"
+ },
+ new
+ {
+ Code = 1,
+ Name = "01-ОКТ"
+ },
+ new
+ {
+ Code = 99,
+ Name = "00-ГВЦ"
+ },
+ new
+ {
+ Code = 100,
+ Name = "ОБЩЕЕ"
+ },
+ new
+ {
+ Code = 110,
+ Name = "ВП"
+ },
+ new
+ {
+ Code = 111,
+ Name = "ОСК"
+ });
+ });
+
+ modelBuilder.Entity("PARR.DAL.Models.Robot", b =>
+ {
+ b.Property("Code")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Code"));
+
+ b.Property("Description")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.HasKey("Code");
+
+ b.HasIndex("Name")
+ .IsUnique();
+
+ b.ToTable("Robots");
+
+ b.HasData(
+ new
+ {
+ Code = 1,
+ Description = "Робот по созданию/изменению шаблона наряда ЕСПП",
+ Name = "TemplateOrder"
+ },
+ new
+ {
+ Code = 2,
+ Description = "Робот по созданию/изменению расписания шаблона наряда в ЕСПП",
+ Name = "ScheduleOrder"
+ });
+ });
+
+ modelBuilder.Entity("PARR.DAL.Models.RobotConfiguration", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uuid");
+
+ b.Property("AttemptsNumber")
+ .HasColumnType("integer");
+
+ b.Property("DateCreated")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("LastRobotStatusUpdated")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("RobotCode")
+ .HasColumnType("integer");
+
+ b.Property("RobotStatusCode")
+ .HasColumnType("integer");
+
+ b.Property("TaskStatusCode")
+ .HasColumnType("integer");
+
+ b.Property("TemplateId")
+ .HasColumnType("uuid");
+
+ b.HasKey("Id");
+
+ b.HasIndex("RobotCode");
+
+ b.HasIndex("RobotStatusCode");
+
+ b.HasIndex("TaskStatusCode");
+
+ b.HasIndex("TemplateId", "RobotCode")
+ .IsUnique();
+
+ b.HasIndex("TemplateId", "RobotStatusCode");
+
+ b.HasIndex("TemplateId", "TaskStatusCode");
+
+ b.ToTable("RobotConfigurations");
+ });
+
+ modelBuilder.Entity("PARR.DAL.Models.RobotHistory", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uuid");
+
+ b.Property("DateCreated")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("EsppMessage")
+ .HasColumnType("text");
+
+ b.Property("HistoryLevel")
+ .HasColumnType("integer");
+
+ b.Property("RobotConfigurationId")
+ .HasColumnType("uuid");
+
+ b.Property("RobotIp")
+ .HasColumnType("text");
+
+ b.Property("RobotMessage")
+ .HasColumnType("text");
+
+ b.Property("TaskStatusCode")
+ .HasColumnType("integer");
+
+ b.HasKey("Id");
+
+ b.HasIndex("HistoryLevel");
+
+ b.HasIndex("RobotConfigurationId");
+
+ b.HasIndex("TaskStatusCode");
+
+ b.ToTable("RobotHistories");
+ });
+
+ modelBuilder.Entity("PARR.DAL.Models.RobotHistoryLevel", b =>
+ {
+ b.Property("Level")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Level"));
+
+ b.Property("Description")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.HasKey("Level");
+
+ b.ToTable("RobotHistoryLevels");
+
+ b.HasData(
+ new
+ {
+ Level = 1,
+ Description = "Робот начал работу ",
+ Name = "Start"
+ },
+ new
+ {
+ Level = 5,
+ Description = "Информация",
+ Name = "Information"
+ },
+ new
+ {
+ Level = 10,
+ Description = "Ошибка",
+ Name = "Error"
+ },
+ new
+ {
+ Level = 15,
+ Description = "Успешно завершил работу",
+ Name = "Complete"
+ });
+ });
+
+ modelBuilder.Entity("PARR.DAL.Models.RobotStatus", b =>
+ {
+ b.Property("Code")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Code"));
+
+ b.Property("Description")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.HasKey("Code");
+
+ b.ToTable("RobotStatuses");
+
+ b.HasData(
+ new
+ {
+ Code = 11,
+ Description = "Ожидание, ждет пока робот возьмет в работу.",
+ Name = "Wait"
+ },
+ new
+ {
+ Code = 22,
+ Description = "Робот взял в работу.",
+ Name = "InProgress"
+ },
+ new
+ {
+ Code = 33,
+ Description = "Ошибка отработки роботом. Требует ручного вмешательства.",
+ Name = "Error"
+ },
+ new
+ {
+ Code = 44,
+ Description = "Робот успешно отработал.",
+ Name = "Complete"
+ });
+ });
+
+ modelBuilder.Entity("PARR.DAL.Models.Role", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uuid");
+
+ b.Property("DateCreated")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("Description")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.HasKey("Id");
+
+ b.ToTable("Roles");
+
+ b.HasData(
+ new
+ {
+ Id = new Guid("c8f2f144-e6c2-45d7-ba66-5e9bbd376376"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ Description = "Администратор",
+ Name = "administrator"
+ },
+ new
+ {
+ Id = new Guid("13bca225-7fa4-42fa-9d80-d2d46de261fe"),
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ Description = "Робот ЕСПП",
+ Name = "espp-robot"
+ });
+ });
+
+ modelBuilder.Entity("PARR.DAL.Models.Schedule.ScheduleExcludeType", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uuid");
+
+ b.Property("Code")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("DateCreated")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("EsppName")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("EsppValue")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("Title")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.HasKey("Id");
+
+ b.ToTable("ExcludeTypes", "schedule", t =>
+ {
+ t.HasComment("Расписание регламентной работы - Тип исключения");
+ });
+
+ b.HasData(
+ new
+ {
+ Id = new Guid("0595b8e0-f322-4661-b5e3-064af8fbe7cd"),
+ Code = "None",
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ EsppName = "Нет исключений",
+ EsppValue = "NONE",
+ Title = "Нет исключений"
+ },
+ new
+ {
+ Id = new Guid("2b7a4356-9aaf-4e00-b444-42f0b5010e25"),
+ Code = "Only",
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ EsppName = "Выполнить ТОЛЬКО В указанном календаре",
+ EsppValue = "ONLY",
+ Title = "Выполнить ТОЛЬКО В указанном календаре"
+ },
+ new
+ {
+ Id = new Guid("38cd9e64-27c1-4672-a805-2211952a48bd"),
+ Code = "Except",
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ EsppName = "Выполнить везде, КРОМЕ указанного календаря",
+ EsppValue = "EXCEPT",
+ Title = "Выполнить везде, КРОМЕ указанного календаря"
+ });
+ });
+
+ modelBuilder.Entity("PARR.DAL.Models.Schedule.ScheduleExcludeTypeCalendar", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uuid");
+
+ b.Property("Code")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("DateCreated")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("EsppName")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("EsppValue")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("Title")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.HasKey("Id");
+
+ b.ToTable("ExcludeTypeCalendars", "schedule", t =>
+ {
+ t.HasComment("Расписание регламентной работы, исключение - Календарь");
+ });
+
+ b.HasData(
+ new
+ {
+ Id = new Guid("a26edb88-0267-4fbf-b7ec-d172b0a86c9c"),
+ Code = "24x5",
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ EsppName = "24x5",
+ EsppValue = "24x5",
+ Title = "24x5"
+ },
+ new
+ {
+ Id = new Guid("6834f1d5-ac51-43d5-974e-4c759d7bbf9f"),
+ Code = "24x7",
+ DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
+ EsppName = "24x7",
+ EsppValue = "24x7",
+ Title = "24x7"
+ });
+ });
+
+ modelBuilder.Entity("PARR.DAL.Models.Schedule.ScheduleResponseAreaTimeOffset", b =>
+ {
+ b.Property("ResponseArea")
+ .HasColumnType("text");
+
+ b.Property("EsppValue")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("UtcTimeOffset")
+ .HasColumnType("interval");
+
+ b.HasKey("ResponseArea");
+
+ b.ToTable("ResponseAreaTimeOffsets", "schedule", t =>
+ {
+ t.HasComment("Расписание в ЕСПП. Смещение часового пояса относительно МСК для зоны ответственности рабочей группы");
+ });
+ });
+
+ modelBuilder.Entity("PARR.DAL.Models.Setting", b =>
+ {
+ b.Property