namespace SHH.CameraDashboard;

/// <summary>
/// 在线客户端信息模型 (已更新)
/// </summary>
public class ConnectedClient
{
    /// <summary> 唯一标识 (AppId) </summary>
    public string ServiceId { get; set; } = string.Empty;

    /// <summary> 版本号 </summary>
    public string Version { get; set; } = "1.0.0";

    /// <summary> 远程进程 ID </summary>
    public int Pid { get; set; }

    /// <summary> 客户端 IP </summary>
    public string Ip { get; set; } = string.Empty;

    /// <summary> WebAPI 端口 (Dashboard 调用 REST 接口用) </summary>
    public int WebPort { get; set; }

    /// <summary> 该客户端正在推流的目标地址 </summary>
    public List<string> TargetVideoNodes { get; set; } = new List<string>();

    public DateTime LastHeartbeat { get; set; }

    // 辅助属性：拼接出完整的 API BaseUrl
    public string WebApiUrl => $"http://{Ip}:{WebPort}";
}