using RobotNet10.FleetManager.Services.TrafficControl.ACS;
namespace RobotNet10.FleetManager.Services.TrafficControl.Models;
///
/// State information for an order managed by ACS Order Control
///
public class OrderACSState
{
///
/// Robot ID
///
public string RobotId { get; set; } = string.Empty;
///
/// Order status
///
public OrderStatus Status { get; set; } = OrderStatus.IsProccessing;
///
/// Full route (Base + Horizon)
///
public RobotRoute Route { get; set; } = new();
///
/// Set of zone IDs that have been successfully requested (RequestIn completed)
///
public HashSet ZoneRequestInCompleted { get; set; } = [];
///
/// Set of zone IDs that have been successfully requested (RequestOut completed)
///
public HashSet ZoneRequestOutCompleted { get; set; } = [];
///
/// Set of region IDs needs to be successfully requested. (IN)
///
public HashSet ZoneRequestInCompleting { get; set; } = [];
///
/// Set of region IDs needs to be successfully requested. (OUT)
///
public HashSet ZoneRequestOutCompleting { get; set; } = [];
///
/// Error message if status is IsError
///
public string? Error { get; set; }
///
/// List of nodes that are mapped to ACS zones for RequestIn (in order of appearance in route)
/// Each entry contains: (NodeIdString, ZoneId)
///
public List<(string NodeIdString, string ZoneId)> InMappedNodes { get; set; } = [];
///
/// List of nodes that are mapped to ACS zones for RequestOut (in order of appearance in route)
/// Each entry contains: (NodeIdString, ZoneId)
///
public List<(string NodeIdString, string ZoneId)> OutMappedNodes { get; set; } = [];
///
/// Index of the current IN mapped node being processed
///
public int CurrentInMappedNodeIndex { get; set; } = 0;
///
/// Timestamp when order was created
///
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
///
/// Last update timestamp
///
public DateTime LastUpdated { get; set; } = DateTime.UtcNow;
}