I currently am working on a SQL-Alchemy app using flask and flask-db and have been scratching my head with how to solve this question, my models looks like the below;