-
Notifications
You must be signed in to change notification settings - Fork 0
refactor: replace MandateHistory with Appointment model #62
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
Conversation
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.
Pull request overview
This PR refactors the mandate history tracking system by replacing the MandateHistory model with a more feature-rich Appointment model that serves as a through table for a many-to-many relationship between Member and Position.
Key Changes
- Introduces the
Appointmentmodel with appointment tracking, status management, and resignation handling - Removes the
MandateHistorymodel and replaces it with a proper many-to-many relationship usingAppointmentas the through table - Adds status tracking for appointments (appointed, resigned, terminated) and related metadata fields
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 10 comments.
| File | Description |
|---|---|
| backend/backend/models.py | Removed MandateHistory model; added Appointment model with member/position relationships, status tracking, and resignation fields; added positions ManyToManyField to Member; removed mandate_history field from Position; includes code formatting improvements throughout |
| backend/backend/migrations/0002_appointment_remove_position_mandate_history_and_more.py | Django migration that creates the Appointment model, removes the mandate_history field from Position, deletes the MandateHistory model, and establishes the new many-to-many relationship between Member and Position |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
backend/backend/migrations/0002_appointment_remove_position_mandate_history_and_more.py
Show resolved
Hide resolved
backend/backend/migrations/0002_appointment_remove_position_mandate_history_and_more.py
Show resolved
Hide resolved
95e712e to
1efde96
Compare
Replaces the MandateHistory model with an Appointment model that serves as a through table between Member and Position.
Changes: