Finished implementing the stats updating, just need to implement the new model methods. Added a notes file.

This commit is contained in:
Daniel Ledda
2020-06-24 23:30:30 +02:00
parent df2c6c95bd
commit c13ac5f12b
6 changed files with 273 additions and 150 deletions

7
notes.txt Normal file
View File

@@ -0,0 +1,7 @@
- Make a whole new class for each model called "Player", "DbUser", etc. and wrap mongoose completely.
- Create a corresponding namespace "PlayerCollection", "DbUserCollection", etc. for the database model itself and its
corresponding methods.
- Decide on whether to always use the namespace to call methods and pass an id, with the returned objects "Player",
"DbUser", etc. all being immutable object copies with limited attributes and no methods, or actually create extra
classes that have methods that can be called (right now thinking the first idea is better).
-> This way will be completely decoupled from Mongoose and MongoDB and will have full control.