40 lines
999 B
C#
40 lines
999 B
C#
using System.Text.Json;
|
|
using Fleet.Core;
|
|
using MoShiro.Protocol;
|
|
|
|
namespace MoShiro.Backend.Application;
|
|
|
|
public sealed record TaskRecord(
|
|
TaskId Id,
|
|
string Scope,
|
|
NodeId? AgentId,
|
|
TaskId? BaseTaskId,
|
|
string Kind,
|
|
string? Target,
|
|
IReadOnlyDictionary<string, JsonElement> Params,
|
|
string Schedule,
|
|
bool Enabled,
|
|
long UpdatedAtMs,
|
|
long RowVersion);
|
|
|
|
public sealed record TestRecord(
|
|
TestId Id,
|
|
NodeId AgentId,
|
|
ProbeId ProbeId,
|
|
string Plan,
|
|
string ParamsJson,
|
|
string Trigger,
|
|
string Status,
|
|
string? ErrorCode,
|
|
int? Phase,
|
|
int PhaseCount,
|
|
long RequestedAtMs,
|
|
long? StartedAtMs,
|
|
long? FinishedAtMs,
|
|
string IpVersion = IpVersions.V4);
|
|
|
|
/// <summary>测试结果:指标与曲线都以 JSON 保存。</summary>
|
|
public sealed record TestResultRecord(TestId TestId, byte[] MetricsJson, byte[] SeriesJson);
|
|
|
|
public sealed record EventRecord(long Id, NodeId? AgentId, string Kind, long AtMs, string? Detail);
|