Commit Inicial: Se definen tecnologías y modelos de datos.

This commit is contained in:
2025-10-02 14:48:37 -03:00
commit 80eeac45d8
22 changed files with 4919 additions and 0 deletions

9
backend/Models/Disco.cs Normal file
View File

@@ -0,0 +1,9 @@
namespace Inventario.API.Models
{
public class Disco
{
public int Id { get; set; }
public string Mediatype { get; set; } = string.Empty;
public int Size { get; set; }
}
}

26
backend/Models/Equipo.cs Normal file
View File

@@ -0,0 +1,26 @@
namespace Inventario.API.Models
{
public class Equipo
{
public int Id { get; set; }
public string Hostname { get; set; } = string.Empty;
public string Ip { get; set; } = string.Empty;
public string? Mac { get; set; } // Mac puede ser nulo, así que usamos string?
public string Motherboard { get; set; } = string.Empty;
public string Cpu { get; set; } = string.Empty;
public int Ram_installed { get; set; }
public int? Ram_slots { get; set; } // Puede ser nulo
public string Os { get; set; } = string.Empty;
public string Architecture { get; set; } = string.Empty;
public DateTime Created_at { get; set; }
public DateTime Updated_at { get; set; }
public int? Sector_id { get; set; } // Puede ser nulo
// Propiedades de navegación (no mapeadas directamente a la BD)
public Sector? Sector { get; set; }
public List<Usuario> Usuarios { get; set; } = new();
public List<Disco> Discos { get; set; } = new();
public List<MemoriaRamDetalle> MemoriasRam { get; set; } = new();
public List<HistorialEquipo> Historial { get; set; } = new();
}
}

View File

@@ -0,0 +1,12 @@
namespace Inventario.API.Models
{
public class HistorialEquipo
{
public int Id { get; set; }
public int Equipo_id { get; set; }
public string Campo_modificado { get; set; } = string.Empty;
public string? Valor_anterior { get; set; }
public string? Valor_nuevo { get; set; }
public DateTime Fecha_cambio { get; set; }
}
}

View File

@@ -0,0 +1,18 @@
// Este modelo representa la tabla memorias_ram
namespace Inventario.API.Models
{
public class MemoriaRam
{
public int Id { get; set; }
public string? Part_number { get; set; }
public string? Fabricante { get; set; }
public int Tamano { get; set; }
public int? Velocidad { get; set; }
}
// Este es un modelo combinado para devolver la información completa al frontend
public class MemoriaRamDetalle : MemoriaRam
{
public string Slot { get; set; } = string.Empty;
}
}

8
backend/Models/Sector.cs Normal file
View File

@@ -0,0 +1,8 @@
namespace Inventario.API.Models
{
public class Sector
{
public int Id { get; set; }
public string Nombre { get; set; } = string.Empty;
}
}

View File

@@ -0,0 +1,9 @@
namespace Inventario.API.Models
{
public class Usuario
{
public int Id { get; set; }
public string Username { get; set; } = string.Empty;
public string? Password { get; set; }
}
}