using Newtonsoft.Json; namespace Aivfo.OperationLog { /// /// 操作日志消息 —— 字段对齐 Kafka topic tl-oplog 的 JSON schema(camelCase), /// 与 Java OperationLogMessage / aivfo-oplog 消费端一致。 /// public sealed class OperationLogMessage { /// 全链路串联 ID [JsonProperty("traceId")] public string TraceId { get; set; } /// 父子调用链 ID [JsonProperty("parentId")] public string ParentId { get; set; } /// 操作时间(epoch 毫秒) [JsonProperty("time")] public long Time { get; set; } /// 端/服务(operate / front …) [JsonProperty("project")] public string Project { get; set; } /// 功能模块(可读:对焦 / 串口 …) [JsonProperty("module")] public string Module { get; set; } /// 操作(可读:一键标定 / 打开端口 …) [JsonProperty("operation")] public string Operation { get; set; } /// 操作者(登录用户 / 系统 / 设备 SN) [JsonProperty("operator")] public string Operator { get; set; } /// 输入(JSON 串;大对象只记关键信息) [JsonProperty("input")] public string Input { get; set; } /// 输出(JSON 串;同上) [JsonProperty("output")] public string Output { get; set; } /// 结果(成功 / 失败) [JsonProperty("result")] public string Result { get; set; } /// 报错(消息 + 堆栈摘要) [JsonProperty("error")] public string Error { get; set; } /// 耗时(毫秒) [JsonProperty("elapsedMs")] public long? ElapsedMs { get; set; } /// 级别(INFO 操作级 / DEBUG 调试级) [JsonProperty("level")] public string Level { get; set; } /// 舱号(消费端为 Integer) [JsonProperty("houseSn")] public int? HouseSn { get; set; } /// well 号 [JsonProperty("wellSn")] public int? WellSn { get; set; } /// 培养箱 SN [JsonProperty("tlSn")] public string TlSn { get; set; } /// 来源主机 [JsonProperty("host")] public string Host { get; set; } } }