Goal for this part
Implement checkout and return. Members borrow when copies remain, receive a due date (14 days), and return from a My loans tab.
Concepts: derived availability
Keep books.copies as owned inventory. Open loans (returned_at IS NULL) reduce availability. Do not decrement the copies column on borrow—that makes returns and audits harder.
How to run it and what you should see
As Grace, borrow an available title, see it under My loans, return it, and watch availability rise. Attempting to borrow when no copies remain should show an error.