using System.Collections.Generic; using System.Text.Json.Serialization; namespace DashCaddy.Desktop.Models; public class ServiceModel { [JsonPropertyName("id")] public string Id { get; set; } [JsonPropertyName("name")] public string Name { get; set; } [JsonPropertyName("type")] public string Type { get; set; } [JsonPropertyName("url")] public string Url { get; set; } [JsonPropertyName("port")] public int Port { get; set; } [JsonPropertyName("host")] public string Host { get; set; } [JsonPropertyName("health")] public string Health { get; set; } [JsonPropertyName("state")] public string State { get; set; } [JsonPropertyName("environment")] public Dictionary Environment { get; set; } = new(); [JsonPropertyName("volumes")] public List Volumes { get; set; } = new(); [JsonPropertyName("labels")] public Dictionary Labels { get; set; } = new(); [JsonPropertyName("image")] public string Image { get; set; } [JsonPropertyName("composeFile")] public string ComposeFile { get; set; } } public class HealthResponse { [JsonPropertyName("status")] public string Status { get; set; } [JsonPropertyName("dns")] public string Dns { get; set; } [JsonPropertyName("certs")] public string Certs { get; set; } [JsonPropertyName("certsDaysRemaining")] public int CertsDaysRemaining { get; set; } [JsonPropertyName("services")] public ServiceHealthSummary[] Services { get; set; } } public class ServiceHealthSummary { [JsonPropertyName("id")] public string Id { get; set; } [JsonPropertyName("name")] public string Name { get; set; } [JsonPropertyName("health")] public string Health { get; set; } [JsonPropertyName("lastCheck")] public string LastCheck { get; set; } } public class ComposeService { public string Name { get; set; } public string Image { get; set; } public Dictionary Ports { get; set; } = new(); public Dictionary Environment { get; set; } = new(); public List Volumes { get; set; } = new(); public Dictionary Labels { get; set; } = new(); public Dictionary Deploy { get; set; } = new(); } public class ComposeFile { public string Version { get; set; } public Dictionary Services { get; set; } = new(); public Dictionary Networks { get; set; } = new(); public Dictionary Volumes { get; set; } = new(); }