Create the Todo data model and corresponding SQLite schema. Fields: id (string/UUID primary key), title (string, non-empty), completed (boolean, default false), createdAt (datetime), updatedAt (datetime). Set up the database connection and a migration/script that creates the todos table on startup.
Acceptance Criteria:
- SQLite table todos exists with correct columns and types
- id is generated automatically on insert
- createdAt and updatedAt are populated automatically
Test Cases:
- Unit: Insert a valid Todo and verify all fields are persisted correctly
- Unit: Verify default value of completed is false when omitted
- Edge: Attempting to insert a Todo with a null title raises a validation/database error
Create the Todo data model and corresponding SQLite schema. Fields: id (string/UUID primary key), title (string, non-empty), completed (boolean, default false), createdAt (datetime), updatedAt (datetime). Set up the database connection and a migration/script that creates the todos table on startup.
Acceptance Criteria:
Test Cases: