feat(api,core,domain): Изменен контроллер RobotTaskRobotStatusController, метод изменения статуса задания вынесен в сервисы. Добавлена логика успрешного переименования шаблона.

This commit is contained in:
Mikhail Trubnikov
2026-07-23 14:39:55 +10:00
parent 58b4d98b16
commit b3879062a6
17 changed files with 313 additions and 55 deletions

View File

@@ -0,0 +1,13 @@
using PARR.Domain.Enums;
namespace PARR.Domain.DTOs.RobotTaskRobotStatus
{
/// <summary>
/// Изменить статус задания робота
/// </summary>
/// <param name="TaskId"></param>
/// <param name="RobotStatusCode"></param>
/// <param name="RobotId">Идентификатор робота</param>
/// <param name="RobotIp">IP адрес робота</param>
public record ChangeRobotStatus(Guid TaskId, RobotStatusEnum RobotStatusCode, string? RobotId, string? RobotIp);
}

View File

@@ -0,0 +1,23 @@
using PARR.Domain.DTOs.Shared;
namespace PARR.Domain.DTOs.RobotTaskRobotStatus
{
public record RobotConfigurationResult
{
public Guid Id { get; init; }
public DateTimeOffset DateCreated { get; init; }
public Guid TemplateId { get; init; }
public RobotDto? Robot { get; init; }
public RobotTaskStatusDto? TaskStatus { get; init; }
public RobotStatusDto? RobotStatus { get; init; }
public int AttemptsNumber { get; init; }
public DateTimeOffset? LastRobotStatusUpdated { get; init; }
}
}

View File

@@ -0,0 +1,9 @@
namespace PARR.Domain.DTOs.Shared
{
public record RobotDto
{
public int Code { get; init; }
public required string Name { get; init; }
public required string Description { get; init; }
}
}

View File

@@ -0,0 +1,9 @@
namespace PARR.Domain.DTOs.Shared
{
public record RobotStatusDto
{
public int Code { get; init; }
public string? Name { get; init; }
public string? Description { get; init; }
}
}

View File

@@ -0,0 +1,9 @@
namespace PARR.Domain.DTOs.Shared
{
public record RobotTaskStatusDto
{
public int Code { get; init; }
public required string Name { get; init; }
public required string Description { get; init; }
}
}