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)
- Search for all requests that overlap with that time
- Aggregate all equipment encompassed in those requests
- 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
- 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
- The app compiles availability information for equipment at this timeframe
- User makes a request - request includes types of equipment requested but not specific items
- User submits request
- App records request in table of requests, and this request now limits equipment available to future users at this time.
- The user comes to pick up the equipment
- An admin issues equipment to the user
- 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
- The admin fulfilling the request can optionally change which items make up the request (being sure to check equipment availability in the admin dashboard)
- The user returns with the equipment
- The user can add comments on the equipment they borrowed. These comments attach to the specific pieces of equipment they took out