feat: gestion des dotations equipements et historique des paiements
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user