Files
MoShiro/backend/src/MoShiro.Backend.Application/Models/TaskAndTestModels.cs
T
justme 0eda0600cc
ci/woodpecker/pr/verify Pipeline was successful
ci/woodpecker/pr/web-build Pipeline was successful
shared: add independent IPv4 and IPv6 collection [CI]
2026-10-07 11:44:01 +08:00

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);