docs: add conception diagrams and business rules
This commit is contained in:
@@ -0,0 +1,235 @@
|
||||
```mermaid
|
||||
erDiagram
|
||||
|
||||
CAMPUS {
|
||||
int id PK
|
||||
string nom
|
||||
string adresse
|
||||
string ville
|
||||
string code_postal
|
||||
boolean actif
|
||||
datetime created_at
|
||||
datetime updated_at
|
||||
}
|
||||
|
||||
SALLE_PRET {
|
||||
int id PK
|
||||
string nom
|
||||
string localisation
|
||||
int campus_id FK
|
||||
boolean actif
|
||||
datetime created_at
|
||||
datetime updated_at
|
||||
}
|
||||
|
||||
POSTE_EMPRUNT {
|
||||
int id PK
|
||||
string nom
|
||||
string identifiant_poste
|
||||
int salle_pret_id FK
|
||||
boolean actif
|
||||
datetime created_at
|
||||
datetime updated_at
|
||||
}
|
||||
|
||||
ROLE {
|
||||
int id PK
|
||||
string code UK
|
||||
string libelle
|
||||
string description
|
||||
}
|
||||
|
||||
UTILISATEUR {
|
||||
int id PK
|
||||
string microsoft_id UK
|
||||
string nom
|
||||
string prenom
|
||||
string email UK
|
||||
string classe "nullable"
|
||||
int role_id FK
|
||||
int campus_id FK
|
||||
boolean actif
|
||||
datetime created_at
|
||||
datetime updated_at
|
||||
}
|
||||
|
||||
CARTE_ETUDIANTE {
|
||||
int id PK
|
||||
int utilisateur_id FK
|
||||
string qr_code
|
||||
datetime date_activation
|
||||
datetime date_expiration
|
||||
boolean actif
|
||||
datetime created_at
|
||||
datetime updated_at
|
||||
}
|
||||
|
||||
CATEGORIE_MATERIEL {
|
||||
int id PK
|
||||
string nom
|
||||
string description
|
||||
boolean actif
|
||||
datetime created_at
|
||||
datetime updated_at
|
||||
}
|
||||
|
||||
MATERIEL {
|
||||
int id PK
|
||||
string nom
|
||||
string marque
|
||||
string modele
|
||||
string reference
|
||||
string numero_inventaire
|
||||
string numero_serie
|
||||
string statut
|
||||
string etat_general
|
||||
int categorie_id FK
|
||||
int campus_id FK
|
||||
boolean actif
|
||||
datetime created_at
|
||||
datetime updated_at
|
||||
}
|
||||
|
||||
ACCESSOIRE {
|
||||
int id PK
|
||||
string nom
|
||||
string description
|
||||
boolean actif
|
||||
datetime created_at
|
||||
datetime updated_at
|
||||
}
|
||||
|
||||
MATERIEL_ACCESSOIRE {
|
||||
int id PK
|
||||
int materiel_id FK
|
||||
int accessoire_id FK
|
||||
int quantite_attendue
|
||||
boolean obligatoire
|
||||
}
|
||||
|
||||
EMPRUNT {
|
||||
int id PK
|
||||
int utilisateur_id FK
|
||||
int materiel_id FK
|
||||
int campus_id FK
|
||||
int salle_pret_id FK
|
||||
int poste_emprunt_id FK
|
||||
datetime date_emprunt
|
||||
datetime date_retour_prevue
|
||||
datetime date_retour_reelle
|
||||
string statut
|
||||
string mode_identification_emprunt
|
||||
string mode_identification_retour
|
||||
string commentaire_depart
|
||||
string commentaire_retour
|
||||
datetime created_at
|
||||
datetime updated_at
|
||||
}
|
||||
|
||||
CHECKLIST {
|
||||
int id PK
|
||||
int emprunt_id FK
|
||||
int utilisateur_id FK
|
||||
string type
|
||||
datetime date_verification
|
||||
string commentaire
|
||||
datetime created_at
|
||||
datetime updated_at
|
||||
}
|
||||
|
||||
CHECKLIST_ELEMENT {
|
||||
int id PK
|
||||
int checklist_id FK
|
||||
int accessoire_id FK
|
||||
string nom_element
|
||||
string etat
|
||||
int quantite_constatee
|
||||
string commentaire
|
||||
datetime created_at
|
||||
datetime updated_at
|
||||
}
|
||||
|
||||
ANOMALIE {
|
||||
int id PK
|
||||
int emprunt_id FK
|
||||
int materiel_id FK
|
||||
int utilisateur_id FK
|
||||
int traitee_par_id FK
|
||||
string type
|
||||
string description
|
||||
string statut
|
||||
boolean detectee_automatiquement
|
||||
string observation
|
||||
datetime date_detection
|
||||
datetime date_resolution
|
||||
datetime created_at
|
||||
datetime updated_at
|
||||
}
|
||||
|
||||
HISTORIQUE {
|
||||
int id PK
|
||||
int utilisateur_id FK
|
||||
int emprunt_id FK
|
||||
int materiel_id FK
|
||||
int campus_id FK
|
||||
int salle_pret_id FK
|
||||
int poste_emprunt_id FK
|
||||
string action
|
||||
string description
|
||||
datetime date_action
|
||||
datetime created_at
|
||||
}
|
||||
|
||||
NOTIFICATION {
|
||||
int id PK
|
||||
int utilisateur_id FK
|
||||
int anomalie_id FK
|
||||
string titre
|
||||
string message
|
||||
string type
|
||||
boolean lu
|
||||
datetime date_creation
|
||||
}
|
||||
|
||||
CAMPUS ||--o{ SALLE_PRET : "contient"
|
||||
CAMPUS ||--o{ UTILISATEUR : "rattache"
|
||||
CAMPUS ||--o{ MATERIEL : "possede"
|
||||
CAMPUS ||--o{ EMPRUNT : "localise"
|
||||
CAMPUS ||--o{ HISTORIQUE : "concerne"
|
||||
|
||||
SALLE_PRET ||--o{ POSTE_EMPRUNT : "possede"
|
||||
SALLE_PRET ||--o{ EMPRUNT : "concerne"
|
||||
SALLE_PRET ||--o{ HISTORIQUE : "localise"
|
||||
|
||||
POSTE_EMPRUNT ||--o{ EMPRUNT : "enregistre"
|
||||
POSTE_EMPRUNT ||--o{ HISTORIQUE : "trace_optionnelle"
|
||||
|
||||
ROLE ||--o{ UTILISATEUR : "attribue"
|
||||
|
||||
UTILISATEUR ||--o{ CARTE_ETUDIANTE : "possede"
|
||||
UTILISATEUR ||--o{ EMPRUNT : "effectue"
|
||||
UTILISATEUR ||--o{ CHECKLIST : "renseigne"
|
||||
UTILISATEUR ||--o{ ANOMALIE : "concerne"
|
||||
UTILISATEUR ||--o{ ANOMALIE : "traite"
|
||||
UTILISATEUR ||--o{ HISTORIQUE : "declenche"
|
||||
UTILISATEUR ||--o{ NOTIFICATION : "recoit"
|
||||
|
||||
CATEGORIE_MATERIEL ||--o{ MATERIEL : "classe"
|
||||
|
||||
MATERIEL ||--o{ MATERIEL_ACCESSOIRE : "possede"
|
||||
ACCESSOIRE ||--o{ MATERIEL_ACCESSOIRE : "compose"
|
||||
|
||||
MATERIEL ||--o{ EMPRUNT : "concerne"
|
||||
|
||||
EMPRUNT ||--o{ CHECKLIST : "possede"
|
||||
CHECKLIST ||--o{ CHECKLIST_ELEMENT : "contient"
|
||||
ACCESSOIRE ||--o{ CHECKLIST_ELEMENT : "verifie"
|
||||
|
||||
EMPRUNT ||--o{ ANOMALIE : "genere"
|
||||
MATERIEL ||--o{ ANOMALIE : "concerne"
|
||||
|
||||
EMPRUNT ||--o{ HISTORIQUE : "trace"
|
||||
MATERIEL ||--o{ HISTORIQUE : "concerne"
|
||||
|
||||
ANOMALIE ||--o{ NOTIFICATION : "genere"
|
||||
```
|
||||
@@ -0,0 +1,240 @@
|
||||
```mermaid
|
||||
classDiagram
|
||||
|
||||
class Campus {
|
||||
+int id
|
||||
+String nom
|
||||
+String adresse
|
||||
+String ville
|
||||
+String codePostal
|
||||
+Boolean actif
|
||||
}
|
||||
|
||||
class SallePret {
|
||||
+int id
|
||||
+String nom
|
||||
+String localisation
|
||||
+Boolean actif
|
||||
}
|
||||
|
||||
class PosteEmprunt {
|
||||
+int id
|
||||
+String nom
|
||||
+String identifiantPoste
|
||||
+Boolean actif
|
||||
}
|
||||
|
||||
class Utilisateur {
|
||||
+int id
|
||||
+String microsoftId
|
||||
+String nom
|
||||
+String prenom
|
||||
+String email
|
||||
+String classe
|
||||
+Boolean actif
|
||||
}
|
||||
|
||||
class Role {
|
||||
+int id
|
||||
+String code
|
||||
+String libelle
|
||||
+String description
|
||||
}
|
||||
|
||||
class CarteEtudiante {
|
||||
+int id
|
||||
+String qrCode
|
||||
+DateTime dateActivation
|
||||
+DateTime dateExpiration
|
||||
+Boolean actif
|
||||
}
|
||||
|
||||
class CategorieMateriel {
|
||||
+int id
|
||||
+String nom
|
||||
+String description
|
||||
+Boolean actif
|
||||
}
|
||||
|
||||
class Materiel {
|
||||
+int id
|
||||
+String nom
|
||||
+String marque
|
||||
+String modele
|
||||
+String reference
|
||||
+String numeroInventaire
|
||||
+String numeroSerie
|
||||
+StatutMateriel statut
|
||||
+String etatGeneral
|
||||
+Boolean actif
|
||||
+verifierDisponibilite()
|
||||
+changerStatut()
|
||||
}
|
||||
|
||||
class Accessoire {
|
||||
+int id
|
||||
+String nom
|
||||
+String description
|
||||
+Boolean actif
|
||||
}
|
||||
|
||||
class MaterielAccessoire {
|
||||
+int id
|
||||
+int materielId
|
||||
+int accessoireId
|
||||
+int quantiteAttendue
|
||||
+Boolean obligatoire
|
||||
}
|
||||
|
||||
class Emprunt {
|
||||
+int id
|
||||
+DateTime dateEmprunt
|
||||
+DateTime dateRetourPrevue
|
||||
+DateTime dateRetourReelle
|
||||
+StatutEmprunt statut
|
||||
+ModeIdentification modeIdentificationEmprunt
|
||||
+ModeIdentification modeIdentificationRetour
|
||||
+String commentaireDepart
|
||||
+String commentaireRetour
|
||||
+creer()
|
||||
+enregistrerRetour()
|
||||
+cloturer()
|
||||
+marquerEnRetard()
|
||||
}
|
||||
|
||||
class Checklist {
|
||||
+int id
|
||||
+TypeChecklist type
|
||||
+DateTime dateVerification
|
||||
+String commentaire
|
||||
+valider()
|
||||
}
|
||||
|
||||
class ChecklistElement {
|
||||
+int id
|
||||
+String nomElement
|
||||
+EtatChecklistElement etat
|
||||
+int quantiteConstatee
|
||||
+String commentaire
|
||||
}
|
||||
|
||||
class Anomalie {
|
||||
+int id
|
||||
+String type
|
||||
+String description
|
||||
+StatutAnomalie statut
|
||||
+Boolean detecteeAutomatiquement
|
||||
+String observation
|
||||
+DateTime dateDetection
|
||||
+DateTime dateResolution
|
||||
+ajouterObservation()
|
||||
+changerStatut()
|
||||
+cloturer()
|
||||
}
|
||||
|
||||
class Historique {
|
||||
+int id
|
||||
+String action
|
||||
+String description
|
||||
+DateTime dateAction
|
||||
}
|
||||
|
||||
class Notification {
|
||||
+int id
|
||||
+String titre
|
||||
+String message
|
||||
+String type
|
||||
+Boolean lu
|
||||
+DateTime dateCreation
|
||||
+marquerCommeLue()
|
||||
}
|
||||
|
||||
class StatutMateriel {
|
||||
<<enumeration>>
|
||||
DISPONIBLE
|
||||
EMPRUNTE
|
||||
NON_CONFORME
|
||||
DETERIORE
|
||||
MAINTENANCE
|
||||
INDISPONIBLE
|
||||
}
|
||||
|
||||
class StatutEmprunt {
|
||||
<<enumeration>>
|
||||
EN_COURS
|
||||
EN_RETARD
|
||||
CLOTURE
|
||||
RETOUR_NON_CONFORME
|
||||
ANNULE
|
||||
}
|
||||
|
||||
class TypeChecklist {
|
||||
<<enumeration>>
|
||||
DEPART
|
||||
RETOUR
|
||||
}
|
||||
|
||||
class EtatChecklistElement {
|
||||
<<enumeration>>
|
||||
PRESENT
|
||||
ABSENT
|
||||
DETERIORE
|
||||
}
|
||||
|
||||
class StatutAnomalie {
|
||||
<<enumeration>>
|
||||
DETECTEE
|
||||
EN_COURS_TRAITEMENT
|
||||
RESOLUE
|
||||
CLOTUREE
|
||||
}
|
||||
|
||||
class ModeIdentification {
|
||||
<<enumeration>>
|
||||
QR_CODE
|
||||
MAIL_ENSUP
|
||||
}
|
||||
|
||||
Campus "1" --> "0..*" SallePret : contient
|
||||
Campus "1" --> "0..*" Utilisateur : rattache
|
||||
Campus "1" --> "0..*" Materiel : possede
|
||||
Campus "1" --> "0..*" Emprunt : localise
|
||||
Campus "0..1" --> "0..*" Historique : concerne_campus
|
||||
|
||||
SallePret "1" --> "0..*" PosteEmprunt : possede
|
||||
SallePret "1" --> "0..*" Emprunt : concerne
|
||||
SallePret "0..1" --> "0..*" Historique : localise
|
||||
|
||||
PosteEmprunt "1" --> "0..*" Emprunt : enregistre
|
||||
PosteEmprunt "0..1" --> "0..*" Historique : trace
|
||||
|
||||
Role "1" --> "0..*" Utilisateur : attribue
|
||||
Utilisateur "1" --> "0..*" CarteEtudiante : possede
|
||||
|
||||
Utilisateur "1" --> "0..*" Emprunt : effectue
|
||||
Utilisateur "1" --> "0..*" Checklist : renseigne
|
||||
Utilisateur "1" --> "0..*" Historique : declenche
|
||||
Utilisateur "1" --> "0..*" Notification : recoit
|
||||
|
||||
CategorieMateriel "1" --> "0..*" Materiel : classe
|
||||
|
||||
Materiel "1" --> "0..*" MaterielAccessoire : possede
|
||||
Accessoire "1" --> "0..*" MaterielAccessoire : compose
|
||||
|
||||
Materiel "1" --> "0..*" Emprunt : concerne
|
||||
|
||||
Emprunt "1" --> "1..2" Checklist : possede
|
||||
Checklist "1" --> "1..*" ChecklistElement : contient
|
||||
Accessoire "0..1" --> "0..*" ChecklistElement : verifie
|
||||
|
||||
Emprunt "1" --> "0..*" Anomalie : genere
|
||||
Materiel "1" --> "0..*" Anomalie : concerne
|
||||
Utilisateur "1" --> "0..*" Anomalie : concerne_etudiant
|
||||
Utilisateur "0..1" --> "0..*" Anomalie : traitee_par_responsable
|
||||
|
||||
Emprunt "0..1" --> "0..*" Historique : trace
|
||||
Materiel "0..1" --> "0..*" Historique : concerne
|
||||
|
||||
Anomalie "0..1" --> "0..*" Notification : genere
|
||||
|
||||
```
|
||||
Reference in New Issue
Block a user