58 lines
1.4 KiB
C#
58 lines
1.4 KiB
C#
using System.Text.Json.Serialization;
|
||
|
||
namespace EveryPublish.Client.Models;
|
||
|
||
/// <summary>agent-core 写入的 local.json(随机端口 + token)</summary>
|
||
public class LocalInfo
|
||
{
|
||
[JsonPropertyName("port")]
|
||
public int Port { get; set; }
|
||
|
||
[JsonPropertyName("token")]
|
||
public string Token { get; set; } = "";
|
||
}
|
||
|
||
/// <summary>核心状态(/status 返回)</summary>
|
||
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; } = "";
|
||
}
|
||
|
||
/// <summary>挑战(/challenges 返回,与 shared/proto.Challenge 一致)</summary>
|
||
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; }
|
||
}
|