-
Notifications
You must be signed in to change notification settings - Fork 9
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
Monitor GradTrak #742
base: gql
Are you sure you want to change the base?
Monitor GradTrak #742
Conversation
name?: string; | ||
courses: SelectedCourseType[]; | ||
user_email: string; | ||
term?: { |
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.
I would suggest storing the year
and semester
flat here rather than nested within term
as year
and planTerm
. We use this same standard throughout the rest of the collections.
|
||
export const gradtrakSchema = new Schema( | ||
{ | ||
user_email: { |
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.
I would stick with a standard for casing, and I'd suggest camelCase
instead of snake_case
.
}); | ||
|
||
export const selectedCourseSchema = new Schema({ | ||
class_ID: { |
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.
If you are storing classes, then you should probably reference the schedule schema. If you are only storing courses (which is probably the only thing necessary to start), then you only need to store the courseId
and not any of the class or section identifiers.
required: false, | ||
alias: "name", | ||
}, | ||
location: { |
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.
I would assume some of this additional information (location
, start_time
, end_time
, days_of_week
) probably isn't required for GradTrak because it doesn't deal with data of that specificity.
createdAt: Date; | ||
updatedAt: Date; | ||
} | ||
export const GradtrakModel = mongoose.model<GradtrakType>('gradtrak', gradtrakSchema); |
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.
I would also suggest naming this PlanModel
instead of Gradtrak
to keep the terminology generic.
""" | ||
Deletes gradtrak, for testing purposes | ||
""" | ||
deleteGradtrak: String @auth |
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.
I would suggest naming this Term
and not Gradtrak
like I was talking about before.
""" | ||
Takes in a new college, switches the user's college requirements | ||
""" | ||
changeGradtrakCollege(college: Colleges!): Gradtrak @auth |
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.
I would suggest switching to a generic updatePlan
that takes in a new college and any other plan-specific fields rather than an endpoint for every action.
* minor changes * feat: Init grade distributions * feat: Dynamic inputs for grade distribution comparison * change gradtrak to plan * replace changePlanCollege and editMajorRequirements with editPlan * Minor documentation update * fix deletePlan and CreateNewPlan * fix createNewPlan * remove planTermByID --------- Co-authored-by: Matthew Rowland <[email protected]>
No description provided.