UofA-Blueprint / AlzheimerCalgary

0 stars 0 forks source link

Create CRUD endpoints for posts #73

Open Sooraj-beep opened 2 years ago

Sooraj-beep commented 2 years ago

Field

Endpoint GET ALL, POST, PUT, DELETE, GET ALL BY CLIENT ID Notes: GET ALL BY CLIENT ID would be slow since it takes quadratic time. In the future, we want to keep track of Post from Client.

dimassudjito commented 2 years ago

Possible ticket description:

GET ONE BY ID, GET ALL, POST, DELETE, UPDATE

Post schema:

Post_Type: Enum<ACTIVITY, TRAVEL_STATUS, MESSAGE> Activity_Name: String Description: String Participants: List // Client ID Media: List // List of S3 URL Timestamp: Time // Time of upload Notes:

Posts collection in MongoDB will contain different types of documents (activity, travel status, message) but it's possible to use only 1 Post.js schema in the backend. We can extend the schema once we want to use other type of posts.