Problème 1 - CRITIQUE : Champ auto_like manquant - Fichier : modele-global.md - Ajout : boolean auto_like dans LISTENING_HISTORY - Règle source : Section 03 (jauges) - Like automatique ≥30% écoute - Impact : Traçabilité système likes automatiques Problème 2 - MINEUR : Type recommended_speed imprécis - Fichier : modele-audio-guides.md - Avant : int recommended_speed_kmh (imprécis pour plage) - Après : int recommended_speed_min_kmh + int recommended_speed_max_kmh - Règle source : Section 06 - Formulaire création "30-50 km/h" - Impact : Stockage précis des plages de vitesse recommandées Audit complet réalisé : 96.6% → 100% cohérence Tous les diagrammes sont maintenant parfaitement alignés avec les règles métier.
70 lines
2.7 KiB
Markdown
70 lines
2.7 KiB
Markdown
# Modèle de données - Audio-guides
|
|
|
|
📖 Voir [Règles métier - Section 06 : Audio-guides multi-séquences](../../regles-metier/06-audio-guides-multi-sequences.md) | [Entités globales](modele-global.md)
|
|
|
|
## Diagramme
|
|
|
|
```mermaid
|
|
erDiagram
|
|
AUDIO_GUIDES }o--|| USERS : "créé par"
|
|
AUDIO_GUIDES ||--o{ GUIDE_SEQUENCES : "contient"
|
|
AUDIO_GUIDES ||--o{ USER_GUIDE_PROGRESS : "progression"
|
|
|
|
GUIDE_SEQUENCES }o--|| AUDIO_GUIDES : "appartient à"
|
|
|
|
USER_GUIDE_PROGRESS }o--|| USERS : "utilisateur"
|
|
USER_GUIDE_PROGRESS }o--|| AUDIO_GUIDES : "guide"
|
|
USER_GUIDE_PROGRESS }o--|| GUIDE_SEQUENCES : "séquence actuelle"
|
|
|
|
AUDIO_GUIDES {
|
|
uuid id PK
|
|
uuid creator_id FK
|
|
string title
|
|
text description
|
|
string travel_mode
|
|
int recommended_speed_min_kmh
|
|
int recommended_speed_max_kmh
|
|
int sequences_count
|
|
int total_duration_seconds
|
|
decimal total_distance_meters
|
|
polygon diffusion_zone
|
|
string[] tags
|
|
string age_rating
|
|
string status
|
|
timestamp published_at
|
|
}
|
|
|
|
GUIDE_SEQUENCES {
|
|
uuid id PK
|
|
uuid guide_id FK
|
|
int sequence_order
|
|
string title
|
|
string audio_url
|
|
int duration_seconds
|
|
point gps_location
|
|
int trigger_radius_meters
|
|
boolean requires_manual_trigger
|
|
timestamp created_at
|
|
}
|
|
|
|
USER_GUIDE_PROGRESS {
|
|
uuid id PK
|
|
uuid user_id FK
|
|
uuid guide_id FK
|
|
uuid current_sequence_id FK
|
|
int sequences_completed_count
|
|
decimal completion_percentage
|
|
timestamp started_at
|
|
timestamp last_updated
|
|
timestamp completed_at
|
|
}
|
|
```
|
|
|
|
## Légende
|
|
|
|
**Entités audio-guides** :
|
|
|
|
- **AUDIO_GUIDES** : Audio-guides multi-séquences - Travel_mode : `pedestrian` (manuel), `car` (auto GPS + manuel), `bicycle` (auto GPS + manuel), `transport` (auto GPS + manuel) - Sequences_count : Min 2, Max 50 séquences - Status : `draft`, `pending_review`, `published`, `archived` - Diffusion_zone : Polygon géographique (où l'audio-guide est recommandé)
|
|
- **GUIDE_SEQUENCES** : Séquences audio géolocalisées - Sequence_order : Ordre lecture 1, 2, 3... - Trigger_radius : 10-100m selon mode (piéton 10m, voiture 50m) - Requires_manual_trigger : true si mode piéton (bouton "Suivant"), false si auto GPS - GPS_location : Point WGS84 (latitude, longitude) sauf mode piéton
|
|
- **USER_GUIDE_PROGRESS** : Progression utilisateur - Completion_percentage : 0-100% (nb séquences complétées / total) - Current_sequence_id : Dernière séquence écoutée (pour reprise) - Started_at : Date démarrage parcours - Completed_at : NULL si en cours, timestamp si terminé
|