-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rhea building newLesson schema and set up db #635
base: development
Are you sure you want to change the base?
Conversation
relatedProject: { type: mongoose.SchemaTypes.ObjectId, ref: 'project', required: true }, | ||
}); | ||
|
||
module.exports = mongoose.model('buildingNewLesson', buildingNewLesson, 'buildingNewLesson'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change to:
module.exports = mongoose.model('buildingNewLesson', buildingNewLesson, 'buildingNewLessons');
date: { type: Date, required: true, default: Date.now() }, | ||
author: { type: mongoose.SchemaTypes.ObjectId, ref: 'userProfile', required: true }, | ||
tag: [{ type: String, required: true, maxLength: 10 }], | ||
relatedProject: { type: mongoose.SchemaTypes.ObjectId, ref: 'project', required: true }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please change to:
relatedProject: { type: mongoose.SchemaTypes.ObjectId, ref: 'buildingProjects', required: true },
Note: You will need to update your dummy data to ref docs in the buildingProjects collection
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, looks great. I have a few change requests that I've added as comments.
Description
building newLesson schema and set up db
Or Implements # (WBS) 6.2.1