Sync: code local unifié
Synchronisation du code source local (fait foi). Signed-off-by: lions dev Team
This commit is contained in:
@@ -13,23 +13,22 @@ import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* Entité Cotisation avec UUID Représente une cotisation d'un membre à son organisation
|
||||
* Entité Cotisation avec UUID Représente une cotisation d'un membre à son
|
||||
* organisation
|
||||
*
|
||||
* @author UnionFlow Team
|
||||
* @version 2.0
|
||||
* @since 2025-01-16
|
||||
*/
|
||||
@Entity
|
||||
@Table(
|
||||
name = "cotisations",
|
||||
indexes = {
|
||||
@Index(name = "idx_cotisation_membre", columnList = "membre_id"),
|
||||
@Index(name = "idx_cotisation_reference", columnList = "numero_reference", unique = true),
|
||||
@Index(name = "idx_cotisation_statut", columnList = "statut"),
|
||||
@Index(name = "idx_cotisation_echeance", columnList = "date_echeance"),
|
||||
@Index(name = "idx_cotisation_type", columnList = "type_cotisation"),
|
||||
@Index(name = "idx_cotisation_annee_mois", columnList = "annee, mois")
|
||||
})
|
||||
@Table(name = "cotisations", indexes = {
|
||||
@Index(name = "idx_cotisation_membre", columnList = "membre_id"),
|
||||
@Index(name = "idx_cotisation_reference", columnList = "numero_reference", unique = true),
|
||||
@Index(name = "idx_cotisation_statut", columnList = "statut"),
|
||||
@Index(name = "idx_cotisation_echeance", columnList = "date_echeance"),
|
||||
@Index(name = "idx_cotisation_type", columnList = "type_cotisation"),
|
||||
@Index(name = "idx_cotisation_annee_mois", columnList = "annee, mois")
|
||||
})
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@@ -46,10 +45,25 @@ public class Cotisation extends BaseEntity {
|
||||
@JoinColumn(name = "membre_id", nullable = false)
|
||||
private Membre membre;
|
||||
|
||||
/** Organisation pour laquelle la cotisation est due */
|
||||
@NotNull
|
||||
@ManyToOne(fetch = FetchType.LAZY)
|
||||
@JoinColumn(name = "organisation_id", nullable = false)
|
||||
private Organisation organisation;
|
||||
|
||||
/** Intention de paiement Wave associée (null si cotisation en attente) */
|
||||
@ManyToOne(fetch = FetchType.LAZY)
|
||||
@JoinColumn(name = "intention_paiement_id")
|
||||
private IntentionPaiement intentionPaiement;
|
||||
|
||||
@NotBlank
|
||||
@Column(name = "type_cotisation", nullable = false, length = 50)
|
||||
private String typeCotisation;
|
||||
|
||||
@NotBlank
|
||||
@Column(name = "libelle", nullable = false, length = 100)
|
||||
private String libelle;
|
||||
|
||||
@NotNull
|
||||
@DecimalMin(value = "0.0", message = "Le montant dû doit être positif")
|
||||
@Digits(integer = 10, fraction = 2)
|
||||
@@ -124,14 +138,6 @@ public class Cotisation extends BaseEntity {
|
||||
@Column(name = "date_validation")
|
||||
private LocalDateTime dateValidation;
|
||||
|
||||
@Size(max = 50)
|
||||
@Column(name = "methode_paiement", length = 50)
|
||||
private String methodePaiement;
|
||||
|
||||
@Size(max = 100)
|
||||
@Column(name = "reference_paiement", length = 100)
|
||||
private String referencePaiement;
|
||||
|
||||
/** Méthode métier pour calculer le montant restant à payer */
|
||||
public BigDecimal getMontantRestant() {
|
||||
if (montantDu == null || montantPaye == null) {
|
||||
|
||||
Reference in New Issue
Block a user