# Phase 002: Core Data Model ## Goal Create the relational model foundation for users, vehicles, fuel entries, maintenance entries, and maintenance schedules. ## Work - Create `User` with `name` and `email`. - Create `Vehicle` with `make`, `model`, `year`, `color`, `vin`, `licence_plate`, `current_odometer`, and `fuel_tank_size`. - Create `MaintenanceSchedule` belonging to `Vehicle`. - Create `FuelEntry` belonging to `Vehicle` and `User` as `updated_by_user`. - Create `MaintenanceEntry` belonging to `Vehicle` and `User` as `updated_by_user`. - Add validations for required fields and basic numeric constraints. - Add model specs for associations, validations, and simple behavior. ## Notes - Correct likely typo from design: `licence_place` should probably be `licence_plate`. - Correct likely typo from design: `MainetnanceEntry` should be `MaintenanceEntry`. ## Deliverables - Database migrations. - ActiveRecord models. - Model specs. - Factories. ## Acceptance Criteria - All model specs pass. - Associations match the design. - Invalid records are rejected with useful validation errors.