Planned and executed phase001

This commit is contained in:
2026-09-13 21:46:57 -06:00
parent ff0a306668
commit 9793cd08bc
22 changed files with 695 additions and 20 deletions
+28
View File
@@ -0,0 +1,28 @@
# 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.