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 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); /// 测试结果:指标与曲线都以 JSON 保存。 public sealed record TestResultRecord(TestId TestId, byte[] MetricsJson, byte[] SeriesJson); public sealed record EventRecord(long Id, NodeId? AgentId, string Kind, long AtMs, string? Detail);