Refactoring - Version OK
This commit is contained in:
@@ -6,12 +6,13 @@ import jakarta.validation.constraints.NotNull;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.io.Serializable;
|
||||
import java.util.UUID;
|
||||
|
||||
public class AssociationDTO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Long id;
|
||||
private UUID id;
|
||||
|
||||
@NotBlank(message = "Le nom de l'association est obligatoire")
|
||||
private String nom;
|
||||
@@ -54,8 +55,8 @@ public class AssociationDTO implements Serializable {
|
||||
}
|
||||
|
||||
// Getters et Setters
|
||||
public Long getId() { return id; }
|
||||
public void setId(Long id) { this.id = id; }
|
||||
public UUID getId() { return id; }
|
||||
public void setId(UUID id) { this.id = id; }
|
||||
|
||||
public String getNom() { return nom; }
|
||||
public void setNom(String nom) { this.nom = nom; }
|
||||
|
||||
@@ -0,0 +1,91 @@
|
||||
package dev.lions.unionflow.client.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.UUID;
|
||||
|
||||
public class CotisationDTO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private UUID id;
|
||||
private String numeroReference;
|
||||
private UUID membreId;
|
||||
private String numeroMembre;
|
||||
private String nomMembre;
|
||||
private UUID associationId;
|
||||
private String nomAssociation;
|
||||
private String typeCotisation;
|
||||
private String libelle;
|
||||
private String description;
|
||||
private BigDecimal montantDu;
|
||||
private BigDecimal montantPaye;
|
||||
private String codeDevise;
|
||||
private String statut;
|
||||
private LocalDate dateEcheance;
|
||||
private LocalDateTime datePaiement;
|
||||
private String methodePaiement;
|
||||
private String observations;
|
||||
private LocalDateTime dateCreation;
|
||||
|
||||
// Getters et Setters
|
||||
public UUID getId() { return id; }
|
||||
public void setId(UUID id) { this.id = id; }
|
||||
|
||||
public String getNumeroReference() { return numeroReference; }
|
||||
public void setNumeroReference(String numeroReference) { this.numeroReference = numeroReference; }
|
||||
|
||||
public UUID getMembreId() { return membreId; }
|
||||
public void setMembreId(UUID membreId) { this.membreId = membreId; }
|
||||
|
||||
public String getNumeroMembre() { return numeroMembre; }
|
||||
public void setNumeroMembre(String numeroMembre) { this.numeroMembre = numeroMembre; }
|
||||
|
||||
public String getNomMembre() { return nomMembre; }
|
||||
public void setNomMembre(String nomMembre) { this.nomMembre = nomMembre; }
|
||||
|
||||
public UUID getAssociationId() { return associationId; }
|
||||
public void setAssociationId(UUID associationId) { this.associationId = associationId; }
|
||||
|
||||
public String getNomAssociation() { return nomAssociation; }
|
||||
public void setNomAssociation(String nomAssociation) { this.nomAssociation = nomAssociation; }
|
||||
|
||||
public String getTypeCotisation() { return typeCotisation; }
|
||||
public void setTypeCotisation(String typeCotisation) { this.typeCotisation = typeCotisation; }
|
||||
|
||||
public String getLibelle() { return libelle; }
|
||||
public void setLibelle(String libelle) { this.libelle = libelle; }
|
||||
|
||||
public String getDescription() { return description; }
|
||||
public void setDescription(String description) { this.description = description; }
|
||||
|
||||
public BigDecimal getMontantDu() { return montantDu; }
|
||||
public void setMontantDu(BigDecimal montantDu) { this.montantDu = montantDu; }
|
||||
|
||||
public BigDecimal getMontantPaye() { return montantPaye; }
|
||||
public void setMontantPaye(BigDecimal montantPaye) { this.montantPaye = montantPaye; }
|
||||
|
||||
public String getCodeDevise() { return codeDevise; }
|
||||
public void setCodeDevise(String codeDevise) { this.codeDevise = codeDevise; }
|
||||
|
||||
public String getStatut() { return statut; }
|
||||
public void setStatut(String statut) { this.statut = statut; }
|
||||
|
||||
public LocalDate getDateEcheance() { return dateEcheance; }
|
||||
public void setDateEcheance(LocalDate dateEcheance) { this.dateEcheance = dateEcheance; }
|
||||
|
||||
public LocalDateTime getDatePaiement() { return datePaiement; }
|
||||
public void setDatePaiement(LocalDateTime datePaiement) { this.datePaiement = datePaiement; }
|
||||
|
||||
public String getMethodePaiement() { return methodePaiement; }
|
||||
public void setMethodePaiement(String methodePaiement) { this.methodePaiement = methodePaiement; }
|
||||
|
||||
public String getObservations() { return observations; }
|
||||
public void setObservations(String observations) { this.observations = observations; }
|
||||
|
||||
public LocalDateTime getDateCreation() { return dateCreation; }
|
||||
public void setDateCreation(LocalDateTime dateCreation) { this.dateCreation = dateCreation; }
|
||||
}
|
||||
|
||||
@@ -0,0 +1,99 @@
|
||||
package dev.lions.unionflow.client.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.UUID;
|
||||
|
||||
public class DemandeAideDTO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private UUID id;
|
||||
private String numeroReference;
|
||||
private String type;
|
||||
private String titre;
|
||||
private String description;
|
||||
private String justification;
|
||||
private BigDecimal montantDemande;
|
||||
private BigDecimal montantAccorde;
|
||||
private String statut;
|
||||
private String urgence;
|
||||
private String localisation;
|
||||
private String motif;
|
||||
private UUID demandeurId;
|
||||
private String demandeur;
|
||||
private String telephone;
|
||||
private String email;
|
||||
private LocalDate dateDemande;
|
||||
private LocalDate dateLimite;
|
||||
private String responsableTraitement;
|
||||
private UUID organisationId;
|
||||
private LocalDateTime dateCreation;
|
||||
|
||||
// Getters et Setters
|
||||
public UUID getId() { return id; }
|
||||
public void setId(UUID id) { this.id = id; }
|
||||
|
||||
public String getNumeroReference() { return numeroReference; }
|
||||
public void setNumeroReference(String numeroReference) { this.numeroReference = numeroReference; }
|
||||
|
||||
public String getType() { return type; }
|
||||
public void setType(String type) { this.type = type; }
|
||||
|
||||
public String getTitre() { return titre; }
|
||||
public void setTitre(String titre) { this.titre = titre; }
|
||||
|
||||
public String getDescription() { return description; }
|
||||
public void setDescription(String description) { this.description = description; }
|
||||
|
||||
public String getJustification() { return justification; }
|
||||
public void setJustification(String justification) { this.justification = justification; }
|
||||
|
||||
public BigDecimal getMontantDemande() { return montantDemande; }
|
||||
public void setMontantDemande(BigDecimal montantDemande) { this.montantDemande = montantDemande; }
|
||||
|
||||
public BigDecimal getMontantAccorde() { return montantAccorde; }
|
||||
public void setMontantAccorde(BigDecimal montantAccorde) { this.montantAccorde = montantAccorde; }
|
||||
|
||||
public String getStatut() { return statut; }
|
||||
public void setStatut(String statut) { this.statut = statut; }
|
||||
|
||||
public String getUrgence() { return urgence; }
|
||||
public void setUrgence(String urgence) { this.urgence = urgence; }
|
||||
|
||||
public String getLocalisation() { return localisation; }
|
||||
public void setLocalisation(String localisation) { this.localisation = localisation; }
|
||||
|
||||
public String getMotif() { return motif; }
|
||||
public void setMotif(String motif) { this.motif = motif; }
|
||||
|
||||
public UUID getDemandeurId() { return demandeurId; }
|
||||
public void setDemandeurId(UUID demandeurId) { this.demandeurId = demandeurId; }
|
||||
|
||||
public String getDemandeur() { return demandeur; }
|
||||
public void setDemandeur(String demandeur) { this.demandeur = demandeur; }
|
||||
|
||||
public String getTelephone() { return telephone; }
|
||||
public void setTelephone(String telephone) { this.telephone = telephone; }
|
||||
|
||||
public String getEmail() { return email; }
|
||||
public void setEmail(String email) { this.email = email; }
|
||||
|
||||
public LocalDate getDateDemande() { return dateDemande; }
|
||||
public void setDateDemande(LocalDate dateDemande) { this.dateDemande = dateDemande; }
|
||||
|
||||
public LocalDate getDateLimite() { return dateLimite; }
|
||||
public void setDateLimite(LocalDate dateLimite) { this.dateLimite = dateLimite; }
|
||||
|
||||
public String getResponsableTraitement() { return responsableTraitement; }
|
||||
public void setResponsableTraitement(String responsableTraitement) { this.responsableTraitement = responsableTraitement; }
|
||||
|
||||
public UUID getOrganisationId() { return organisationId; }
|
||||
public void setOrganisationId(UUID organisationId) { this.organisationId = organisationId; }
|
||||
|
||||
public LocalDateTime getDateCreation() { return dateCreation; }
|
||||
public void setDateCreation(LocalDateTime dateCreation) { this.dateCreation = dateCreation; }
|
||||
}
|
||||
|
||||
@@ -0,0 +1,92 @@
|
||||
package dev.lions.unionflow.client.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalTime;
|
||||
import java.util.UUID;
|
||||
|
||||
public class EvenementDTO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private UUID id;
|
||||
private String titre;
|
||||
private String description;
|
||||
private String type;
|
||||
private String statut;
|
||||
private String priorite;
|
||||
private LocalDate dateDebut;
|
||||
private LocalDate dateFin;
|
||||
private LocalTime heureDebut;
|
||||
private LocalTime heureFin;
|
||||
private String lieu;
|
||||
private String adresse;
|
||||
private String organisateur;
|
||||
private String organisateurEmail;
|
||||
private Integer capaciteMax;
|
||||
private Integer participantsInscrits;
|
||||
private BigDecimal budget;
|
||||
private UUID organisationId;
|
||||
private LocalDateTime dateCreation;
|
||||
|
||||
// Getters et Setters
|
||||
public UUID getId() { return id; }
|
||||
public void setId(UUID id) { this.id = id; }
|
||||
|
||||
public String getTitre() { return titre; }
|
||||
public void setTitre(String titre) { this.titre = titre; }
|
||||
|
||||
public String getDescription() { return description; }
|
||||
public void setDescription(String description) { this.description = description; }
|
||||
|
||||
public String getType() { return type; }
|
||||
public void setType(String type) { this.type = type; }
|
||||
|
||||
public String getStatut() { return statut; }
|
||||
public void setStatut(String statut) { this.statut = statut; }
|
||||
|
||||
public String getPriorite() { return priorite; }
|
||||
public void setPriorite(String priorite) { this.priorite = priorite; }
|
||||
|
||||
public LocalDate getDateDebut() { return dateDebut; }
|
||||
public void setDateDebut(LocalDate dateDebut) { this.dateDebut = dateDebut; }
|
||||
|
||||
public LocalDate getDateFin() { return dateFin; }
|
||||
public void setDateFin(LocalDate dateFin) { this.dateFin = dateFin; }
|
||||
|
||||
public LocalTime getHeureDebut() { return heureDebut; }
|
||||
public void setHeureDebut(LocalTime heureDebut) { this.heureDebut = heureDebut; }
|
||||
|
||||
public LocalTime getHeureFin() { return heureFin; }
|
||||
public void setHeureFin(LocalTime heureFin) { this.heureFin = heureFin; }
|
||||
|
||||
public String getLieu() { return lieu; }
|
||||
public void setLieu(String lieu) { this.lieu = lieu; }
|
||||
|
||||
public String getAdresse() { return adresse; }
|
||||
public void setAdresse(String adresse) { this.adresse = adresse; }
|
||||
|
||||
public String getOrganisateur() { return organisateur; }
|
||||
public void setOrganisateur(String organisateur) { this.organisateur = organisateur; }
|
||||
|
||||
public String getOrganisateurEmail() { return organisateurEmail; }
|
||||
public void setOrganisateurEmail(String organisateurEmail) { this.organisateurEmail = organisateurEmail; }
|
||||
|
||||
public Integer getCapaciteMax() { return capaciteMax; }
|
||||
public void setCapaciteMax(Integer capaciteMax) { this.capaciteMax = capaciteMax; }
|
||||
|
||||
public Integer getParticipantsInscrits() { return participantsInscrits; }
|
||||
public void setParticipantsInscrits(Integer participantsInscrits) { this.participantsInscrits = participantsInscrits; }
|
||||
|
||||
public BigDecimal getBudget() { return budget; }
|
||||
public void setBudget(BigDecimal budget) { this.budget = budget; }
|
||||
|
||||
public UUID getOrganisationId() { return organisationId; }
|
||||
public void setOrganisationId(UUID organisationId) { this.organisationId = organisationId; }
|
||||
|
||||
public LocalDateTime getDateCreation() { return dateCreation; }
|
||||
public void setDateCreation(LocalDateTime dateCreation) { this.dateCreation = dateCreation; }
|
||||
}
|
||||
|
||||
@@ -5,12 +5,13 @@ import jakarta.validation.constraints.Positive;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.UUID;
|
||||
|
||||
public class FormulaireDTO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Long id;
|
||||
private UUID id;
|
||||
|
||||
@NotNull
|
||||
private String nom;
|
||||
@@ -60,8 +61,8 @@ public class FormulaireDTO implements Serializable {
|
||||
public FormulaireDTO() {}
|
||||
|
||||
// Getters et Setters
|
||||
public Long getId() { return id; }
|
||||
public void setId(Long id) { this.id = id; }
|
||||
public UUID getId() { return id; }
|
||||
public void setId(UUID id) { this.id = id; }
|
||||
|
||||
public String getNom() { return nom; }
|
||||
public void setNom(String nom) { this.nom = nom; }
|
||||
@@ -171,7 +172,7 @@ public class FormulaireDTO implements Serializable {
|
||||
BigDecimal economie = getEconomieAnnuelle();
|
||||
if (coutMensuelAnnuel.compareTo(BigDecimal.ZERO) > 0) {
|
||||
return economie.multiply(BigDecimal.valueOf(100))
|
||||
.divide(coutMensuelAnnuel, 0, BigDecimal.ROUND_HALF_UP)
|
||||
.divide(coutMensuelAnnuel, 0, java.math.RoundingMode.HALF_UP)
|
||||
.intValue();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,12 +8,13 @@ import jakarta.validation.constraints.*;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.io.Serializable;
|
||||
import java.util.UUID;
|
||||
|
||||
public class MembreDTO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Long id;
|
||||
private UUID id;
|
||||
|
||||
@NotBlank(message = "Le numéro de membre est obligatoire", groups = {ValidationGroups.CreateMember.class, ValidationGroups.FullRegistration.class})
|
||||
@ValidMemberNumber(groups = {ValidationGroups.CreateMember.class, ValidationGroups.UpdateMember.class, ValidationGroups.FullRegistration.class})
|
||||
@@ -62,7 +63,7 @@ public class MembreDTO implements Serializable {
|
||||
private String statut;
|
||||
|
||||
@NotNull(message = "L'association est obligatoire")
|
||||
private Long associationId;
|
||||
private UUID associationId;
|
||||
|
||||
private String associationNom;
|
||||
|
||||
@@ -88,8 +89,8 @@ public class MembreDTO implements Serializable {
|
||||
}
|
||||
|
||||
// Getters et Setters
|
||||
public Long getId() { return id; }
|
||||
public void setId(Long id) { this.id = id; }
|
||||
public UUID getId() { return id; }
|
||||
public void setId(UUID id) { this.id = id; }
|
||||
|
||||
public String getNumeroMembre() { return numeroMembre; }
|
||||
public void setNumeroMembre(String numeroMembre) { this.numeroMembre = numeroMembre; }
|
||||
@@ -130,8 +131,8 @@ public class MembreDTO implements Serializable {
|
||||
public String getStatut() { return statut; }
|
||||
public void setStatut(String statut) { this.statut = statut; }
|
||||
|
||||
public Long getAssociationId() { return associationId; }
|
||||
public void setAssociationId(Long associationId) { this.associationId = associationId; }
|
||||
public UUID getAssociationId() { return associationId; }
|
||||
public void setAssociationId(UUID associationId) { this.associationId = associationId; }
|
||||
|
||||
public String getAssociationNom() { return associationNom; }
|
||||
public void setAssociationNom(String associationNom) { this.associationNom = associationNom; }
|
||||
|
||||
@@ -6,6 +6,7 @@ import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.temporal.ChronoUnit;
|
||||
import java.util.UUID;
|
||||
|
||||
public class SouscriptionDTO implements Serializable {
|
||||
|
||||
@@ -46,14 +47,14 @@ public class SouscriptionDTO implements Serializable {
|
||||
public String getLibelle() { return libelle; }
|
||||
}
|
||||
|
||||
private Long id;
|
||||
private UUID id;
|
||||
|
||||
@NotNull
|
||||
private Long organisationId;
|
||||
private UUID organisationId;
|
||||
private String organisationNom;
|
||||
|
||||
@NotNull
|
||||
private Long formulaireId;
|
||||
private UUID formulaireId;
|
||||
private String formulaireNom;
|
||||
|
||||
@NotNull
|
||||
@@ -102,17 +103,17 @@ public class SouscriptionDTO implements Serializable {
|
||||
public SouscriptionDTO() {}
|
||||
|
||||
// Getters et Setters
|
||||
public Long getId() { return id; }
|
||||
public void setId(Long id) { this.id = id; }
|
||||
public UUID getId() { return id; }
|
||||
public void setId(UUID id) { this.id = id; }
|
||||
|
||||
public Long getOrganisationId() { return organisationId; }
|
||||
public void setOrganisationId(Long organisationId) { this.organisationId = organisationId; }
|
||||
public UUID getOrganisationId() { return organisationId; }
|
||||
public void setOrganisationId(UUID organisationId) { this.organisationId = organisationId; }
|
||||
|
||||
public String getOrganisationNom() { return organisationNom; }
|
||||
public void setOrganisationNom(String organisationNom) { this.organisationNom = organisationNom; }
|
||||
|
||||
public Long getFormulaireId() { return formulaireId; }
|
||||
public void setFormulaireId(Long formulaireId) { this.formulaireId = formulaireId; }
|
||||
public UUID getFormulaireId() { return formulaireId; }
|
||||
public void setFormulaireId(UUID formulaireId) { this.formulaireId = formulaireId; }
|
||||
|
||||
public String getFormulaireNom() { return formulaireNom; }
|
||||
public void setFormulaireNom(String formulaireNom) { this.formulaireNom = formulaireNom; }
|
||||
|
||||
@@ -2,6 +2,7 @@ package dev.lions.unionflow.client.dto.auth;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
public class LoginResponse {
|
||||
|
||||
@@ -79,7 +80,7 @@ public class LoginResponse {
|
||||
}
|
||||
|
||||
public static class UserInfo {
|
||||
private Long id;
|
||||
private UUID id;
|
||||
private String nom;
|
||||
private String prenom;
|
||||
private String email;
|
||||
@@ -91,11 +92,11 @@ public class LoginResponse {
|
||||
|
||||
public UserInfo() {}
|
||||
|
||||
public Long getId() {
|
||||
public UUID getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
public void setId(UUID id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@@ -172,7 +173,7 @@ public class LoginResponse {
|
||||
}
|
||||
|
||||
public static class EntiteInfo {
|
||||
private Long id;
|
||||
private UUID id;
|
||||
private String nom;
|
||||
private String type;
|
||||
private String pays;
|
||||
@@ -180,11 +181,11 @@ public class LoginResponse {
|
||||
|
||||
public EntiteInfo() {}
|
||||
|
||||
public Long getId() {
|
||||
public UUID getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
public void setId(UUID id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user