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 { /// /// Снимок роботов с одного сервера /// [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; } } }