Commit Inicial: Se definen tecnologías y modelos de datos.
This commit is contained in:
9
backend/Models/Disco.cs
Normal file
9
backend/Models/Disco.cs
Normal 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
26
backend/Models/Equipo.cs
Normal 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();
|
||||
}
|
||||
}
|
||||
12
backend/Models/HistorialEquipo.cs
Normal file
12
backend/Models/HistorialEquipo.cs
Normal 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; }
|
||||
}
|
||||
}
|
||||
18
backend/Models/MemoriaRam.cs
Normal file
18
backend/Models/MemoriaRam.cs
Normal 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
8
backend/Models/Sector.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
namespace Inventario.API.Models
|
||||
{
|
||||
public class Sector
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Nombre { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
9
backend/Models/Usuario.cs
Normal file
9
backend/Models/Usuario.cs
Normal 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; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user