chore(quarkus-327): bump to Quarkus 3.27.3 LTS, make pom autonomous, fix 3 tests (NPE guard, equalsHashCode with shared refs), rename deprecated config keys
This commit is contained in:
@@ -1,95 +1,95 @@
|
||||
package dev.lions.unionflow.server.entity;
|
||||
|
||||
import dev.lions.unionflow.server.api.enums.ayantdroit.LienParente;
|
||||
import dev.lions.unionflow.server.api.enums.ayantdroit.StatutAyantDroit;
|
||||
import jakarta.persistence.*;
|
||||
import jakarta.validation.constraints.*;
|
||||
import java.time.LocalDate;
|
||||
import java.math.BigDecimal;
|
||||
import lombok.*;
|
||||
|
||||
/**
|
||||
* Ayant droit d'un membre dans une mutuelle de santé.
|
||||
*
|
||||
* <p>
|
||||
* Permet la gestion des bénéficiaires (conjoint, enfants, parents) pour
|
||||
* les conventions avec les centres de santé partenaires et les plafonds
|
||||
* annuels.
|
||||
*
|
||||
* <p>
|
||||
* Table : {@code ayants_droit}
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "ayants_droit", indexes = {
|
||||
@Index(name = "idx_ad_membre_org", columnList = "membre_organisation_id"),
|
||||
@Index(name = "idx_ad_couverture", columnList = "date_debut_couverture, date_fin_couverture")
|
||||
})
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Builder
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class AyantDroit extends BaseEntity {
|
||||
|
||||
@NotNull
|
||||
@ManyToOne(fetch = FetchType.LAZY)
|
||||
@JoinColumn(name = "membre_organisation_id", nullable = false)
|
||||
private MembreOrganisation membreOrganisation;
|
||||
|
||||
@NotBlank
|
||||
@Column(name = "prenom", nullable = false, length = 100)
|
||||
private String prenom;
|
||||
|
||||
@NotBlank
|
||||
@Column(name = "nom", nullable = false, length = 100)
|
||||
private String nom;
|
||||
|
||||
@Column(name = "date_naissance")
|
||||
private LocalDate dateNaissance;
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
@NotNull
|
||||
@Column(name = "lien_parente", nullable = false, length = 20)
|
||||
private LienParente lienParente;
|
||||
|
||||
/** Numéro attribué pour les conventions santé avec les centres partenaires */
|
||||
@Column(name = "numero_beneficiaire", length = 50)
|
||||
private String numeroBeneficiaire;
|
||||
|
||||
@Column(name = "date_debut_couverture")
|
||||
private LocalDate dateDebutCouverture;
|
||||
|
||||
/** NULL = couverture ouverte */
|
||||
@Column(name = "date_fin_couverture")
|
||||
private LocalDate dateFinCouverture;
|
||||
|
||||
@Column(name = "sexe", length = 20)
|
||||
private String sexe;
|
||||
|
||||
@Column(name = "piece_identite", length = 100)
|
||||
private String pieceIdentite;
|
||||
|
||||
@Column(name = "pourcentage_couverture", precision = 5, scale = 2)
|
||||
private BigDecimal pourcentageCouvertureSante;
|
||||
|
||||
@NotNull
|
||||
@Enumerated(EnumType.STRING)
|
||||
@Column(name = "statut", nullable = false, length = 50)
|
||||
@Builder.Default
|
||||
private StatutAyantDroit statut = StatutAyantDroit.EN_ATTENTE;
|
||||
|
||||
// ── Méthodes métier ────────────────────────────────────────────────────────
|
||||
|
||||
public boolean isCouvertAujourdhui() {
|
||||
LocalDate today = LocalDate.now();
|
||||
if (dateDebutCouverture != null && today.isBefore(dateDebutCouverture))
|
||||
return false;
|
||||
if (dateFinCouverture != null && today.isAfter(dateFinCouverture))
|
||||
return false;
|
||||
return Boolean.TRUE.equals(getActif());
|
||||
}
|
||||
|
||||
public String getNomComplet() {
|
||||
return prenom + " " + nom;
|
||||
}
|
||||
}
|
||||
package dev.lions.unionflow.server.entity;
|
||||
|
||||
import dev.lions.unionflow.server.api.enums.ayantdroit.LienParente;
|
||||
import dev.lions.unionflow.server.api.enums.ayantdroit.StatutAyantDroit;
|
||||
import jakarta.persistence.*;
|
||||
import jakarta.validation.constraints.*;
|
||||
import java.time.LocalDate;
|
||||
import java.math.BigDecimal;
|
||||
import lombok.*;
|
||||
|
||||
/**
|
||||
* Ayant droit d'un membre dans une mutuelle de santé.
|
||||
*
|
||||
* <p>
|
||||
* Permet la gestion des bénéficiaires (conjoint, enfants, parents) pour
|
||||
* les conventions avec les centres de santé partenaires et les plafonds
|
||||
* annuels.
|
||||
*
|
||||
* <p>
|
||||
* Table : {@code ayants_droit}
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "ayants_droit", indexes = {
|
||||
@Index(name = "idx_ad_membre_org", columnList = "membre_organisation_id"),
|
||||
@Index(name = "idx_ad_couverture", columnList = "date_debut_couverture, date_fin_couverture")
|
||||
})
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Builder
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class AyantDroit extends BaseEntity {
|
||||
|
||||
@NotNull
|
||||
@ManyToOne(fetch = FetchType.LAZY)
|
||||
@JoinColumn(name = "membre_organisation_id", nullable = false)
|
||||
private MembreOrganisation membreOrganisation;
|
||||
|
||||
@NotBlank
|
||||
@Column(name = "prenom", nullable = false, length = 100)
|
||||
private String prenom;
|
||||
|
||||
@NotBlank
|
||||
@Column(name = "nom", nullable = false, length = 100)
|
||||
private String nom;
|
||||
|
||||
@Column(name = "date_naissance")
|
||||
private LocalDate dateNaissance;
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
@NotNull
|
||||
@Column(name = "lien_parente", nullable = false, length = 20)
|
||||
private LienParente lienParente;
|
||||
|
||||
/** Numéro attribué pour les conventions santé avec les centres partenaires */
|
||||
@Column(name = "numero_beneficiaire", length = 50)
|
||||
private String numeroBeneficiaire;
|
||||
|
||||
@Column(name = "date_debut_couverture")
|
||||
private LocalDate dateDebutCouverture;
|
||||
|
||||
/** NULL = couverture ouverte */
|
||||
@Column(name = "date_fin_couverture")
|
||||
private LocalDate dateFinCouverture;
|
||||
|
||||
@Column(name = "sexe", length = 20)
|
||||
private String sexe;
|
||||
|
||||
@Column(name = "piece_identite", length = 100)
|
||||
private String pieceIdentite;
|
||||
|
||||
@Column(name = "pourcentage_couverture", precision = 5, scale = 2)
|
||||
private BigDecimal pourcentageCouvertureSante;
|
||||
|
||||
@NotNull
|
||||
@Enumerated(EnumType.STRING)
|
||||
@Column(name = "statut", nullable = false, length = 50)
|
||||
@Builder.Default
|
||||
private StatutAyantDroit statut = StatutAyantDroit.EN_ATTENTE;
|
||||
|
||||
// ── Méthodes métier ────────────────────────────────────────────────────────
|
||||
|
||||
public boolean isCouvertAujourdhui() {
|
||||
LocalDate today = LocalDate.now();
|
||||
if (dateDebutCouverture != null && today.isBefore(dateDebutCouverture))
|
||||
return false;
|
||||
if (dateFinCouverture != null && today.isAfter(dateFinCouverture))
|
||||
return false;
|
||||
return Boolean.TRUE.equals(getActif());
|
||||
}
|
||||
|
||||
public String getNomComplet() {
|
||||
return prenom + " " + nom;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user