Files

39 lines
1.3 KiB
C#
Raw Permalink Normal View History

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; }
}
}