ban custom SQL queries, create a model to handle the work, and make it compatible with pg