A
A
Alexander2021-06-03 13:00:14
MongoDB
Alexander, 2021-06-03 13:00:14

How to create Post Schema in mongoose?

Hello, I want to create a document model for a post in which there should be a rating, for example, likes and reposts, and which should store an array of c id users and a counter for the length of these arrays to display numbers on the front, how to implement this correctly, was it worth creating a separate type of model for the rating of a post and how to link it together with the model of the post itself? I will be grateful for help

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question