Files
MoShiro/backend/src/MoShiro.Backend.Application/Models/TaskAndTestModels.cs
T
justme 2e146d4da7
ci/woodpecker/push/main-amd64-build Pipeline was successful
refactor!: rename the project from Monitor to MoShiro [CI]
Namespaces, assemblies, solution, binaries, images, systemd units, config paths, environment variables, protocol methods and the Linux user are all renamed. Breaking: existing databases, node identities and installed units must be recreated.
2026-10-07 02:03:25 +08:00

39 lines
961 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);
/// <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);