feat: gestion des dotations equipements et historique des paiements

This commit is contained in:
2026-05-19 22:15:33 +02:00
parent ee85d38c43
commit 5e0b9ab02a
15 changed files with 435 additions and 7 deletions
@@ -33,6 +33,9 @@ public class Licence {
@OneToMany(mappedBy = "licence", cascade = CascadeType.ALL, orphanRemoval = true)
private List<Paiement> paiements = new ArrayList<>();
@OneToMany(mappedBy = "licence", cascade = CascadeType.ALL, orphanRemoval = true)
private List<Dotation> dotations = new ArrayList<>();
// Logic for Reste A Payer
@Transient
public BigDecimal getResteAPayer() {
@@ -75,6 +78,9 @@ public class Licence {
public List<Paiement> getPaiements() { return paiements; }
public void setPaiements(List<Paiement> paiements) { this.paiements = paiements; }
public List<Dotation> getDotations() { return dotations; }
public void setDotations(List<Dotation> dotations) { this.dotations = dotations; }
public String getNumeroLicence() { return numeroLicence; }
public void setNumeroLicence(String numeroLicence) { this.numeroLicence = numeroLicence; }
@@ -88,4 +94,14 @@ public class Licence {
paiements.remove(paiement);
paiement.setLicence(null);
}
public void addDotation(Dotation dotation) {
dotations.add(dotation);
dotation.setLicence(this);
}
public void removeDotation(Dotation dotation) {
dotations.remove(dotation);
dotation.setLicence(null);
}
}