<Account> rents <item> starting at <date> and due at <due date>/items/list
?filter=<boardgame|calculator|...>?page=n&limit=m pagination data?sort=<title | availability | rentals> optional sort info/items/<item_id>
nameid: unique to each copy of each itemcategorylast_rented_at (to help with caching)is_rented, due_at, is_overdue/items/board-games/list
/items/list/items/board-games/<item-id>
item_idbgg_id: a string ID identifying the item within the BoardGamesGeek database.physical_locationbelongs_toowner_club_id (i.e. mathsoc, watsfic)board_games table record’s ID; omitted to reduce confusion/metrics
?category=<boardgame|calculator|...> optional query param to filter by item type&metric=<rentals|unique_renters|avg_duration> required query param to determine the metric&page=n&limit=m optional pagination data (defaults to first page of limit 20)&id=<item id> optional ID to return the metric for a single itemvolunteer@mathsoc.uwaterloo.caHigh-level
rentalsA rental tracks a single individual renting one physical copy.
It should point to the exact copy being checked out, not just the item/title, so availability, return history, and inventory state stay tied to the correct physical object.
Rental policy rules (due_date is computed from checkout_date using the applicable policy by item type; may be manually overridden for approved exceptions):
checkout_date + 3 dayscheckout_date + 14 dayscheckout_date + 31 days| Column name | Type | Notes | Example |
|---|---|---|---|
| id | UUID | primary key | |
| non-null | |||
| copy_id | UUID | foreign key to copies.id | |
| non-null | |||
| indexed | |||
| renter_email | string | [email] | |
| non-null | |||
| indexed | gfeng@uwaterloo.ca | ||
| renting_club_idorganization | string | nullable (club / organization if applicable) nullable FK to clubs.id if rented on behalf of a club/organization | CSC |
| checkout_date | datetime | non-null | March 7, 2026 |
| due_date | datetime | non-null; computed from rental policy by item type, but can be manually overriden for approved exceptions | April 1, 2026 |
| date_returned | datetime | nullable until returned | March 25, 2026 |
| status | enum: ACTIVE, RETURNED, OVERDUE, CANCELLED | non-null (makes filtering rentals easier) | ACTIVE |
| created_at | datetime | non-null | |
| updated_at | datetime | non-null | |
| deleted_at | datetime | nullable |