Overview
TheLibro interface represents a book in the virtual library system. It includes book metadata and relationships to authors and genres.
Interface Definition
Properties
Basic Properties
number
required
Unique identifier for the book. Auto-generated by the backend.
string
required
The book’s title.
string
Optional URL or path to the book’s cover image.
number
Optional publication year of the book.
boolean
required
Indicates whether the book is currently available for loan.
true if available, false if currently loaned out.Relationships
Autor[]
required
Array of authors who wrote this book. A book can have multiple authors. See Autor interface.
Usage Examples
Fetching All Books
Creating a New Book
Updating a Book
Deleting a Book
Filtering Available Books
Related Interfaces
- Autor - Book author interface
- Genero - Book genre interface
- Prestamo - Loan interface that references Libro
Related Services
- LibroService - Service for book CRUD operations
Notes
The
disponible field is automatically updated by the backend when a loan is approved or a book is returned.