winbrew_models\reporting/
diagnostics.rs

1//! Diagnostic records produced by health and repair scans.
2
3use serde::{Deserialize, Serialize};
4
5/// Diagnostic severity used by health reports.
6#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Serialize, Deserialize)]
7#[serde(rename_all = "lowercase")]
8pub enum DiagnosisSeverity {
9    /// A failing condition that should be treated as an error.
10    Error,
11    /// A non-fatal condition that may still require attention.
12    Warning,
13}
14
15/// A single diagnostic entry emitted by the doctor scan pipeline.
16#[derive(Debug, Clone, PartialEq, Eq, Serialize)]
17pub struct DiagnosisResult {
18    /// Stable machine-readable code for the diagnostic.
19    pub error_code: String,
20    /// Human-readable description of the problem.
21    pub description: String,
22    /// Diagnostic severity.
23    pub severity: DiagnosisSeverity,
24}