feat(api,core,domain): Изменен контроллер RobotTaskRobotStatusController, метод изменения статуса задания вынесен в сервисы. Добавлена логика успрешного переименования шаблона.
This commit is contained in:
13
PARR.Domain/DTOs/RobotTaskRobotStatus/ChangeRobotStatus.cs
Normal file
13
PARR.Domain/DTOs/RobotTaskRobotStatus/ChangeRobotStatus.cs
Normal 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);
|
||||
}
|
||||
@@ -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; }
|
||||
}
|
||||
}
|
||||
9
PARR.Domain/DTOs/Shared/RobotDto.cs
Normal file
9
PARR.Domain/DTOs/Shared/RobotDto.cs
Normal 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; }
|
||||
}
|
||||
}
|
||||
9
PARR.Domain/DTOs/Shared/RobotStatusDto.cs
Normal file
9
PARR.Domain/DTOs/Shared/RobotStatusDto.cs
Normal 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; }
|
||||
}
|
||||
}
|
||||
9
PARR.Domain/DTOs/Shared/RobotTaskStatusDto.cs
Normal file
9
PARR.Domain/DTOs/Shared/RobotTaskStatusDto.cs
Normal 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; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user