osl-vvce / zero-sama

A telegram bot for managing the weekly status sent by various members.
https://status.oslvvce.com
MIT License
0 stars 6 forks source link

Separate DB operations from application layer and create a Data layer #21

Open shreevari opened 2 years ago

shreevari commented 2 years ago

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