-
Notifications
You must be signed in to change notification settings - Fork 121
Feat/update unit model #71
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
base: new/course-flow
Are you sure you want to change the base?
Feat/update unit model #71
Conversation
4ee087b to
fe682de
Compare
|
Hi @Duy-Nguyen1104, This is my first backend review, so I'll do my best to review and test your changes. Important: After a discussion with @Duy-Nguyen1104, I can confirm that there are ccmmits in this PR that are not relevant to the updating of the Findings
API Response Testing
Suggestions
All in all, well done. |
returnMarcco
left a comment
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.
This approval only applies to commit hash fe682de46077e12aa4f7e033c9134aeefa1560ae.
Please ensure the other commits contained in this PR are safe to be merged upstream at the same time.
giangnht19
left a comment
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.
BrianDangDev
left a comment
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.
- Added API and model for managing course/unit requirements.
- Units now support credit points, prerequisites, and corequisites.
- If userId is nil in the course map API, it returns the template course map


Description
This pull request introduces foundational changes to the Unit model to support the upcoming Course Flow feature. It adds credit_points, prerequisites, and corequisites columns to the units table.
The primary motivation is to store and make readily available key unit attributes that will be displayed in an overlay component within the Course Flow UI. By denormalizing this data onto the Unit model, we can provide a faster and more responsive user experience, as it avoids the need for complex real-time queries to gather this information for display purposes.
The UnitsApi has also been updated to accept and persist these new attributes.
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Logging the units inside the browser ahs shown that API response has included these attributes to the Unit entity:

Checklist: