What: Add an endpoint that archives a course, removing it from public listings while preserving data.
Why: Courses may become outdated or irrelevant but shouldn't be deleted (users have enrollments and credentials). Archiving hides the course while keeping historical data.
Scope: Add route that sets isActive = false and archivedAt = now(). Archived courses don't appear in listings but enrolled users can still access them. Add archivedAt column to courses table.
Acceptance criteria:
- Archived course is hidden from public listings
- Enrolled users can still access the course
- Archive action is logged in audit logs
- Course data is preserved
Technical context: src/modules/courses/course.service.ts — course operations. src/database/schema.ts:50 — isActive column.
What: Add an endpoint that archives a course, removing it from public listings while preserving data.
Why: Courses may become outdated or irrelevant but shouldn't be deleted (users have enrollments and credentials). Archiving hides the course while keeping historical data.
Scope: Add route that sets
isActive = falseandarchivedAt = now(). Archived courses don't appear in listings but enrolled users can still access them. AddarchivedAtcolumn to courses table.Acceptance criteria:
Technical context:
src/modules/courses/course.service.ts— course operations.src/database/schema.ts:50— isActive column.