Draft
Conversation
There was a problem hiding this comment.
Pull request overview
This PR implements a student attendance tracking system by integrating with the iSAMS ERP system. The implementation adds synchronization capabilities to fetch student data from iSAMS, store it locally, and keep it updated through scheduled cron jobs.
Key Changes:
- Database schema extensions to store ERP-related student data (iSAMS ID, school ID, year group, divisions)
- iSAMS API client integration with OAuth2 authentication for fetching student and year group division data
- Student synchronization service with intelligent change detection using sync hashes and timestamps
- Scheduled cron job to synchronize student data every 2 hours during weekdays (7am-5pm)
Reviewed changes
Copilot reviewed 27 out of 29 changed files in this pull request and generated 17 comments.
Show a summary per file
| File | Description |
|---|---|
| migrations/000004_add-isams_id-and-school_id-to-visitors.*.sql | Adds iSAMS identifiers and tracking fields to visitors table |
| migrations/000005_add-year-group-and-division-to-visitor-table.*.sql | Adds year group and division tracking fields to visitors table |
| internal/isb/entity/visitor.go | Extends Visitor entity with ERP fields and implements sync hash calculation |
| internal/infrastructure/repository/visitor_sqlite.go | Implements GetAll and AddVisitor methods with ERP field handling |
| internal/infrastructure/integration/isams/*.go | Implements iSAMS API client with OAuth2 authentication |
| internal/usecase/synchroniser/isams_sync.go | Implements student synchronization logic with caching and change detection |
| internal/infrastructure/cron/cron_manager.go | Sets up scheduled sync jobs using gocron |
| internal/config/config.go | Adds iSAMS configuration parameters and MySQL parseTime flag |
| internal/domain/* | Defines domain interfaces for ERP client and visitor repository |
| internal/infrastructure/gocontainer/gocontainer.go | Registers new dependencies in DI container |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
closes #17