csmith111 / mentoring-1-forum

Forum
0 stars 0 forks source link

Add mongoose model for topics #1

Open ghost opened 7 years ago

ghost commented 7 years ago

There are such fields:

Also there is a list of comments:

csmith111 commented 7 years ago

This is done. Please review before we close the topic.

ghost commented 7 years ago

You should have models in separate files: models/topic.js models/user.js

In future this files can be pretty large, because of instance and schema methods.

csmith111 commented 7 years ago

I seperated the user into a file so I know how to split the schema across multiple files. The other file is still call forum.js since it contains the schema for both topics and comments. If this ok, then we can close this. You should see the files: models/forum.js models/user.js