docs: migrer schémas BDD de Mermaid vers DBML
Remplace les diagrammes Mermaid par DBML (via kroki-dbml) pour une meilleure expressivité des schémas de base de données : - Ajout support notes, contraintes et indexes détaillés - Migration de tous les schémas d'entités partagées - Ajout fichier exemple dbml-example.md - Configuration plugin mkdocs-kroki pour rendu DBML
This commit is contained in:
@@ -4,20 +4,33 @@
|
||||
|
||||
## Diagramme
|
||||
|
||||
```mermaid
|
||||
erDiagram
|
||||
USERS ||--o{ USER_CONSENTS : "donne"
|
||||
```kroki-dbml
|
||||
Table users {
|
||||
id uuid [primary key]
|
||||
}
|
||||
|
||||
USER_CONSENTS {
|
||||
uuid id PK
|
||||
uuid user_id FK
|
||||
string consent_type
|
||||
string consent_version
|
||||
boolean accepted
|
||||
timestamp given_at
|
||||
inet ip_address
|
||||
string user_agent
|
||||
}
|
||||
Table user_consents {
|
||||
id uuid [primary key]
|
||||
user_id uuid [not null, ref: > users.id]
|
||||
consent_type consent_type_enum [not null]
|
||||
consent_version varchar(10) [not null, note: 'Format: v1.0, v2.0, etc.']
|
||||
accepted boolean [not null, note: 'true = opted-in, false = opted-out']
|
||||
given_at timestamp [not null, default: `now()`]
|
||||
ip_address inet [not null, note: 'Proof of consent for CNIL audits']
|
||||
user_agent text [not null, note: 'Device/browser proof']
|
||||
|
||||
indexes {
|
||||
(user_id, consent_type, consent_version) [note: 'Latest consent per type']
|
||||
(user_id, given_at) [note: 'Consent history timeline']
|
||||
}
|
||||
}
|
||||
|
||||
Enum consent_type_enum {
|
||||
geolocation_precise [note: 'Géolocalisation GPS précise (obligatoire pour contenu hyperlocal)']
|
||||
analytics [note: 'Analytics Matomo (optionnel)']
|
||||
push_notifications [note: 'Notifications push (optionnel)']
|
||||
cookies_analytics [note: 'Cookies analytiques (optionnel)']
|
||||
}
|
||||
```
|
||||
|
||||
## Légende
|
||||
|
||||
Reference in New Issue
Block a user