No, what I'm describing is functions in a selector.py, like: def get_orders_for_date(date) -> Order:
where Order is a pydantic model, not a fat django model. Other modules shouldn't know about my internal database.
All other modules should use functions from this selector.py, they aren't allowed to use the OrderModel themselves directly, only the pydantic class. Because otherwise you end up with spaghetti.
where Order is a pydantic model, not a fat django model. Other modules shouldn't know about my internal database. All other modules should use functions from this selector.py, they aren't allowed to use the OrderModel themselves directly, only the pydantic class. Because otherwise you end up with spaghetti.