feat(api,core,domain): Получение снапшотов работы роботов

This commit is contained in:
Mikhail Trubnikov
2026-06-11 11:40:12 +10:00
parent d736208a46
commit 7d26f1cf55
13 changed files with 187 additions and 25 deletions

View File

@@ -1,17 +0,0 @@
namespace PARR.Domain.DTOs.RobotSnapshotDTO
{
public record RobotSnapshotItem
{
public Guid Id { get; init; }
public DateTimeOffset DateCreated { get; init; }
public int TemplateRobotsCount { get; init; }
public int ScheduleRobotsCount { get; init; }
public int MaxRobots { get; init; }
public required string Ip { get; init; }
}
}

View File

@@ -0,0 +1,26 @@

using PARR.Domain.DTOs.User;
namespace PARR.Domain.DTOs.RobotSnapshotDTO
{
public record RobotSnapshotItemDto
{
public required UserBaseDto Robot { get; init; }
public List<RobotSnapshotDto> Snapshots { get; init; } = new();
}
public record RobotSnapshotDto
{
public Guid Id { get; init; }
public DateTimeOffset DateCreated { get; init; }
public int TemplateRobotsCount { get; init; }
public int ScheduleRobotsCount { get; init; }
public int MaxRobots { get; init; }
}
}

View File

@@ -0,0 +1,15 @@
namespace PARR.Domain.DTOs.RobotSnapshotDTO
{
public record RobotSnapshotQuery
{
/// <summary>
/// IP робота
/// </summary>
public string? Ip { get; init; }
/// <summary>
/// Кол-во минут от текущего времени
/// </summary>
public int Minutes { get; init; }
}
}

View File

@@ -0,0 +1,25 @@
namespace PARR.Domain.DTOs.User
{
//todo: Не делал маппингов
public record UserDto : UserBaseDto
{
public Guid Id { get; set; }
public DateTimeOffset DateCreated { get; set; }
public DateTimeOffset? LastLogon { get; set; }
//todo:
//public List<RoleResponse>? Roles { get; set; }
}
public record UserBaseDto
{
public required string Ip { get; set; }
public string Name { get; set; } = string.Empty;
public string Description { get; set; } = string.Empty;
}
}