defining the final API endpoinst and implementing database operations on user, books, lend models