diff --git a/Documents/Diagramme/DiagrammeDeClasses/README_issue023.md b/Documents/Diagramme/DiagrammeDeClasses/README_issue023.md new file mode 100644 index 00000000..aa121f44 --- /dev/null +++ b/Documents/Diagramme/DiagrammeDeClasses/README_issue023.md @@ -0,0 +1,182 @@ +[retour au README.md](../../../README.md) +[Retour aux Documents](../../README_DOCUMENTS.md) + +## Diagramme de classe +```plantuml +class ActiviteEntity { + - idActivite + - type + - date + - heureDebut + - heureFin + - effortRessenti + - variabilite + - variance + - ecartType + - moyenne + - maximum + - minimum + - temperatureMoyenne + + getIdActivite() + + getType() + + getDate() + + getHeureDebut() + + getHeureFin() + + getEffortRessenti() + + getVariabilite() + + getVariance() + + getEcartType() + + getMoyenne() + + getMaximum() + + getMinimum() + + getTemperatureMoyenne() + + setIdActivite(idActivite) + + setType(type) + + setDate(date) + + setHeureDebut(heureDebut) + + setHeureFin(heureFin) + + setEffortRessenti(effortRessenti) + + setVariabilite(variabilite) + + setVariance(variance) + + setEcartType(ecartType) + + setMoyenne(moyenne) + + setMaximum(maximum) + + setMinimum(minimum) + + setTemperatureMoyenne(temperatureMoyenne) +} + +class ActiviteGateway { + - connection + + __construct(connection: Connection) + + getActivite() + + getActiviteById(activiteId: int) + + getActiviteByType(type: string) + + getActiviteByDate(date: string) + + getActiviteByTimeRange(startTime: string, endTime: string) + + getActiviteByEffort(effortRessenti: int) + + getActiviteByVariability(variabilite: int) + + getActiviteByTemperature(temperatureMoyenne: int) + + addActivite(activite: ActiviteEntity) + + updateActivite(oldActivite: ActiviteEntity, newActivite: ActiviteEntity) + + deleteActivite(idActivite: int) +} + +class ActiviteMapper { + + map(data: array): ActiviteEntity + + ActiviteEntityToModel(activiteEntity: ActiviteEntity): Activite +} + +class AthleteEntity { + + getIdAthlete() + + getNom() + + getPrenom() + + getEmail() + + getSexe() + + getTaille() + + getPoids() + + getMotDePasse() + + getDateNaissance() + + setIdAthlete(idAthlete) + + setNom(nom) + + setPrenom(prenom) + + setEmail(email) + + setSexe(sexe) + + setTaille(taille) + + setPoids(poids) + + setMotDePasse(motDePasse) + + setDateNaissance(dateNaissance) +} + +class AthleteGateway { + - connection: Connexion + + __construct(connection: Connexion) + + getAthlete(): array + + getAthleteById(userId: int): array + + getAthleteByName(name: string): array + + getAthleteByFirstName(firstName: string): array + + getAthleteByEmail(email: string): array + + getAthleteByGender(gender: string): array + + getAthleteByHeight(height: int): array + + getAthleteByWeight(weight: int): array + + getAthleteByBirthDate(birthdate: string): array + + addAthlete(athlete: AthleteEntity): bool + + updateAthlete(oldAthlete: AthleteEntity, newAthlete: AthleteEntity): bool + + deleteAthlete(idAthlete: int): bool +} + +class AthleteMapper { + + fromSqlToEntity(data: array): array + + athleteEntityToModel(athleteEntity: AthleteEntity): User + + athleteToEntity(user: User): AthleteEntity +} + +class CoachEntity { + - idCoach + - nom + - prenom + - email + - sexe + - taille + - poids + - motDePasse + - dateNaissance + + + getIdCoach() + + getNom() + + getPrenom() + + getEmail() + + getSexe() + + getTaille() + + getPoids() + + getMotDePasse() + + getDateNaissance() + + + setIdCoach(idCoach) + + setNom(nom) + + setPrenom(prenom) + + setEmail(email) + + setSexe(sexe) + + setTaille(taille) + + setPoids(poids) + + setMotDePasse(motDePasse) + + setDateNaissance(dateNaissance) +} + +class CoachGateway { + - connection: Connexion + + + __construct(connection: Connexion) + + getCoach(): array + + getCoachById(userId: int): array + + getCoachByName(name: string): array + + getCoachByFirstName(firstName: string): array + + getCoachByEmail(email: string): array + + getCoachByGender(gender: string): array + + getCoachByHeight(height: int): array + + getCoachByBirthDate(birthdate: string): array + + addCoach(coach: CoachEntity): bool + + updateCoach(oldCoach: CoachEntity, newCoach: CoachEntity): bool + + deleteCoach(idCoach: int): bool +} + +class CoachMapper { + +map(data: array): CoachEntity + +CoachEntityToModel(coachEntity: CoachEntity): User + +CoachToEntity(user: User): CoachEntity +} + +ActiviteEntity --o AthleteEntity +ActiviteEntity --o CoachEntity +AthleteEntity --o ActiviteEntity +CoachEntity --o ActiviteEntity + +AthleteEntity --|> User +CoachEntity --|> User + +ActiviteMapper --o ActiviteEntity +AthleteMapper --o AthleteEntity +AthleteMapper --|> User +CoachMapper --o CoachEntity +CoachMapper --|> User + +```