What we need to store?
-
User
- id - int
- name - string
- email - string
- password - string (hashed)
- role - enum [user, admin] default user
- status - enum [pending, approved, block, decline]
- timestamp
-
Article
- id - int
- title - string
- body - text
- cover - string
- status - enum [draft, published] default draft
- authorId - relation with user
- timestamp
-
Comment
- id - int
- body - text
- authorId - relation with user
- articleId - relation with article
- status - enum [public, private]
- timestamp
How to store data?