feat: создана структура проекта, core, domain, infrastructure. Перенесены enum и task согласно архитектуры
This commit is contained in:
31
PARR.Domain/Constants/DatabaseSchemas.cs
Normal file
31
PARR.Domain/Constants/DatabaseSchemas.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
namespace PARR.Domain.Constants
|
||||
{
|
||||
/// <summary>
|
||||
/// Константы имен схем БД
|
||||
/// </summary>
|
||||
public class DatabaseSchemas
|
||||
{
|
||||
/// <summary>
|
||||
/// Хранение ЭК с компонентным составом, РГ, Типы, С/н, ip, отвтетственные (не пишем шаблоны, расписания)
|
||||
/// </summary>
|
||||
public const string Unit = "unit";
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Хранение информации о видах работ, критериях выборки подходящих под работы ЭК и т.д.
|
||||
/// </summary>
|
||||
public const string Job = "job";
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Расписание регламентных работ
|
||||
/// </summary>
|
||||
public const string Schedule = "schedule";
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Управление очередями
|
||||
/// </summary>
|
||||
public const string Task = "task";
|
||||
}
|
||||
}
|
||||
18
PARR.Domain/Entities/Base/History/Base/IHistoryTable.cs
Normal file
18
PARR.Domain/Entities/Base/History/Base/IHistoryTable.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
namespace PARR.Domain.Entities.Base.History.Base
|
||||
{
|
||||
/// <summary>
|
||||
/// Таблица отслеживания изменений основной таблицы (таблица истории)
|
||||
/// </summary>
|
||||
public interface IHistoryTable : IBaseEntity
|
||||
{
|
||||
/// <summary>
|
||||
/// Id записи в родительской таблице
|
||||
/// </summary>
|
||||
public Guid ParentId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Дата добавления в историю
|
||||
/// </summary>
|
||||
public DateTimeOffset DateAddedToHistory { get; set; }
|
||||
}
|
||||
}
|
||||
9
PARR.Domain/Entities/Base/History/Base/IMyHistory.cs
Normal file
9
PARR.Domain/Entities/Base/History/Base/IMyHistory.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace PARR.Domain.Entities.Base.History.Base
|
||||
{
|
||||
/// <summary>
|
||||
/// По этому интерфейсу определям, что хотим вести историю.
|
||||
/// В родительской таблице, по которой ведется история, указываются настройки истории.
|
||||
/// </summary>
|
||||
/// <typeparam name="HistoryTable">Таблица истории</typeparam>
|
||||
public interface IMyHistory<HistoryTable> where HistoryTable : class { }
|
||||
}
|
||||
14
PARR.Domain/Entities/Base/History/HistoryInitiator.cs
Normal file
14
PARR.Domain/Entities/Base/History/HistoryInitiator.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using PARR.Domain.Enums;
|
||||
|
||||
namespace PARR.Domain.Entities.Base.History
|
||||
{
|
||||
/// <summary>
|
||||
/// Инициатор изменений, ведение истории
|
||||
/// </summary>
|
||||
public class HistoryInitiator : IHistoryInitiator
|
||||
{
|
||||
public string? InitiatorIp { get; set; }
|
||||
public ParrComponentsEnum? InitiatorParrComponentId { get; set; }
|
||||
public string? InitiatorComment { get; set; }
|
||||
}
|
||||
}
|
||||
25
PARR.Domain/Entities/Base/History/IHistoryInitiator.cs
Normal file
25
PARR.Domain/Entities/Base/History/IHistoryInitiator.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using PARR.Domain.Enums;
|
||||
|
||||
namespace PARR.Domain.Entities.Base.History
|
||||
{
|
||||
/// <summary>
|
||||
/// Инициатор изменений, ведение истории
|
||||
/// </summary>
|
||||
public interface IHistoryInitiator
|
||||
{
|
||||
/// <summary>
|
||||
/// IP инициатора изменений (пользователь)
|
||||
/// </summary>
|
||||
public string? InitiatorIp { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Id инициатора компонента ПАРР
|
||||
/// </summary>
|
||||
public ParrComponentsEnum? InitiatorParrComponentId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Комментарий от инициатора
|
||||
/// </summary>
|
||||
public string? InitiatorComment { get; set; }
|
||||
}
|
||||
}
|
||||
15
PARR.Domain/Entities/Base/History/ITemplateGeneralProps.cs
Normal file
15
PARR.Domain/Entities/Base/History/ITemplateGeneralProps.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
namespace PARR.Domain.Entities.Base.History
|
||||
{
|
||||
public interface ITemplateGeneralProps
|
||||
{
|
||||
public string Name { get; set; }
|
||||
|
||||
public bool IsActiveTemplate { get; set; }
|
||||
|
||||
public bool IsActiveSchedule { get; set; }
|
||||
|
||||
public DateTimeOffset? LastRun { get; set; }
|
||||
|
||||
public DateTimeOffset NextRun { get; set; }
|
||||
}
|
||||
}
|
||||
12
PARR.Domain/Entities/Base/IBaseEntity.cs
Normal file
12
PARR.Domain/Entities/Base/IBaseEntity.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
|
||||
namespace PARR.Domain.Entities.Base
|
||||
{
|
||||
public interface IBaseEntity : IBaseEntityDateCreated, IBaseEntityDateModified
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
|
||||
//DateTimeOffset DateCreated { get; set; }
|
||||
|
||||
//DateTimeOffset? DateModified { get; set; }
|
||||
}
|
||||
}
|
||||
7
PARR.Domain/Entities/Base/IBaseEntityDateCreated.cs
Normal file
7
PARR.Domain/Entities/Base/IBaseEntityDateCreated.cs
Normal file
@@ -0,0 +1,7 @@
|
||||
namespace PARR.Domain.Entities.Base
|
||||
{
|
||||
public interface IBaseEntityDateCreated
|
||||
{
|
||||
public DateTimeOffset DateCreated { get; set; }
|
||||
}
|
||||
}
|
||||
7
PARR.Domain/Entities/Base/IBaseEntityDateModified.cs
Normal file
7
PARR.Domain/Entities/Base/IBaseEntityDateModified.cs
Normal file
@@ -0,0 +1,7 @@
|
||||
namespace PARR.Domain.Entities.Base
|
||||
{
|
||||
public interface IBaseEntityDateModified
|
||||
{
|
||||
public DateTimeOffset? DateModified { get; set; }
|
||||
}
|
||||
}
|
||||
32
PARR.Domain/Entities/TaskEntities/TaskError.cs
Normal file
32
PARR.Domain/Entities/TaskEntities/TaskError.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PARR.Domain.Constants;
|
||||
using PARR.Domain.Entities.Base;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.Domain.Entities.TaskEntities
|
||||
{
|
||||
[Table("Errors", Schema = DatabaseSchemas.Task)]
|
||||
[Comment("Таблица ошибок заданий")]
|
||||
public class TaskError : IBaseEntity
|
||||
{
|
||||
[Key]
|
||||
public Guid Id { get; set; }
|
||||
|
||||
public DateTimeOffset DateCreated { get; set; }
|
||||
|
||||
[NotMapped]
|
||||
public DateTimeOffset? DateModified { get; set; }
|
||||
|
||||
public Guid TaskId { get; set; }
|
||||
|
||||
public int AttemptNumber { get; set; }
|
||||
|
||||
public required string ErrorMessage { get; set; }
|
||||
|
||||
public string? StackTrace { get; set; }
|
||||
|
||||
[ForeignKey(nameof(TaskId))]
|
||||
public TaskItem? TaskItem { get; set; }
|
||||
}
|
||||
}
|
||||
52
PARR.Domain/Entities/TaskEntities/TaskItem.cs
Normal file
52
PARR.Domain/Entities/TaskEntities/TaskItem.cs
Normal file
@@ -0,0 +1,52 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PARR.Domain.Constants;
|
||||
using PARR.Domain.Entities.Base;
|
||||
using PARR.Domain.Entities.Base.History;
|
||||
using PARR.Domain.Enums;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.Domain.Entities.TaskEntities
|
||||
{
|
||||
[Table("Tasks", Schema = DatabaseSchemas.Task)]
|
||||
[Comment("Таблица заданий")]
|
||||
public class TaskItem : IBaseEntity, IHistoryInitiator
|
||||
{
|
||||
[Key]
|
||||
public Guid Id { get; set; }
|
||||
|
||||
public DateTimeOffset DateCreated { get; set; }
|
||||
|
||||
public DateTimeOffset? DateModified { get; set; }
|
||||
|
||||
public TaskTypeEnum TypeCode { get; set; }
|
||||
|
||||
public TaskItemStatusEnum StatusCode { get; set; }
|
||||
|
||||
public string? Payload { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Кол-во попыток
|
||||
/// </summary>
|
||||
public int RetryCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Дата завершения (устанавливается или когда Успех или когда Ошибка)
|
||||
/// </summary>
|
||||
public DateTimeOffset? ProcessedAt { get; set; }
|
||||
|
||||
|
||||
public string? InitiatorIp { get; set; }
|
||||
public ParrComponentsEnum? InitiatorParrComponentId { get; set; }
|
||||
public string? InitiatorComment { get; set; }
|
||||
|
||||
|
||||
[ForeignKey(nameof(TypeCode))]
|
||||
public TaskType? TaskType { get; set; }
|
||||
|
||||
[ForeignKey(nameof(StatusCode))]
|
||||
public TaskStatus? TaskStatus { get; set; }
|
||||
|
||||
public ICollection<TaskError> TaskErrors { get; set; } = new HashSet<TaskError>();
|
||||
}
|
||||
}
|
||||
23
PARR.Domain/Entities/TaskEntities/TaskStatus.cs
Normal file
23
PARR.Domain/Entities/TaskEntities/TaskStatus.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PARR.Domain.Constants;
|
||||
using PARR.Domain.Enums;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.Domain.Entities.TaskEntities
|
||||
{
|
||||
[Table("Statuses", Schema = DatabaseSchemas.Task)]
|
||||
[Comment("Таблица статусов заданий")]
|
||||
public class TaskStatus
|
||||
{
|
||||
[Key]
|
||||
public TaskItemStatusEnum Code { get; set; }
|
||||
|
||||
public required string Name { get; set; }
|
||||
|
||||
public required string Description { get; set; }
|
||||
|
||||
|
||||
public ICollection<TaskItem> Tasks { get; set; } = new HashSet<TaskItem>();
|
||||
}
|
||||
}
|
||||
43
PARR.Domain/Entities/TaskEntities/TaskType.cs
Normal file
43
PARR.Domain/Entities/TaskEntities/TaskType.cs
Normal file
@@ -0,0 +1,43 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PARR.Domain.Constants;
|
||||
using PARR.Domain.Enums;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.Domain.Entities.TaskEntities
|
||||
{
|
||||
[Table("Types", Schema = DatabaseSchemas.Task)]
|
||||
[Comment("Таблица типов заданий")]
|
||||
public class TaskType
|
||||
{
|
||||
[Key]
|
||||
public TaskTypeEnum Code { get; set; }
|
||||
|
||||
public required string Name { get; set; }
|
||||
|
||||
public required string Description { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Максимальное кол-во попыток
|
||||
/// </summary>
|
||||
public int MaxRetries { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Максимальное время выполнения
|
||||
/// </summary>
|
||||
public int MaxExecutionTimeMinutes { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Одновременно может быть только одна задача или несколько
|
||||
/// </summary>
|
||||
public bool IsSingleton { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Сколько дней хранить в БД
|
||||
/// </summary>
|
||||
public int RetentionDays { get; set; }
|
||||
|
||||
|
||||
public ICollection<TaskItem> Tasks { get; set; } = new HashSet<TaskItem>();
|
||||
}
|
||||
}
|
||||
21
PARR.Domain/Enums/AgentHistoryLevelEnum.cs
Normal file
21
PARR.Domain/Enums/AgentHistoryLevelEnum.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
namespace PARR.Domain.Enums
|
||||
{
|
||||
/// <summary>
|
||||
/// Уровень истории работы агента
|
||||
/// </summary>
|
||||
public enum AgentHistoryLevelEnum
|
||||
{
|
||||
// При добавлении новых значений, добавить в валидатор AgentHistoryRequestValidator
|
||||
|
||||
/// <summary>
|
||||
/// Агент начал выполнять задание
|
||||
/// </summary>
|
||||
Start = 1,
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Агент завершил выполнение задания
|
||||
/// </summary>
|
||||
End = 5
|
||||
}
|
||||
}
|
||||
13
PARR.Domain/Enums/ApplicationTypesEnum.cs
Normal file
13
PARR.Domain/Enums/ApplicationTypesEnum.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
namespace PARR.Domain.Enums
|
||||
{
|
||||
public enum ApplicationTypesEnum
|
||||
{
|
||||
APP,
|
||||
OS,
|
||||
DB,
|
||||
CKBS,
|
||||
IB,
|
||||
SI,
|
||||
SM
|
||||
}
|
||||
}
|
||||
53
PARR.Domain/Enums/EkStatusEnum.cs
Normal file
53
PARR.Domain/Enums/EkStatusEnum.cs
Normal file
@@ -0,0 +1,53 @@
|
||||
namespace PARR.Domain.Enums
|
||||
{
|
||||
/// <summary>
|
||||
/// Статусы ЭК
|
||||
/// </summary>
|
||||
public enum EkStatusEnum
|
||||
{
|
||||
/// <summary>
|
||||
/// Все записи, используется только внутри проекта
|
||||
/// </summary>
|
||||
All = 0,
|
||||
|
||||
/// <summary>
|
||||
/// 1-Новый
|
||||
/// </summary>
|
||||
New = 1,
|
||||
|
||||
/// <summary>
|
||||
/// 2-Подготовка к эксплуатации
|
||||
/// </summary>
|
||||
Preapre = 2,
|
||||
|
||||
/// <summary>
|
||||
/// 3-В эксплуатации
|
||||
/// </summary>
|
||||
Exploitation = 3,
|
||||
|
||||
/// <summary>
|
||||
/// 4-В ремонте
|
||||
/// </summary>
|
||||
Repair = 4,
|
||||
|
||||
/// <summary>
|
||||
/// 5-В резерве
|
||||
/// </summary>
|
||||
Reserve = 5,
|
||||
|
||||
/// <summary>
|
||||
/// 6-Выведен из эксплуатации
|
||||
/// </summary>
|
||||
OutOfService = 6,
|
||||
|
||||
/// <summary>
|
||||
/// 7-Тестовый
|
||||
/// </summary>
|
||||
Test = 7,
|
||||
|
||||
/// <summary>
|
||||
/// 9-В разработке
|
||||
/// </summary>
|
||||
Development = 9
|
||||
}
|
||||
}
|
||||
43
PARR.Domain/Enums/EsppSchTypeEnum.cs
Normal file
43
PARR.Domain/Enums/EsppSchTypeEnum.cs
Normal file
@@ -0,0 +1,43 @@
|
||||
namespace PARR.Domain.Enums
|
||||
{
|
||||
/// <summary>
|
||||
/// Расписание ЕСПП: типы повторений
|
||||
/// </summary>
|
||||
public enum EsppSchTypeEnum
|
||||
{
|
||||
///// <summary>
|
||||
///// Повторять задачу: Регулярно, Еженедельно, Ежемесячно...
|
||||
///// </summary>
|
||||
//Root = 0,
|
||||
|
||||
/// <summary>
|
||||
/// Через интервал
|
||||
/// </summary>
|
||||
Interval = 1,
|
||||
|
||||
/// <summary>
|
||||
/// День недели: пнд, вт...
|
||||
/// </summary>
|
||||
DayOfWeek = 2,
|
||||
|
||||
/// <summary>
|
||||
/// Число месяца: 1,2,3,4
|
||||
/// </summary>
|
||||
DayOfMonth = 3,
|
||||
|
||||
/// <summary>
|
||||
/// Каждый: первый, второй, третий, четвертый, последний
|
||||
/// </summary>
|
||||
Order = 4,
|
||||
|
||||
/// <summary>
|
||||
/// Месяц: январь, февраль...
|
||||
/// </summary>
|
||||
Month = 5,
|
||||
|
||||
/// <summary>
|
||||
/// Месяц (родительный падеж): января, февраля,
|
||||
/// </summary>
|
||||
MonthGenitive = 6
|
||||
}
|
||||
}
|
||||
39
PARR.Domain/Enums/EsppSchTypeScheduleEnum.cs
Normal file
39
PARR.Domain/Enums/EsppSchTypeScheduleEnum.cs
Normal file
@@ -0,0 +1,39 @@
|
||||
namespace PARR.Domain.Enums
|
||||
{
|
||||
/// <summary>
|
||||
/// Расписание ЕСПП: Повторять задачу
|
||||
/// </summary>
|
||||
public enum EsppSchTypeScheduleEnum
|
||||
{
|
||||
/// <summary>
|
||||
/// Регулярно
|
||||
/// </summary>
|
||||
Regularly = 1,
|
||||
|
||||
/// <summary>
|
||||
/// Еженежельно
|
||||
/// </summary>
|
||||
Weekly = 2,
|
||||
|
||||
/// <summary>
|
||||
/// Ежемесячно
|
||||
/// </summary>
|
||||
Monthly = 3,
|
||||
|
||||
/// <summary>
|
||||
/// Ежемесячно-2
|
||||
/// </summary>
|
||||
Monthly2 = 4,
|
||||
|
||||
/// <summary>
|
||||
/// Ежегодно
|
||||
/// </summary>
|
||||
Annually = 5,
|
||||
|
||||
/// <summary>
|
||||
/// Ежегодно-2
|
||||
/// </summary>
|
||||
Annually2 = 6
|
||||
|
||||
}
|
||||
}
|
||||
20
PARR.Domain/Enums/JobGroupTypesEnum.cs
Normal file
20
PARR.Domain/Enums/JobGroupTypesEnum.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
namespace PARR.Domain.Enums
|
||||
{
|
||||
public enum JobGroupTypesEnum
|
||||
{
|
||||
/// <summary>
|
||||
/// Обычный тип без особенностей
|
||||
/// </summary>
|
||||
Simple = 0,
|
||||
|
||||
/// <summary>
|
||||
/// Тип зонтик, когда отслеживается количество дочерних или родительских связей
|
||||
/// </summary>
|
||||
Umbrella = 1,
|
||||
|
||||
/// <summary>
|
||||
/// Тип группа, когда шаблоны группируются по полю Field
|
||||
/// </summary>
|
||||
Group = 2
|
||||
}
|
||||
}
|
||||
84
PARR.Domain/Enums/ParrComponentsEnum.cs
Normal file
84
PARR.Domain/Enums/ParrComponentsEnum.cs
Normal file
@@ -0,0 +1,84 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace PARR.Domain.Enums
|
||||
{
|
||||
/// <summary>
|
||||
/// Компоненты ПАРР
|
||||
/// </summary>
|
||||
[JsonConverter(typeof(JsonStringEnumConverter))]
|
||||
public enum ParrComponentsEnum
|
||||
{
|
||||
// Тут указываем только Worker`ы
|
||||
// !!! При добавлении новых, добавлять в DataContext !!!
|
||||
|
||||
/// <summary>
|
||||
/// API
|
||||
/// </summary>
|
||||
Api = 0,
|
||||
|
||||
/// <summary>
|
||||
/// Загрузчик из АИХИТ
|
||||
/// </summary>
|
||||
AihitLoader = 1,
|
||||
|
||||
/// <summary>
|
||||
/// Синхронизатор АИХИТ
|
||||
/// </summary>
|
||||
AihitSyncer = 2,
|
||||
|
||||
/// <summary>
|
||||
/// Загрузчик нарядов из ЕСПП
|
||||
/// </summary>
|
||||
EsppOrderLoader = 3,
|
||||
|
||||
/// <summary>
|
||||
/// Управление нарядами ЕСПП
|
||||
/// </summary>
|
||||
EsppOrderManager = 4,
|
||||
|
||||
/// <summary>
|
||||
/// Синхронизатор расписаний
|
||||
/// </summary>
|
||||
EsppScheduleSync = 5,
|
||||
|
||||
/// <summary>
|
||||
/// Синхронизатор шаблонов
|
||||
/// </summary>
|
||||
EsppTemplateSync = 6,
|
||||
|
||||
/// <summary>
|
||||
/// Генератор шаблонов
|
||||
/// </summary>
|
||||
GeneratorTemplates = 7,
|
||||
|
||||
/// <summary>
|
||||
/// Авто-контроль РР
|
||||
/// </summary>
|
||||
JobAutoControl = 8,
|
||||
|
||||
/// <summary>
|
||||
/// Связывание нарядов ЕСПП с ПАРР (шаблонами, агентами)
|
||||
/// </summary>
|
||||
Master = 9,
|
||||
|
||||
/// <summary>
|
||||
/// Рассчет даты следующего срабатывания
|
||||
/// </summary>
|
||||
NextRun = 10,
|
||||
|
||||
/// <summary>
|
||||
/// Активатор шаблонов / расписаний
|
||||
/// </summary>
|
||||
TemplateActivator = 11,
|
||||
|
||||
/// <summary>
|
||||
/// Автораспределение РР
|
||||
/// </summary>
|
||||
TemplateDistributor = 12,
|
||||
|
||||
/// <summary>
|
||||
/// Генератор Template
|
||||
/// </summary>
|
||||
TemplateTaskGenerator = 13
|
||||
}
|
||||
}
|
||||
109
PARR.Domain/Enums/ResponseAreaEnum.cs
Normal file
109
PARR.Domain/Enums/ResponseAreaEnum.cs
Normal file
@@ -0,0 +1,109 @@
|
||||
namespace PARR.Domain.Enums
|
||||
{
|
||||
/// <summary>
|
||||
/// Коды дорог
|
||||
/// </summary>
|
||||
public enum ResponseAreaEnum
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// ДВЖД
|
||||
/// </summary>
|
||||
dvgd = 96,
|
||||
|
||||
/// <summary>
|
||||
/// ЗАБ
|
||||
/// </summary>
|
||||
zrw = 94,
|
||||
|
||||
/// <summary>
|
||||
/// ВСИБ
|
||||
/// </summary>
|
||||
esrr = 92,
|
||||
|
||||
/// <summary>
|
||||
/// КРАСН
|
||||
/// </summary>
|
||||
krw = 88,
|
||||
|
||||
/// <summary>
|
||||
/// ЗСИБ
|
||||
/// </summary>
|
||||
wsr = 83,
|
||||
|
||||
/// <summary>
|
||||
/// ЮУР
|
||||
/// </summary>
|
||||
surw = 80,
|
||||
|
||||
/// <summary>
|
||||
/// СВРД
|
||||
/// </summary>
|
||||
svrw = 76,
|
||||
|
||||
/// <summary>
|
||||
/// КБШ
|
||||
/// </summary>
|
||||
kbsh = 63,
|
||||
|
||||
/// <summary>
|
||||
/// ПРИВ
|
||||
/// </summary>
|
||||
pvrr = 61,
|
||||
|
||||
/// <summary>
|
||||
/// ЮВСТ
|
||||
/// </summary>
|
||||
serw = 58,
|
||||
|
||||
/// <summary>
|
||||
/// СКВ
|
||||
/// </summary>
|
||||
skzd = 51,
|
||||
|
||||
/// <summary>
|
||||
/// СЕВ
|
||||
/// </summary>
|
||||
nrr = 28,
|
||||
|
||||
/// <summary>
|
||||
/// ГОР
|
||||
/// </summary>
|
||||
grw = 24,
|
||||
|
||||
/// <summary>
|
||||
/// МСК
|
||||
/// </summary>
|
||||
msk = 17,
|
||||
|
||||
/// <summary>
|
||||
/// КЛГ
|
||||
/// </summary>
|
||||
klgd = 10,
|
||||
|
||||
/// <summary>
|
||||
/// ОКТ
|
||||
/// </summary>
|
||||
orw = 01,
|
||||
|
||||
/// <summary>
|
||||
/// ГВЦ
|
||||
/// </summary>
|
||||
gvc = 99,
|
||||
|
||||
/// <summary>
|
||||
/// ОБЩЕЕ
|
||||
/// </summary>
|
||||
general = 100,
|
||||
|
||||
/// <summary>
|
||||
/// ВП
|
||||
/// </summary>
|
||||
vp = 110,
|
||||
|
||||
/// <summary>
|
||||
/// ОСК
|
||||
/// </summary>
|
||||
osk = 111,
|
||||
}
|
||||
}
|
||||
28
PARR.Domain/Enums/RobotHistoryLevelEnum.cs
Normal file
28
PARR.Domain/Enums/RobotHistoryLevelEnum.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
namespace PARR.Domain.Enums
|
||||
{
|
||||
/// <summary>
|
||||
/// Уровень логов работы робота
|
||||
/// </summary>
|
||||
public enum RobotHistoryLevelEnum
|
||||
{
|
||||
/// <summary>
|
||||
/// Робот начал работу
|
||||
/// </summary>
|
||||
Start = 1,
|
||||
|
||||
/// <summary>
|
||||
/// Информация
|
||||
/// </summary>
|
||||
Information = 5,
|
||||
|
||||
/// <summary>
|
||||
/// Ошибка
|
||||
/// </summary>
|
||||
Error = 10,
|
||||
|
||||
/// <summary>
|
||||
/// Успешно завершил работу
|
||||
/// </summary>
|
||||
Complete = 15
|
||||
}
|
||||
}
|
||||
28
PARR.Domain/Enums/RobotStatusEnum.cs
Normal file
28
PARR.Domain/Enums/RobotStatusEnum.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
namespace PARR.Domain.Enums
|
||||
{
|
||||
/// <summary>
|
||||
/// Статусы работы робота PARR.DAL.Models.RobotStatus
|
||||
/// </summary>
|
||||
public enum RobotStatusEnum
|
||||
{
|
||||
/// <summary>
|
||||
/// Ожидание, ждет пока робот возьмет в работу
|
||||
/// </summary>
|
||||
Wait = 11,
|
||||
|
||||
/// <summary>
|
||||
/// Робот взял в работу
|
||||
/// </summary>
|
||||
InProgress = 22,
|
||||
|
||||
/// <summary>
|
||||
/// Ошибка отработки роботом. Требует ручного вмешательства.
|
||||
/// </summary>
|
||||
Error = 33,
|
||||
|
||||
/// <summary>
|
||||
/// Робот успешно отработал
|
||||
/// </summary>
|
||||
Complete = 44
|
||||
}
|
||||
}
|
||||
23
PARR.Domain/Enums/ScheduleExcludeTypeEnum.cs
Normal file
23
PARR.Domain/Enums/ScheduleExcludeTypeEnum.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
namespace PARR.Domain.Enums
|
||||
{
|
||||
/// <summary>
|
||||
/// Расписание регламентной работы - Тип исключения
|
||||
/// </summary>
|
||||
public enum ScheduleExcludeTypeEnum
|
||||
{
|
||||
/// <summary>
|
||||
/// Нет исключений
|
||||
/// </summary>
|
||||
None = 0,
|
||||
|
||||
/// <summary>
|
||||
/// Выполнить ТОЛЬКО В указанном календаре
|
||||
/// </summary>
|
||||
Only = 1,
|
||||
|
||||
/// <summary>
|
||||
/// Выполнить везде, КРОМЕ указанного календаря
|
||||
/// </summary>
|
||||
Except = 2
|
||||
}
|
||||
}
|
||||
30
PARR.Domain/Enums/TaskItemStatusEnum.cs
Normal file
30
PARR.Domain/Enums/TaskItemStatusEnum.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
namespace PARR.Domain.Enums
|
||||
{
|
||||
// TODO: Сначала надо переименовать TaskStatusEnum -> RobotTaskStatusEnum, а потом TaskTaskStatusEnum -> TaskStatusEnum
|
||||
|
||||
/// <summary>
|
||||
/// Статус задач Task
|
||||
/// </summary>
|
||||
public enum TaskItemStatusEnum
|
||||
{
|
||||
/// <summary>
|
||||
/// Ожидание
|
||||
/// </summary>
|
||||
Pending=0,
|
||||
|
||||
/// <summary>
|
||||
/// В работе
|
||||
/// </summary>
|
||||
Processing = 1,
|
||||
|
||||
/// <summary>
|
||||
/// Выполнено успешно
|
||||
/// </summary>
|
||||
Success = 2,
|
||||
|
||||
/// <summary>
|
||||
/// Ошибка
|
||||
/// </summary>
|
||||
Failed = 3
|
||||
}
|
||||
}
|
||||
23
PARR.Domain/Enums/TaskStatusEnum.cs
Normal file
23
PARR.Domain/Enums/TaskStatusEnum.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
namespace PARR.Domain.Enums
|
||||
{
|
||||
//TODO: Надо это переименовать в RobotTaskStatusEnum
|
||||
|
||||
/// <summary>
|
||||
/// Статус задания на синхронизацию
|
||||
/// </summary>
|
||||
public enum TaskStatusEnum
|
||||
{
|
||||
/// <summary>
|
||||
/// Требуется создание объекта в ЕСПП
|
||||
/// </summary>
|
||||
Creating = 10,
|
||||
/// <summary>
|
||||
/// Требуется обновление объекта в ЕСПП
|
||||
/// </summary>
|
||||
Updating = 20,
|
||||
/// <summary>
|
||||
/// Нормальное состояние объекта в ЕСПП и ПАРР. Объект в ПАРР соответствует объекту в ЕСПП
|
||||
/// </summary>
|
||||
Ok = 30
|
||||
}
|
||||
}
|
||||
13
PARR.Domain/Enums/TaskTypeEnum.cs
Normal file
13
PARR.Domain/Enums/TaskTypeEnum.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
namespace PARR.Domain.Enums
|
||||
{
|
||||
/// <summary>
|
||||
/// Типы заданий
|
||||
/// </summary>
|
||||
public enum TaskTypeEnum
|
||||
{
|
||||
/// <summary>
|
||||
/// Загруженность
|
||||
/// </summary>
|
||||
Workload = 0,
|
||||
}
|
||||
}
|
||||
19
PARR.Domain/PARR.Domain.csproj
Normal file
19
PARR.Domain/PARR.Domain.csproj
Normal file
@@ -0,0 +1,19 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="DTOs\" />
|
||||
<Folder Include="Exceptions\" />
|
||||
<Folder Include="Settings\" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.20" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
Reference in New Issue
Block a user