Add strike events to activity log

Record a StrikeEvent row whenever a strike is added or removed,
and surface them in the activity log timeline with timestamp,
child name, and whether the strike was added or removed.

- New strike_events table (auto-created on startup)
- children router records prev/new strikes on every update
- GET /api/logs/strikes and DELETE /api/logs/strikes/:id endpoints
- Log view merges strike entries into the timeline (red dot,
  "✕ Strike added (2/3)" / "↩ Strike removed (1/3)")

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-01 22:07:41 -08:00
parent f730e9edf9
commit b5f4188396
6 changed files with 127 additions and 9 deletions

View File

@@ -6,6 +6,7 @@ from app.models.subject import Subject, SubjectOption
from app.models.schedule import ScheduleTemplate, ScheduleBlock
from app.models.session import DailySession, TimerEvent, TimerEventType
from app.models.activity import ActivityLog
from app.models.strike import StrikeEvent
__all__ = [
"Base",
@@ -20,4 +21,5 @@ __all__ = [
"TimerEvent",
"TimerEventType",
"ActivityLog",
"StrikeEvent",
]