feat: accumulated work — PI-SPI, KYC, RLS, mutuelle parts, comptabilité PDF + startup fixes
## PI-SPI BCEAO (P0.3 — deadline 30/06/2026)
- package payment/pispi/ complet : PispiAuth (OAuth2), PispiClient (HTTP brut),
PispiIso20022Mapper (pacs.008/002), PispiSignatureVerifier (HMAC-SHA256),
PispiWebhookResource (/api/pispi/webhook), DTOs ISO 20022
- PaymentOrchestrator + PaymentProviderRegistry pour l'orchestration multi-provider
- Mode mock automatique si credentials absents (dev)
## KYC AML
- entity/KycDossier, KycResource, KycAmlService + tests
- Migration V38 (create_kyc_dossier_table)
## RLS (PostgreSQL Row-Level Security) — isolation multi-tenant
- RlsConnectionInitializer, RlsContextInterceptor, @RlsEnabled annotation
- Migration V39 (PostgreSQL RLS Tenant Isolation) + V42 (app DB roles)
- Tests unitaires RlsConnectionInitializerTest, RlsContextInterceptorTest
- Tests d'intégration RlsCrossTenantIsolationTest (@QuarkusTest + IntegrationTestProfile)
## Mutuelle — Parts sociales
- entity/mutuelle/parts/ComptePartsSociales, TransactionPartsSociales
- Service, resource, mapper, repository + tests
- InteretsEpargneService + ReleveComptePdfService
## Comptabilité PDF
- ComptabilitePdfService (OpenPDF), ComptabilitePdfResource
- Tests ComptabilitePdfServiceTest, ComptabilitePdfResourceTest
## Migrations Flyway (SYSCOHADA + Keycloak Orgs)
- V36 SYSCOHADA Plan Comptable Complet : seeds comptes standards UEMOA,
trigger init_plan_comptable_organisation, alignement schéma V1 → entités
- V37 keycloak_org_id sur organisations (P0.2 migration KC 26)
- V40 provider_defaut sur FormuleAbonnement
- V41 fcm_token sur utilisateurs (FCM notifications push)
## Fixes startup (SmallRye Config 3.20 + schéma)
- 8× @ConfigProperty(defaultValue = "") → Optional<String>
(firebase, pispi.*, mtnmomo, orange) — empty default rejetés par SmallRye 3.20
- application.properties : mappings secrets env var sous %prod. uniquement
- V36 : drop colonne obsolète 'numero' de V1 quand Hibernate a créé 'numero_compte'
- V36 : remplacement UNIQUE global sur journaux_comptables.code par composite
(organisation_id, code) pour autoriser plusieurs orgs avec code 'ACH'/'VTE'/etc
- V39 : escape placeholder ${VAR} → <VAR> dans lignes commentées
(Flyway parser évalue les placeholders même dans les commentaires)
- V41 : table 'membres' → 'utilisateurs' (nom correct selon entité Membre)
- JournalComptable entity : @UniqueConstraint composite au lieu de unique=true
- MembreResource : example @Schema JSON valide (['...'] → [])
- IntegrationTestProfile : auto-détection Docker via `docker info`, fallback
vers PostgreSQL local sans DevServices
## Dev config
- application-dev.properties : quarkus.devservices.enabled=false +
quarkus.kafka.devservices.enabled=false (pas besoin de Docker pour dev)
- quarkus.flyway.placeholder-replacement=false
- Secrets dev (wave.*, firebase, pispi) en mode mock automatique
## Phase 8 tests (complète)
- 170 fichiers modifiés/ajoutés, 23425+ insertions
- Tests RBAC (@QuarkusTest) pour MembreResource lifecycle
- Tests OrganisationContextFilter multi-org
- Tests SouscriptionQuotaOptionC, KycAmlService, EmailTemplate, etc.
Résultat : Backend démarre en 64s sur port 8085 avec 36 features installées.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,135 +0,0 @@
|
||||
# Rapport d'Audit - Migrations Flyway vs Entités JPA
|
||||
Date: 2026-03-16 01:18:05
|
||||
|
||||
## Résumé
|
||||
- **Entités JPA**: 71
|
||||
- **Tables dans migrations**: 76
|
||||
|
||||
---
|
||||
|
||||
## 1. Entités JPA et leurs tables
|
||||
|
||||
| Entité | Table attendue | Existe? | Migration(s) |
|
||||
|--------|----------------|---------|--------------|
|
||||
| Adresse | `adresses` | ✅ | V1__UnionFlow_Complete_Schema.sql |
|
||||
| CampagneAgricole | `campagnes_agricoles` | ✅ | V2__Entity_Schema_Alignment.sql |
|
||||
| AlertConfiguration | `alert_configuration` | ✅ | V7__Monitoring_System.sql |
|
||||
| AlerteLcbFt | `alertes_lcb_ft` | ✅ | V9__Create_Alertes_LCB_FT.sql |
|
||||
| ApproverAction | `approver_actions` | ✅ | V6__Create_Finance_Workflow_Tables.sql |
|
||||
| AuditLog | `audit_logs` | ✅ | V1__UnionFlow_Complete_Schema.sql |
|
||||
| AyantDroit | `ayants_droit` | ✅ | V1__UnionFlow_Complete_Schema.sql |
|
||||
| **BaseEntity** | `base_entity` | **❌ MANQUANT** | - |
|
||||
| Budget | `budgets` | ✅ | V6__Create_Finance_Workflow_Tables.sql |
|
||||
| BudgetLine | `budget_lines` | ✅ | V6__Create_Finance_Workflow_Tables.sql |
|
||||
| CampagneCollecte | `campagnes_collecte` | ✅ | V2__Entity_Schema_Alignment.sql |
|
||||
| ContributionCollecte | `contributions_collecte` | ✅ | V2__Entity_Schema_Alignment.sql |
|
||||
| **CompteComptable** | `compte_comptable` | **❌ MANQUANT** | - |
|
||||
| CompteWave | `comptes_wave` | ✅ | V1__UnionFlow_Complete_Schema.sql |
|
||||
| **Configuration** | `configuration` | **❌ MANQUANT** | - |
|
||||
| **ConfigurationWave** | `configuration_wave` | **❌ MANQUANT** | - |
|
||||
| Cotisation | `cotisations` | ✅ | V1__UnionFlow_Complete_Schema.sql |
|
||||
| DonReligieux | `dons_religieux` | ✅ | V2__Entity_Schema_Alignment.sql |
|
||||
| **DemandeAdhesion** | `demande_adhesion` | **❌ MANQUANT** | - |
|
||||
| DemandeAide | `demandes_aide` | ✅ | V1__UnionFlow_Complete_Schema.sql |
|
||||
| **Document** | `document` | **❌ MANQUANT** | - |
|
||||
| **EcritureComptable** | `ecriture_comptable` | **❌ MANQUANT** | - |
|
||||
| Evenement | `evenements` | ✅ | V1__UnionFlow_Complete_Schema.sql |
|
||||
| **Favori** | `favori` | **❌ MANQUANT** | - |
|
||||
| **FormuleAbonnement** | `formule_abonnement` | **❌ MANQUANT** | - |
|
||||
| EchelonOrganigramme | `echelons_organigramme` | ✅ | V2__Entity_Schema_Alignment.sql |
|
||||
| InscriptionEvenement | `inscriptions_evenement` | ✅ | V1__UnionFlow_Complete_Schema.sql |
|
||||
| **IntentionPaiement** | `intention_paiement` | **❌ MANQUANT** | - |
|
||||
| **JournalComptable** | `journal_comptable` | **❌ MANQUANT** | - |
|
||||
| **LigneEcriture** | `ligne_ecriture` | **❌ MANQUANT** | - |
|
||||
| **AuditEntityListener** | `audit_entity_listener` | **❌ MANQUANT** | - |
|
||||
| **Membre** | `utilisateurs` | **❌ MANQUANT** | - |
|
||||
| **MembreOrganisation** | `membre_organisation` | **❌ MANQUANT** | - |
|
||||
| **MembreRole** | `membre_role` | **❌ MANQUANT** | - |
|
||||
| MembreSuivi | `membre_suivi` | ✅ | V5__Create_Membre_Suivi.sql |
|
||||
| **ModuleDisponible** | `module_disponible` | **❌ MANQUANT** | - |
|
||||
| ModuleOrganisationActif | `modules_organisation_actifs` | ✅ | V1__UnionFlow_Complete_Schema.sql |
|
||||
| DemandeCredit | `demandes_credit` | ✅ | V2__Entity_Schema_Alignment.sql |
|
||||
| EcheanceCredit | `echeances_credit` | ✅ | V2__Entity_Schema_Alignment.sql |
|
||||
| GarantieDemande | `garanties_demande` | ✅ | V2__Entity_Schema_Alignment.sql |
|
||||
| CompteEpargne | `comptes_epargne` | ✅ | V2__Entity_Schema_Alignment.sql |
|
||||
| TransactionEpargne | `transactions_epargne` | ✅ | V2__Entity_Schema_Alignment.sql |
|
||||
| Notification | `notifications` | ✅ | V1__UnionFlow_Complete_Schema.sql |
|
||||
| ProjetOng | `projets_ong` | ✅ | V2__Entity_Schema_Alignment.sql |
|
||||
| Organisation | `organisations` | ✅ | V1__UnionFlow_Complete_Schema.sql |
|
||||
| Paiement | `paiements` | ✅ | V1__UnionFlow_Complete_Schema.sql |
|
||||
| PaiementObjet | `paiements_objets` | ✅ | V1__UnionFlow_Complete_Schema.sql |
|
||||
| ParametresCotisationOrganisation | `parametres_cotisation_organisation` | ✅ | V1__UnionFlow_Complete_Schema.sql |
|
||||
| ParametresLcbFt | `parametres_lcb_ft` | ✅ | V1__UnionFlow_Complete_Schema.sql |
|
||||
| **Permission** | `permission` | **❌ MANQUANT** | - |
|
||||
| PieceJointe | `pieces_jointes` | ✅ | V1__UnionFlow_Complete_Schema.sql |
|
||||
| AgrementProfessionnel | `agrements_professionnels` | ✅ | V1__UnionFlow_Complete_Schema.sql |
|
||||
| Role | `roles` | ✅ | V1__UnionFlow_Complete_Schema.sql |
|
||||
| **RolePermission** | `role_permission` | **❌ MANQUANT** | - |
|
||||
| **SouscriptionOrganisation** | `souscription_organisation` | **❌ MANQUANT** | - |
|
||||
| **Suggestion** | `suggestion` | **❌ MANQUANT** | - |
|
||||
| **SuggestionVote** | `suggestion_vote` | **❌ MANQUANT** | - |
|
||||
| SystemAlert | `system_alerts` | ✅ | V7__Monitoring_System.sql |
|
||||
| SystemLog | `system_logs` | ✅ | V7__Monitoring_System.sql |
|
||||
| **TemplateNotification** | `template_notification` | **❌ MANQUANT** | - |
|
||||
| **Ticket** | `ticket` | **❌ MANQUANT** | - |
|
||||
| Tontine | `tontines` | ✅ | V2__Entity_Schema_Alignment.sql |
|
||||
| TourTontine | `tours_tontine` | ✅ | V2__Entity_Schema_Alignment.sql |
|
||||
| TransactionApproval | `transaction_approvals` | ✅ | V6__Create_Finance_Workflow_Tables.sql |
|
||||
| **TransactionWave** | `transaction_wave` | **❌ MANQUANT** | - |
|
||||
| TypeReference | `types_reference` | ✅ | V1__UnionFlow_Complete_Schema.sql |
|
||||
| **ValidationEtapeDemande** | `validation_etape_demande` | **❌ MANQUANT** | - |
|
||||
| CampagneVote | `campagnes_vote` | ✅ | V2__Entity_Schema_Alignment.sql |
|
||||
| Candidat | `candidats` | ✅ | V2__Entity_Schema_Alignment.sql |
|
||||
| WebhookWave | `webhooks_wave` | ✅ | V1__UnionFlow_Complete_Schema.sql |
|
||||
| WorkflowValidationConfig | `workflow_validation_config` | ✅ | V1__UnionFlow_Complete_Schema.sql |
|
||||
|
||||
**Résultat**: 45/71 entités ont une table, 26 manquantes.
|
||||
|
||||
---
|
||||
|
||||
## 2. Tables orphelines (sans entité)
|
||||
|
||||
| Table | Migration(s) |
|
||||
|-------|--------------|
|
||||
| `adhesions` | V1__UnionFlow_Complete_Schema.sql |
|
||||
| `comptes_comptables` | V1__UnionFlow_Complete_Schema.sql |
|
||||
| `configurations` | V1__UnionFlow_Complete_Schema.sql |
|
||||
| `configurations_wave` | V1__UnionFlow_Complete_Schema.sql |
|
||||
| `demandes_adhesion` | V1__UnionFlow_Complete_Schema.sql |
|
||||
| `documents` | V1__UnionFlow_Complete_Schema.sql |
|
||||
| `ecritures_comptables` | V1__UnionFlow_Complete_Schema.sql |
|
||||
| `favoris` | V1__UnionFlow_Complete_Schema.sql |
|
||||
| `formules_abonnement` | V1__UnionFlow_Complete_Schema.sql |
|
||||
| `IF` | V1__UnionFlow_Complete_Schema.sql |
|
||||
| `intentions_paiement` | V1__UnionFlow_Complete_Schema.sql |
|
||||
| `journaux_comptables` | V1__UnionFlow_Complete_Schema.sql |
|
||||
| `lignes_ecriture` | V1__UnionFlow_Complete_Schema.sql |
|
||||
| `membres` | V1__UnionFlow_Complete_Schema.sql |
|
||||
| `membres_organisations` | V1__UnionFlow_Complete_Schema.sql |
|
||||
| `membres_roles` | V1__UnionFlow_Complete_Schema.sql |
|
||||
| `modules_disponibles` | V1__UnionFlow_Complete_Schema.sql |
|
||||
| `paiements_adhesions` | V1__UnionFlow_Complete_Schema.sql |
|
||||
| `paiements_aides` | V1__UnionFlow_Complete_Schema.sql |
|
||||
| `paiements_cotisations` | V1__UnionFlow_Complete_Schema.sql |
|
||||
| `paiements_evenements` | V1__UnionFlow_Complete_Schema.sql |
|
||||
| `permissions` | V1__UnionFlow_Complete_Schema.sql |
|
||||
| `roles_permissions` | V1__UnionFlow_Complete_Schema.sql |
|
||||
| `souscriptions_organisation` | V1__UnionFlow_Complete_Schema.sql |
|
||||
| `suggestion_votes` | V1__UnionFlow_Complete_Schema.sql |
|
||||
| `suggestions` | V1__UnionFlow_Complete_Schema.sql |
|
||||
| `templates_notifications` | V1__UnionFlow_Complete_Schema.sql |
|
||||
| `tickets` | V1__UnionFlow_Complete_Schema.sql |
|
||||
| `transactions_wave` | V1__UnionFlow_Complete_Schema.sql |
|
||||
| `uf_type_organisation` | V1__UnionFlow_Complete_Schema.sql |
|
||||
| `validation_etapes_demande` | V1__UnionFlow_Complete_Schema.sql |
|
||||
|
||||
---
|
||||
|
||||
## 3. Duplications
|
||||
|
||||
| Table | Nombre | Migration(s) |
|
||||
|-------|--------|--------------|
|
||||
|
||||
---
|
||||
|
||||
*Généré par audit_migrations.sh - Lions Dev*
|
||||
Reference in New Issue
Block a user