Package com.example.restapi.model
Class Borrowing
java.lang.Object
com.example.restapi.model.Borrowing
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Bookprivate LocalDateTimeprivate Longprivate LocalDateTimeprivate User -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetBook()getId()getUser()voidsetReturnDate(LocalDateTime returnDate)
-
Field Details
-
id
-
user
-
book
-
borrowDate
-
returnDate
-
-
Constructor Details
-
Borrowing
public Borrowing() -
Borrowing
- Parameters:
user- the user borrowing the bookbook- the book being borrowed
-
-
Method Details
-
getId
- Returns:
- the borrowing record ID
-
getUser
- Returns:
- the
Userwho borrowed the book
-
getBook
- Returns:
- the
Bookthat was borrowed
-
getBorrowDate
- Returns:
- the borrow date and time
-
getReturnDate
- Returns:
- the return date and time, or
nullif not yet returned
-
setReturnDate
- Parameters:
returnDate- the return date and time
-