Class Borrowing

java.lang.Object
com.example.restapi.model.Borrowing

@Entity public class Borrowing extends Object
  • Field Details

  • Constructor Details

    • Borrowing

      public Borrowing()
    • Borrowing

      public Borrowing(User user, Book book)
      Parameters:
      user - the user borrowing the book
      book - the book being borrowed
  • Method Details

    • getId

      public Long getId()
      Returns:
      the borrowing record ID
    • getUser

      public User getUser()
      Returns:
      the User who borrowed the book
    • getBook

      public Book getBook()
      Returns:
      the Book that was borrowed
    • getBorrowDate

      public LocalDateTime getBorrowDate()
      Returns:
      the borrow date and time
    • getReturnDate

      public LocalDateTime getReturnDate()
      Returns:
      the return date and time, or null if not yet returned
    • setReturnDate

      public void setReturnDate(LocalDateTime returnDate)
      Parameters:
      returnDate - the return date and time