Currently, all db operations happen inline embedded within application logic. Create a data layer with common db operations on every model/entity and use these appropriately in the application layer.
Example directory structure:
data
- member.ts
- message.ts
- ...
member.ts(and others) should have get, update, delete functions
Currently, all db operations happen inline embedded within application logic. Create a data layer with common db operations on every model/entity and use these appropriately in the application layer.
Example directory structure:
member.ts
(and others) should haveget
,update
,delete
functions