This commit is contained in:
RodoIsAlnum
2025-10-28 20:59:38 -06:00
parent fef5ca6aa6
commit 10c131cd47
329 changed files with 3454 additions and 303 deletions

View File

@@ -5,13 +5,13 @@ namespace BibliotecaAPI.Models
public class Libro
{
[Key]
public int IdLibro { get; set; }
public int Id_Libro { get; set; }
public string Titulo { get; set; } = string.Empty;
public string Autor { get; set; } = string.Empty;
public string ISBN { get; set; } = string.Empty;
public int Ano { get; set; }
public string Categoria { get; set; } = string.Empty;
public int CopiasDisponibles { get; set; }
public int Copias_Disponibles { get; set; }
public ICollection<Prestamo> Prestamos {get;set;}
}

View File

@@ -21,13 +21,19 @@ namespace BibliotecaAPI.Models
public DateTime FechaPrestamo { get; set; } = DateTime.Now;
public DateTime? FechaDevolucion { get; set; }
public bool Devuelto { get; set; } = false;*/
public int IdPrestamo { get; set; }
public int IdUsuario { get; set; }
public int IdLibro { get; set; }
public DateTime FechaPrestamo { get; set; }
public bool Devuelto {get;set;}
[Key]
public int Id_Prestamo { get; set; }
[ForeignKey(nameof(Libro))]
public int Id_Libro { get; set; } // FK
//public Libro Libro { get; set; } // Propiedad de navegación
[ForeignKey(nameof(Usuario))]
public int Id_Usuario { get; set; } // FK
//public Usuario Usuario { get; set; } // Propiedad de navegación
public DateTime Fecha_Prestamo { get; set; }
public bool Devuelto { get; set; }
public Usuario Usuario { get; set; }
public Libro Libro { get; set; }
}
}

View File

@@ -5,10 +5,10 @@ namespace BibliotecaAPI.Models
public class Usuario
{
[Key]
public int IdUsuario { get; set; }
public int Id_Usuario { get; set; }
public string Nombre { get; set; } = string.Empty;
public string Apellido { get; set; } = string.Empty;
public DateTime FechaRegistro { get; set; }
public DateTime Fecha_Registro { get; set; }
public ICollection<Prestamo> Prestamos {get;set;}
}