using System.ComponentModel.DataAnnotations;
using System.Text.Json.Serialization;

namespace RobotNet.RobotManager.Services.OpenACS;
public class TrafficACSResult
{
    public static string GO => "go";
    public static string NO => "no";
}
public class TrafficACSResponse
{
    [JsonPropertyName("time")]
    public string Time { get; set; } = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff");

    [JsonPropertyName("agv_id")]
    public string AgvId { get; set; } = string.Empty;

    [JsonPropertyName("traffic_zone_id")]
    [Required]
    public string TrafficZoneId { get; set; } = string.Empty;

    [JsonPropertyName("inout")]
    [Required]
    public string InOut { get; set; } = string.Empty;

    [JsonPropertyName("result")]
    [Required]
    public string Result { get; set; } = string.Empty;
}


public class TrafficACSResponseBody
{

    [JsonPropertyName("agv_id")]
    [Required]
    public string AgvId { get; set; } = string.Empty;

    [JsonPropertyName("traffic_zone_id")]
    [Required]
    public string TrafficZoneId { get; set; } = string.Empty;

    [JsonPropertyName("inout")]
    [Required]
    public string InOut { get; set; } = string.Empty;

    [JsonPropertyName("result")]
    [Required]
    public string Result { get; set; } = string.Empty;
}

public class TrafficACSResponseV2
{

    [JsonPropertyName("header")]
    [Required]
    public ACSHeader Header { get; set; } = new("TRAFFIC_RES", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff"));

    [JsonPropertyName("body")]
    [Required]
    public TrafficACSResponseBody Body { get; set; } = new();
}