I have a next js application where user can upload video, watch video, like and dislike video, leave comment, and also send personal messages to other users.
should I have three main schemas for my application? one user Schema, and then a video Schema, and a message Schema
User schema: {userName, email, profilePic, token} //email is unique
Video schema: {videoId, videoPath, title, desc, likeCount[{email}], dislikeCount[{email}], comment[{email, content}]
Message schema: { conversationId, message: [ {email, content, timestamp] }
is this design okay? should I reduce my schema to only two schema and mix video schema with user schema, creating something like this:
User schema: {userName, email, profilePic, token, video: [videoId, videoPath, title, desc, likeCount[{email}], dislikeCount[{email}], comment[{email, content}] }
I am new to MongoDB, coming from SQL background. would appreciate any feedback, thank you.