Skip to content
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

Open
wants to merge 4 commits into
base: development
Choose a base branch
from

Conversation

RheaWu1212
Copy link
Contributor

Description

building newLesson schema and set up db
Or Implements # (WBS) 6.2.1

@RheaWu1212 RheaWu1212 added the Do Not Review Do not review or look at code without full context label Dec 2, 2023
relatedProject: { type: mongoose.SchemaTypes.ObjectId, ref: 'project', required: true },
});

module.exports = mongoose.model('buildingNewLesson', buildingNewLesson, 'buildingNewLesson');
Copy link
Contributor

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 },
Copy link
Contributor

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

Copy link
Contributor

@tdkent tdkent left a 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.

@one-community one-community added the Needs New Developer This is a PR that is partially developed but needs someone new to take it over and finish it. label Jul 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Do Not Review Do not review or look at code without full context Needs New Developer This is a PR that is partially developed but needs someone new to take it over and finish it.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants