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

namespace watcher_monitoring.Models;

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

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

    [Required]
    // TODO: [RegularExpression("^(((?!25?[6-9])[12]\d|[1-9])?\d\.?\b){4}$")]
    public required string IPAddress { get; set; }

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

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

    public string State { get; set; }

    public DateTime LastSeen { get; set; }

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