Request, checkout, and equipment availability flow - JumboCode/TUTV GitHub Wiki

Schema notes

1. “Types of equipment”

Attributes:

  • id
  • name (“32 GB SD card”)
  • Possibly others

Computable properties

This information would be easily computable at runtime from existing database information, but not directly stored.

  • count (search for “specific items” linked to this type)
  • count available at any given time (procedure follows)
    1. Search for all requests that overlap with that time
    2. Aggregate all equipment encompassed in those requests
    3. Subtract total equipment that's reserved during this time from total inventory numbers

2. “Specific items”

Attributes:

  • id (unique)
  • type - linked to “types of equipment”
  • comments

3. “Requests”

Attributes:

  • user making the request - linked to user table
  • start time
  • end time
  • equipment - array linked to “types of equipment”

Flow for checkout

  1. When a user begins an equipment request, they must fill out start and end time, since this information affects which pieces of equipment are available
  2. The app compiles availability information for equipment at this timeframe
  3. User makes a request - request includes types of equipment requested but not specific items
  4. User submits request
  5. App records request in table of requests, and this request now limits equipment available to future users at this time.
  6. The user comes to pick up the equipment
  7. An admin issues equipment to the user
  8. The admin records (by some process — qr codes?) which specific items were given to fulfill this request; this information is stored on the request entry
  9. The admin fulfilling the request can optionally change which items make up the request (being sure to check equipment availability in the admin dashboard)
  10. The user returns with the equipment
  11. The user can add comments on the equipment they borrowed. These comments attach to the specific pieces of equipment they took out