feat(dal,domain): Таблицы роботов перенесены в схему robot. Создана таблица TemplateRenamePendings - Шаблоны находящиеся в процессе переименования

This commit is contained in:
Mikhail Trubnikov
2026-07-21 11:48:21 +10:00
parent 98245e73e6
commit 5094945c8e
36 changed files with 12965 additions and 214 deletions

View File

@@ -0,0 +1,62 @@
using Microsoft.EntityFrameworkCore;
using PARR.Domain.Constants;
using PARR.Domain.Entities.Base;
using System.ComponentModel.DataAnnotations.Schema;
namespace PARR.Domain.Entities.RobotEntities
{
//[Table("RobotHistories", Schema = DatabaseSchemas.Robot)]
[Table("Histories", Schema = DatabaseSchemas.Robot)]
[Index(nameof(HistoryLevel), nameof(DateCreated), IsDescending = new[] { false, true })]
[Index(nameof(RobotConfigurationId), nameof(DateCreated))]
[Index(nameof(DateCreated))]
public class RobotHistory : IBaseEntity
{
public Guid Id { get; set; }
public DateTimeOffset DateCreated { get; set; }
[NotMapped]
public DateTimeOffset? DateModified { get; set; }
public int HistoryLevel { get; set; }
public string? RobotMessage { get; set; }
public string? EsppMessage { get; set; }
/// <summary>
/// Статус. Что нужно было сделать роботу
/// </summary>
public int TaskStatusCode { get; set; }
public Guid RobotConfigurationId { get; set; }
/// <summary>
/// IP адрес робота
/// </summary>
public string? RobotIp { get; set; }
///// <summary>
///// Уникальный идентификатор серии выполнения, нужен для сопоставления истории
///// </summary>
//public Guid IdSeries { get; set; }
/// <summary>
/// Идентификатор робота.
/// Форматы: H20-R1-T, H20-R1-S, H20-R1-ET, H20-R1-ES
/// </summary>
[Comment("Идентификатор робота. Форматы: H20-R1-T, H20-R1-S, H20-R1-ET, H20-R1-ES.")]
public string? RobotId { get; set; }
[ForeignKey(nameof(HistoryLevel))]
public RobotHistoryLevel? RobotHistoryLevel { get; set; }
[ForeignKey(nameof(RobotConfigurationId))]
public RobotConfiguration? RobotConfiguration { get; set; }
[ForeignKey(nameof(TaskStatusCode))]
public TaskStatus? StatusTask { get; set; }
}
}