Files
parr_api/PARR.Domain/Entities/RobotEntities/RobotSnapshot.cs

39 lines
1.3 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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