Currently, every record in the database has two structs associated with it because of how the diesel ORM handles things. I refer to these as 'Objects' - the structs that are used everywhere in the codebase (e.g. 'Post', 'Comment' etc.) and models - the structs that are only used as a query result (e.g. 'PostModel', 'CommentModel' etc.)
Currently, every record in the database has two structs associated with it because of how the diesel ORM handles things. I refer to these as 'Objects' - the structs that are used everywhere in the codebase (e.g. 'Post', 'Comment' etc.) and models - the structs that are only used as a query result (e.g. 'PostModel', 'CommentModel' etc.)
This is exactly backwards of what it should be.