From a8bfbfcc1b06d8f65cd36f7c4e303e8f3d58d2b3 Mon Sep 17 00:00:00 2001 From: dahoud Date: Sat, 29 Nov 2025 23:56:07 +0000 Subject: [PATCH] docs: Ajout MCD UnionFlow en format PlantUML MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Modèle Conceptuel de Données complet avec: - 9 entités JPA (BaseEntity + 8 entités métier) - Tous les attributs avec contraintes (PK, FK, unique, not null, etc.) - Relations JPA (@ManyToOne, @OneToMany) - Enums (TypeEvenement, StatutEvenement, StatutInscription, TypeAide, StatutAide) - Notes explicatives sur les règles métier - Hiérarchie Organisation (auto-référence) - Génération automatique de champs Format PlantUML pour visualisation avec outils UML. --- MCD_UNIONFLOW.puml | 480 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 480 insertions(+) create mode 100644 MCD_UNIONFLOW.puml diff --git a/MCD_UNIONFLOW.puml b/MCD_UNIONFLOW.puml new file mode 100644 index 0000000..90519c1 --- /dev/null +++ b/MCD_UNIONFLOW.puml @@ -0,0 +1,480 @@ +@startuml MCD_UnionFlow +!theme plain +skinparam linetype ortho +skinparam packageStyle rectangle +skinparam classAttributeIconSize 0 + +title Modèle Conceptuel de Données - UnionFlow + +' ============================================ +' ENTITÉS DE BASE +' ============================================ + +abstract class BaseEntity { + {abstract} -- + + {PK} id : UUID <> + + dateCreation : LocalDateTime <> + + dateModification : LocalDateTime + + creePar : String + + modifiePar : String + + version : Long <> + + actif : Boolean <> + -- + + onCreate() : void <<@PrePersist>> + + onUpdate() : void <<@PreUpdate>> +} + +' ============================================ +' ENTITÉS MÉTIER +' ============================================ + +class Organisation { + + {PK} id : UUID <> + + dateCreation : LocalDateTime <> + + dateModification : LocalDateTime <> + + creePar : String <> + + modifiePar : String <> + + version : Long <> + + actif : Boolean <> + -- + + nom : String <> + + nomCourt : String <> + + typeOrganisation : String <> + + statut : String <> + + description : String <> + + dateFondation : LocalDate + + numeroEnregistrement : String <> + -- + ' Contact + + email : String <> + + telephone : String <> + + telephoneSecondaire : String <> + + emailSecondaire : String <> + -- + ' Adresse + + adresse : String <> + + ville : String <> + + codePostal : String <> + + region : String <> + + pays : String <> + + latitude : BigDecimal <> + + longitude : BigDecimal <> + -- + ' Web + + siteWeb : String <> + + logo : String <> + + reseauxSociaux : String <> + -- + ' Hiérarchie + + organisationParenteId : UUID + + niveauHierarchique : Integer <> + -- + ' Statistiques + + nombreMembres : Integer <> + + nombreAdministrateurs : Integer <> + -- + ' Finances + + budgetAnnuel : BigDecimal <> + + devise : String <> + + cotisationObligatoire : Boolean <> + + montantCotisationAnnuelle : BigDecimal <> + -- + ' Compléments + + objectifs : String <> + + activitesPrincipales : String <> + + certifications : String <> + + partenaires : String <> + + notes : String <> + + organisationPublique : Boolean <> + + accepteNouveauxMembres : Boolean <> + -- + + getNomComplet() : String + + getAncienneteAnnees() : int + + isRecente() : boolean + + isActive() : boolean + + ajouterMembre() : void + + retirerMembre() : void + + activer(String utilisateur) : void + + suspendre(String utilisateur) : void + + dissoudre(String utilisateur) : void +} + +class Membre { + + {PK} id : UUID <> + + dateCreation : LocalDateTime <> + + dateModification : LocalDateTime <> + + creePar : String <> + + modifiePar : String <> + + version : Long <> + + actif : Boolean <> + -- + + numeroMembre : String <> + + prenom : String <> + + nom : String <> + + email : String <> + + motDePasse : String <> + + telephone : String <> + + dateNaissance : LocalDate <> + + dateAdhesion : LocalDate <> + + roles : String <> + -- + + getNomComplet() : String + + isMajeur() : boolean + + getAge() : int +} + +class TypeOrganisationEntity { + + {PK} id : UUID <> + + dateCreation : LocalDateTime <> + + dateModification : LocalDateTime <> + + creePar : String <> + + modifiePar : String <> + + version : Long <> + + actif : Boolean <> + -- + + code : String <> + + libelle : String <> + + description : String <> + + ordreAffichage : Integer +} + +class Cotisation { + + {PK} id : UUID <> + + dateCreation : LocalDateTime <> + + dateModification : LocalDateTime <> + + creePar : String <> + + modifiePar : String <> + + version : Long <> + + actif : Boolean <> + -- + + numeroReference : String <> + + typeCotisation : String <> + + montantDu : BigDecimal <> + + montantPaye : BigDecimal <> + + codeDevise : String <> + + statut : String <> + + dateEcheance : LocalDate <> + + datePaiement : LocalDateTime + + description : String <> + + periode : String <> + + annee : Integer <> + + mois : Integer <> + + observations : String <> + + recurrente : Boolean <> + + nombreRappels : Integer <> + + dateDernierRappel : LocalDateTime + + valideParId : UUID + + nomValidateur : String <> + + dateValidation : LocalDateTime + + methodePaiement : String <> + + referencePaiement : String <> + -- + + getMontantRestant() : BigDecimal + + isEntierementPayee() : boolean + + isEnRetard() : boolean + + genererNumeroReference() : String <> +} + +class Adhesion { + + {PK} id : UUID <> + + dateCreation : LocalDateTime <> + + dateModification : LocalDateTime <> + + creePar : String <> + + modifiePar : String <> + + version : Long <> + + actif : Boolean <> + -- + + numeroReference : String <> + + dateDemande : LocalDate <> + + fraisAdhesion : BigDecimal <> + + montantPaye : BigDecimal <> + + codeDevise : String <> + + statut : String <> + + dateApprobation : LocalDate + + datePaiement : LocalDateTime + + methodePaiement : String <> + + referencePaiement : String <> + + motifRejet : String <> + + observations : String <> + + approuvePar : String <> + + dateValidation : LocalDate + -- + + isPayeeIntegralement() : boolean + + isEnAttentePaiement() : boolean + + getMontantRestant() : BigDecimal +} + +class Evenement { + + {PK} id : UUID <> + + dateCreation : LocalDateTime <> + + dateModification : LocalDateTime <> + + creePar : String <> + + modifiePar : String <> + + version : Long <> + + actif : Boolean <> + -- + + titre : String <> + + description : String <> + + dateDebut : LocalDateTime <> + + dateFin : LocalDateTime + + lieu : String <> + + adresse : String <> + + typeEvenement : TypeEvenement <> + + statut : StatutEvenement <> + + capaciteMax : Integer <> + + prix : BigDecimal <> + + inscriptionRequise : Boolean <> + + dateLimiteInscription : LocalDateTime + + instructionsParticulieres : String <> + + contactOrganisateur : String <> + + materielRequis : String <> + + visiblePublic : Boolean <> + -- + + isOuvertAuxInscriptions() : boolean + + getNombreInscrits() : int + + isComplet() : boolean + + isEnCours() : boolean + + isTermine() : boolean + + getDureeEnHeures() : Long + + getPlacesRestantes() : Integer + + isMemberInscrit(UUID membreId) : boolean + + getTauxRemplissage() : Double +} + +class InscriptionEvenement { + + {PK} id : UUID <> + + dateCreation : LocalDateTime <> + + dateModification : LocalDateTime <> + + creePar : String <> + + modifiePar : String <> + + version : Long <> + + actif : Boolean <> + -- + + dateInscription : LocalDateTime <> + + statut : StatutInscription <> + + commentaire : String <> + -- + + isConfirmee() : boolean + + isEnAttente() : boolean + + isAnnulee() : boolean + + confirmer() : void + + annuler(String commentaire) : void + + mettreEnAttente(String commentaire) : void + + refuser(String commentaire) : void +} + +class DemandeAide { + + {PK} id : UUID <> + + dateCreation : LocalDateTime <> + + dateModification : LocalDateTime <> + + creePar : String <> + + modifiePar : String <> + + version : Long <> + + actif : Boolean <> + -- + + titre : String <> + + description : String <> + + typeAide : TypeAide <> + + statut : StatutAide <> + + montantDemande : BigDecimal <> + + montantApprouve : BigDecimal <> + + dateDemande : LocalDateTime <> + + dateEvaluation : LocalDateTime + + dateVersement : LocalDateTime + + justification : String <> + + commentaireEvaluation : String <> + + urgence : Boolean <> + + documentsFournis : String + -- + + isEnAttente() : boolean + + isApprouvee() : boolean + + isRejetee() : boolean + + isUrgente() : boolean + + getPourcentageApprobation() : BigDecimal +} + +class AuditLog { + + {PK} id : UUID <> + + dateCreation : LocalDateTime <> + + dateModification : LocalDateTime <> + + creePar : String <> + + modifiePar : String <> + + version : Long <> + + actif : Boolean <> + -- + + typeAction : String <> + + severite : String <> + + utilisateur : String <> + + role : String <> + + module : String <> + + description : String <> + + details : String <> + + ipAddress : String <> + + userAgent : String <> + + sessionId : String <> + + dateHeure : LocalDateTime <> + + donneesAvant : String <> + + donneesApres : String <> + + entiteId : String <> + + entiteType : String <> +} + +' ============================================ +' ENUMS +' ============================================ + +enum TypeEvenement { + ASSEMBLEE_GENERALE + REUNION + FORMATION + CONFERENCE + ATELIER + SEMINAIRE + EVENEMENT_SOCIAL + MANIFESTATION + CELEBRATION + AUTRE +} + +enum StatutEvenement { + PLANIFIE + CONFIRME + EN_COURS + TERMINE + ANNULE + REPORTE +} + +enum StatutInscription { + CONFIRMEE + EN_ATTENTE + ANNULEE + REFUSEE +} + +enum TypeAide { + FINANCIERE + MATERIELLE + ALIMENTAIRE + MEDICALE + SCOLAIRE + LOGEMENT + EMPLOI + FORMATION + AUTRE +} + +enum StatutAide { + BROUILLON + SOUMISE + EN_ATTENTE + EN_COURS_EVALUATION + INFORMATIONS_REQUISES + APPROUVEE + APPROUVEE_PARTIELLEMENT + EN_COURS_TRAITEMENT + EN_COURS_VERSEMENT + VERSEE + LIVREE + TERMINEE + REJETEE + ANNULEE + EXPIREE + SUSPENDUE + EN_SUIVI + CLOTUREE +} + +' ============================================ +' RELATIONS +' ============================================ + +BaseEntity <|-- Organisation +BaseEntity <|-- Membre +BaseEntity <|-- TypeOrganisationEntity +BaseEntity <|-- Cotisation +BaseEntity <|-- Adhesion +BaseEntity <|-- Evenement +BaseEntity <|-- InscriptionEvenement +BaseEntity <|-- DemandeAide +BaseEntity <|-- AuditLog + +' Relations Organisation +Organisation "1" *-- "0..*" Membre : "appartient à" +Organisation "0..1" --o "0..*" Organisation : "parente >\n(organisationParenteId)" + +' Relations Membre +Membre "1" *-- "0..*" Cotisation : "a des" +Membre "1" *-- "0..*" Adhesion : "demande" +Membre "1" *-- "0..*" Evenement : "organise" +Membre "1" *-- "0..*" InscriptionEvenement : "s'inscrit" +Membre "1" *-- "0..*" DemandeAide : "demande (demandeur)" +Membre "0..1" *-- "0..*" DemandeAide : "évalue (evaluateur)" + +' Relations Organisation (suite) +Organisation "1" *-- "0..*" Adhesion : "reçoit" +Organisation "1" *-- "0..*" Evenement : "organise" +Organisation "1" *-- "0..*" DemandeAide : "traite" + +' Relations Evenement +Evenement "1" *-- "0..*" InscriptionEvenement : "a des inscriptions" + +' Relations Enums +Evenement ..> TypeEvenement : "utilise" +Evenement ..> StatutEvenement : "utilise" +InscriptionEvenement ..> StatutInscription : "utilise" +DemandeAide ..> TypeAide : "utilise" +DemandeAide ..> StatutAide : "utilise" + +note right of Organisation + **Hiérarchie** : + - organisationParenteId : UUID (référence) + - niveauHierarchique : 0 = racine + - Auto-référence pour structure hiérarchique +end note + +note right of Membre + **Génération automatique** : + - numeroMembre : auto-généré si non fourni + - dateAdhesion : auto-générée à LocalDate.now() si null + - dateNaissance : auto-générée à il y a 18 ans si null +end note + +note right of Cotisation + **Statuts possibles** : + - EN_ATTENTE + - PAYEE + - EN_RETARD + - PARTIELLEMENT_PAYEE + - ANNULEE +end note + +note right of Adhesion + **Statuts possibles** : + - EN_ATTENTE + - APPROUVEE + - REJETEE + - ANNULEE + - EN_PAIEMENT + - PAYEE +end note + +note right of Evenement + **Gestion des inscriptions** : + - inscriptionRequise : Boolean + - capaciteMax : Integer + - dateLimiteInscription : LocalDateTime + - Méthodes : isOuvertAuxInscriptions(), + getNombreInscrits(), isComplet() +end note + +note right of DemandeAide + **Workflow d'aide** : + - demandeur : Membre (obligatoire) + - evaluateur : Membre (optionnel) + - organisation : Organisation (obligatoire) + - Statuts multiples avec workflow +end note + +@enduml +