Sync: code local unifié

Synchronisation du code source local (fait foi).

Signed-off-by: lions dev Team
This commit is contained in:
dahoud
2026-03-15 16:25:40 +00:00
parent e82dc356f3
commit 75a19988b0
730 changed files with 53599 additions and 13145 deletions

View File

@@ -0,0 +1,56 @@
package dev.lions.unionflow.server.entity;
import jakarta.persistence.*;
import jakarta.validation.constraints.*;
import lombok.*;
/**
* Catalogue des modules métier activables par type d'organisation.
*
* <p>Géré uniquement par le Super Admin UnionFlow.
* Les organisations ne peuvent pas créer de nouveaux modules.
*
* <p>Table : {@code modules_disponibles}
*/
@Entity
@Table(
name = "modules_disponibles",
indexes = {
@Index(name = "idx_module_code", columnList = "code", unique = true),
@Index(name = "idx_module_actif", columnList = "actif")
})
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@EqualsAndHashCode(callSuper = true)
public class ModuleDisponible extends BaseEntity {
@NotBlank
@Column(name = "code", unique = true, nullable = false, length = 50)
private String code;
@NotBlank
@Column(name = "libelle", nullable = false, length = 150)
private String libelle;
@Column(name = "description", columnDefinition = "TEXT")
private String description;
/**
* JSON array des types d'organisations compatibles.
* Exemple : ["MUTUELLE_SANTE","ONG"] ou ["ALL"] pour tous.
*/
@Column(name = "types_org_compatibles", columnDefinition = "TEXT")
private String typesOrgCompatibles;
@Builder.Default
@Column(name = "ordre_affichage", nullable = false)
private Integer ordreAffichage = 0;
public boolean estCompatibleAvec(String typeOrganisation) {
if (typesOrgCompatibles == null) return false;
return typesOrgCompatibles.contains("ALL")
|| typesOrgCompatibles.contains(typeOrganisation);
}
}