using System.ComponentModel.DataAnnotations;

namespace Watcher.ViewModels
{
    public class EditServerViewModel
    {
        public int Id { get; set; }

        [Required(ErrorMessage = "Name ist erforderlich")]
        public required string Name { get; set; }

        [Required(ErrorMessage = "IP-Adresse ist erforderlich")]
        [RegularExpression(@"^(?:[0-9]{1,3}\.){3}[0-9]{1,3}$", ErrorMessage = "Ungültige IP-Adresse")]
        public required string IPAddress { get; set; }

        [Required(ErrorMessage = "Typ ist erforderlich")]
        public required string Type { get; set; }

        // Hardware Measurment Warning/Crit Values
        public double CpuLoadWarning { get; set; } = 75.0;
        public double CpuLoadCritical { get; set; } = 90.0;
        public double CpuTempWarning { get; set; } = 80.0;
        public double CpuTempCritical { get; set; } = 90.0;

        public double RamLoadWarning { get; set; } = 85.0;
        public double RamLoadCritical { get; set; } = 95.0;

        public double GpuLoadWarning { get; set; } = 75.0;
        public double GpuLoadCritical { get; set; } = 90.0;
        public double GpuTempWarning { get; set; } = 70.0;
        public double GpuTempCritical { get; set; } = 80.0;

        public double DiskUsageWarning { get; set; } = 75.0;
        public double DiskUsageCritical { get; set; } = 90.0;
        public double DiskTempWarning { get; set; } = 34.0;
        public double DiskTempCritical { get; set; } = 36.0;
    }
}