Skip to content

refactor: derive cohort endDate dynamically from weeks#77

Merged
theanmolsharma merged 1 commit into
mainfrom
refactor/derive-cohort-end-date-from-weeks
Apr 10, 2026
Merged

refactor: derive cohort endDate dynamically from weeks#77
theanmolsharma merged 1 commit into
mainfrom
refactor/derive-cohort-end-date-from-weeks

Conversation

@theanmolsharma
Copy link
Copy Markdown
Collaborator

Summary

  • Remove the stored endDate column from the Cohort entity and replace it with a getEndDate() method that computes the end date as the latest scheduledDate across cohort weeks
  • Update all consumers (certificates, GitHub Classroom sync, cohort reminders, response DTOs) to use getEndDate() and ensure the weeks relation is loaded where needed
  • Add migration to drop the endDate column

🤖 Generated with Claude Code

Remove the stored endDate column from the Cohort entity and replace it
with a getEndDate() method that computes the end date as the latest
scheduledDate across cohort weeks. This eliminates redundant stored state
and ensures the end date naturally adjusts when individual weeks are
postponed.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@theanmolsharma theanmolsharma merged commit c3ba0ba into main Apr 10, 2026
2 checks passed
@theanmolsharma theanmolsharma deleted the refactor/derive-cohort-end-date-from-weeks branch April 10, 2026 17:43
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.

1 participant