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

Monitor GradTrak #742

Draft
wants to merge 4 commits into
base: gql
Choose a base branch
from
Draft

Monitor GradTrak #742

wants to merge 4 commits into from

Conversation

mathhulk
Copy link
Contributor

No description provided.

@mathhulk mathhulk marked this pull request as draft November 20, 2024 20:41
name?: string;
courses: SelectedCourseType[];
user_email: string;
term?: {
Copy link
Contributor Author

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: {
Copy link
Contributor Author

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: {
Copy link
Contributor Author

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: {
Copy link
Contributor Author

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);
Copy link
Contributor Author

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
Copy link
Contributor Author

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
Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants