feat(api,core,domain): Получение снапшотов работы роботов
This commit is contained in:
@@ -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; }
|
||||
}
|
||||
}
|
||||
26
PARR.Domain/DTOs/RobotSnapshotDTO/RobotSnapshotItemDto.cs
Normal file
26
PARR.Domain/DTOs/RobotSnapshotDTO/RobotSnapshotItemDto.cs
Normal 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; }
|
||||
}
|
||||
}
|
||||
15
PARR.Domain/DTOs/RobotSnapshotDTO/RobotSnapshotQuery.cs
Normal file
15
PARR.Domain/DTOs/RobotSnapshotDTO/RobotSnapshotQuery.cs
Normal 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; }
|
||||
}
|
||||
}
|
||||
25
PARR.Domain/DTOs/User/UserDto.cs
Normal file
25
PARR.Domain/DTOs/User/UserDto.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user