Add gamification trust analytics polish

This commit is contained in:
VPN SaaS Dev
2026-05-12 20:15:24 +09:00
parent 26875e396c
commit 7fd4ab768f
5 changed files with 95 additions and 2 deletions

View File

@@ -158,6 +158,12 @@ Backend проверяет подпись Telegram, создает/обновл
- `POST /api/ocr/license-plate`
- `POST /api/ocr/vin`
- `POST /api/ocr/service-document`
- `GET /api/me/achievements`
- `GET /api/my/vehicles/{vehicle_id}/score`
- `GET /api/my/vehicles/{vehicle_id}/timeline`
- `GET /api/service-centers/{service_center_id}/trust-score`
CarPass quality and trust scores are backend-owned. The scoring engine in `app/services/scoring.py` calculates vehicle profile completeness, verified maintenance history, maintenance health, service-center trust, evidence-style achievements, and cooldown-protected engagement events. Frontend only displays the result.
Расход топлива считается по интервалам между полными баками (`is_full_tank=true`). Если данных мало, API возвращает `null`, а не выдуманную цифру.