feat(api,core,dal,domain): Сохранение снапшотов состояния роботов.
This commit is contained in:
38
PARR.Domain/Entities/RobotEntities/RobotSnapshot.cs
Normal file
38
PARR.Domain/Entities/RobotEntities/RobotSnapshot.cs
Normal file
@@ -0,0 +1,38 @@
|
||||
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.RobotEntities
|
||||
{
|
||||
/// <summary>
|
||||
/// Снимок роботов с одного сервера
|
||||
/// </summary>
|
||||
[Table("Snapshots", Schema = DatabaseSchemas.Robot)]
|
||||
[Index(nameof(Ip), nameof(DateCreated))]
|
||||
[Comment("Снимки роботов")]
|
||||
public class RobotSnapshot : IBaseEntity
|
||||
{
|
||||
[Key]
|
||||
public Guid Id { get; set; }
|
||||
|
||||
public DateTimeOffset DateCreated { get; set; }
|
||||
|
||||
[NotMapped]
|
||||
public DateTimeOffset? DateModified { get; set; }
|
||||
|
||||
[Comment("Количество запущенных роботов по шаблонам")]
|
||||
public int TemplateRobotsCount { get; set; }
|
||||
|
||||
[Comment("Количество запущенных роботов по расписаниям")]
|
||||
public int ScheduleRobotsCount { get; set; }
|
||||
|
||||
[Comment("Максимально разрешенное количество роботов на сервере")]
|
||||
public int MaxRobots { get; set; }
|
||||
|
||||
[MaxLength(45)]
|
||||
[Comment("Текущий IP-адрес сервера")]
|
||||
public required string Ip { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user