using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace Watcher.Models;

public class Server
{
    // System Infos
    [Key]
    [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
    public int Id { get; set; }

    [Required]
    public required string Name { get; set; }

    public required string IPAddress { get; set; }

    public required string Type { get; set; }

    public string? Description { get; set; } = String.Empty;


    // Hardware Infos
    public string? CpuType { get; set; } = string.Empty;
    public int CpuCores { get; set; } = 0;
    public string? GpuType { get; set; } = string.Empty;
    public double RamSize { get; set; } = 0;
    public string? DiskSpace { get; set; } = string.Empty;


    // 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;


    // Database
    public DateTime CreatedAt { get; set; } = DateTime.UtcNow;

    public bool IsOnline { get; set; } = false;

    public DateTime LastSeen { get; set; }

    public bool IsVerified { get; set; } = false;

}
