using System.Text.Json.Serialization;
namespace EveryPublish.Client.Models;
/// agent-core 写入的 local.json(随机端口 + token)
public class LocalInfo
{
[JsonPropertyName("port")]
public int Port { get; set; }
[JsonPropertyName("token")]
public string Token { get; set; } = "";
}
/// 核心状态(/status 返回)
public class CoreStatus
{
[JsonPropertyName("online")]
public bool Online { get; set; }
[JsonPropertyName("session")]
public string Session { get; set; } = "";
[JsonPropertyName("server")]
public string Server { get; set; } = "";
[JsonPropertyName("deviceId")]
public long DeviceId { get; set; }
[JsonPropertyName("name")]
public string Name { get; set; } = "";
}
/// 挑战(/challenges 返回,与 shared/proto.Challenge 一致)
public class ChallengeItem
{
[JsonPropertyName("challengeId")]
public string ChallengeId { get; set; } = "";
[JsonPropertyName("accountId")]
public string AccountId { get; set; } = "";
[JsonPropertyName("platform")]
public string Platform { get; set; } = "";
[JsonPropertyName("kind")]
public string Kind { get; set; } = "";
[JsonPropertyName("qrToken")]
public string QrToken { get; set; } = "";
[JsonPropertyName("prompt")]
public string Prompt { get; set; } = "";
[JsonPropertyName("expiresAt")]
public long ExpiresAt { get; set; }
}