See the relevant output requested in the respective responses, sql, and types
directory.
I used screenshots from the app to arrive at these action
specific structures in the responses
directory.
I used typescript
to construct the interfaces for the models in the types
directory.
I used pseudo
code to contruct the queries in the sql
directory. The joins are definitely not correct and the in
operator is probably not the best, but I didn't have time to create the ddls to optimize.