# Phase 3 Database Structure Summary

## Tables
- `time_logs`: core timer sessions by user and task.
- `idle_logs`: idle duration segments tied to a timer.
- `daily_work_logs`: per-user daily aggregate totals and score.
- `productivity_logs`: daily reporting snapshot with estimated vs actual.

## Key Relations
- User has many TimeLogs.
- Task has many TimeLogs.
- TimeLog has many IdleLogs.
- User has many DailyWorkLogs.
- DailyWorkLog has many ProductivityLogs.
- ProductivityLog optionally belongs to Task.

## Tracking Metrics
- `total_tracked_seconds`
- `total_idle_seconds`
- `productive_seconds`
- `estimated_seconds`
- `actual_seconds`
- `productivity_score`
