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

namespace RobotNet.RobotManager.Services.OpenACS;

public class RobotPublishStatusBody
{
    [JsonPropertyName("agv_id")]
    [Required]
    public string Id { get; set; } = "";

    [JsonPropertyName("state")]
    [Required]
    public string State { get; set; } = "-1";

    [JsonPropertyName("site_code")]
    [Required]
    public string SiteCode { get; set; } = "";

    [JsonPropertyName("area_code")]
    [Required]
    public string AreaCode { get; set; } = "";

    [JsonPropertyName("area_name")]
    [Required]
    public string AreaName { get; set; } = "";

    [JsonPropertyName("location")]
    [Required]
    public AGVLocation Location { get; set; } = new();

    [JsonPropertyName("marker_id")]
    [Required]
    public string? MarkerId { get; set; }

    [JsonPropertyName("battery_level")]
    [Required]
    public string BatteryLevel { get; set; } = "0";

    [JsonPropertyName("battery_voltage")]
    [Required]
    public string BatteryVoltage { get; set; } = "0";

    [JsonPropertyName("battery_current")]
    [Required]
    public string BatteryCurrent { get; set; } = "0";

    [JsonPropertyName("battery_temperature")]
    [Required]
    public string BatteryTemprature { get; set; } = "0";

    [JsonPropertyName("battery_id")]
    [Required]
    public string? BatteryId { get; set; }

    [JsonPropertyName("battery_soh")]
    [Required]
    public string? BatterySOH { get; set; } = "0";

    [JsonPropertyName("loading")]
    [Required]
    public string Loading { get; set; } = "0";

    [JsonPropertyName("error_code")]
    [Required]
    public string? ErrorCode { get; set; }

    [JsonPropertyName("station_id")]
    [Required]
    public string? StationId { get; set; }
}
