fix: move data model to good package

This commit is contained in:
2025-11-25 18:43:40 +01:00
parent 9689201a8c
commit 160c7d59e3
5 changed files with 6 additions and 6 deletions

View File

@@ -0,0 +1,40 @@
package fr.titionfire.ffsaf.domain.entity;
import fr.titionfire.ffsaf.data.model.CompetitionGuestModel;
import fr.titionfire.ffsaf.data.model.MembreModel;
import fr.titionfire.ffsaf.utils.Categorie;
import fr.titionfire.ffsaf.utils.Genre;
import io.quarkus.runtime.annotations.RegisterForReflection;
import lombok.AllArgsConstructor;
import lombok.Data;
@Data
@AllArgsConstructor
@RegisterForReflection
public class CombEntity {
private long id;
private String lname = "";
private String fname = "";
Categorie categorie = null;
Long club = null;
String club_str = null;
Genre genre = null;
String country = "fr";
public static CombEntity fromModel(MembreModel model) {
if (model == null)
return null;
return new CombEntity(model.getId(), model.getLname(), model.getFname(), model.getCategorie(),
model.getClub().getId(), model.getClub().getName(), model.getGenre(), model.getCountry());
}
public static CombEntity fromModel(CompetitionGuestModel model) {
if (model == null)
return null;
return new CombEntity(model.getId() * -1, model.getLname(), model.getFname(), model.getCategorie(), null,
model.getClub(), model.getGenre(), model.getCountry());
}
}