3.2 KiB
3.2 KiB
CarPass Production Pilot Entity Map
This map captures the closed-pilot domain model as implemented in the codebase.
Owner Domain
UserownsCarrecords and authenticates through Telegram.Caris the vehicle/passport entity. It ownsFuelEntry,ServiceEntry,ExpenseEntry,OdometerHistory,CarServiceLink,ServiceAppointment,ServiceVisit, andMaintenanceRecommendation.FuelEntry,ServiceEntry, andExpenseEntryupdate ownership analytics and can update the vehicle odometer throughOdometerHistory.OwnershipAnalyticsis computed on demand from entries, expenses, depreciation settings, and loan settings.VehicleAccessgrants non-owner user access to a vehicle for selected backend flows.
STO Domain
ServiceCenteris the STO profile and tenant boundary.ServiceCenterVerificationstores moderation applications and review decisions.ServiceEmployeelinks users to a service center with one ofowner,manager,receptionist, ormechanic.CarServiceLinkis the owner-approved connection between a vehicle and an STO.ServiceCenterBookingSettingsandServiceCenterHolidaydefine the appointment calendar.ServiceAppointmentis the customer booking request and can become oneServiceVisit.ServiceCenterReviewandServiceCenterReviewCommentstore public feedback.
Work Order Domain
ServiceVisitis the work order. It linksServiceCenter,Car, owner user, employee, appointment, labor items, product items, status history, and corrections.ServiceWorkItemstores labor/repair work and next-service intervals.ServiceProductItemstores parts, fluids, materials, SKU and quantity.WorkOrderCatalogItemis the STO price/catalog item source.InventoryTransactionrecords consumed products on work-order completion.WorkOrderStatusHistoryaudits status transitions.WorkOrderCorrectionrecords post-completion correction requests and owner decisions.- Completion creates immutable owner records:
ServiceEntry,ExpenseEntry,OdometerHistory,MaintenanceRecommendationwhen applicable,ServiceNotification, andAuditLog.
Trust, Notifications, And Exchange
MaintenanceRecommendationis connected to a vehicle and optionally a service center/appointment.ServiceNotificationis the internal notification queue with best-effort Telegram delivery and idempotency keys.AuditLogrecords sensitive and operational actions.Achievement,UserAchievement,VehicleScore,ServiceCenterScore, andEngagementEventpower passport quality, trust, and timeline features.- Import/export is synchronous API work, not a persisted
ImportExportJob; schema iscarpass.exchange.v1. - OCR returns preview candidates through API responses; no persisted
OCRResulttable exists and OCR never writes vehicle data directly.
Pilot Gaps To Keep Explicit
- Browser Web Push stores subscriptions and has a service worker listener, but server-side Web Push delivery is beta and not part of the pilot-critical notification path.
- Inventory exists as consumption transactions and catalog products, not as full stock-level management.
- Correction requests record decisions; they do not mutate completed work-order snapshots automatically.