using CommunityToolkit.Mvvm.ComponentModel; namespace DashCaddy.Desktop.ViewModels; public enum ServiceHealth { Healthy, Degraded, Unhealthy, Unknown } public partial class ServiceViewModel : ObservableObject { public string Id { get; set; } public string Name { get; set; } public string Type { get; set; } public string Url { get; set; } public int Port { get; set; } public string Host { get; set; } [ObservableProperty] private ServiceHealth _health; [ObservableProperty] private bool _isRunning; public ServiceModel ToServiceModel() => new() { Id = Id, Name = Name, Type = Type, Url = Url, Port = Port, Host = Host, Health = Health, State = IsRunning ? "running" : "stopped" }; }