All checks were successful
Deploy Production Server / if_merged (pull_request) Successful in 6m53s
64 lines
2.7 KiB
Java
64 lines
2.7 KiB
Java
package fr.titionfire.ffsaf.rest.data;
|
|
|
|
import fr.titionfire.ffsaf.data.model.MembreModel;
|
|
import fr.titionfire.ffsaf.utils.ResultPrivacy;
|
|
import io.quarkus.runtime.annotations.RegisterForReflection;
|
|
import lombok.Data;
|
|
import lombok.NoArgsConstructor;
|
|
import lombok.ToString;
|
|
import org.eclipse.microprofile.openapi.annotations.media.Schema;
|
|
|
|
import java.util.Date;
|
|
import java.util.List;
|
|
|
|
@Data
|
|
@ToString
|
|
@NoArgsConstructor
|
|
@RegisterForReflection
|
|
public class MeData {
|
|
@Schema(description = "L'identifiant du membre.", examples = "1")
|
|
private long id;
|
|
@Schema(description = "Le nom du membre.", examples = "Dupont")
|
|
private String lname = "";
|
|
@Schema(description = "Le prénom du membre.", examples = "Jean")
|
|
private String fname = "";
|
|
@Schema(description = "La catégorie du membre.", examples = "SENIOR")
|
|
private String categorie;
|
|
@Schema(description = "Le nom du club du membre.", examples = "Association sportive")
|
|
private String club;
|
|
@Schema(description = "Le genre du membre.", examples = "Homme")
|
|
private String genre;
|
|
@Schema(description = "Le numéro de licence du membre.", examples = "12345")
|
|
private int licence;
|
|
@Schema(description = "Le pays du membre.", examples = "FR")
|
|
private String country;
|
|
@Schema(description = "La date de naissance du membre.")
|
|
private Date birth_date;
|
|
@Schema(description = "L'adresse e-mail du membre.", examples = "jean.dupont@examples.com")
|
|
private String email;
|
|
@Schema(description = "Le rôle du membre dans l'association.", examples = "MEMBRE")
|
|
private String role;
|
|
@Schema(description = "Le grade d'arbitrage du membre.", examples = "N/A")
|
|
private String grade_arbitrage;
|
|
@Schema(description = "La confidentialité des résultats", examples = "PUBLIC")
|
|
private ResultPrivacy resultPrivacy;
|
|
@Schema(description = "La liste des licences du membre.")
|
|
private List<SimpleLicence> licences;
|
|
|
|
public void setMembre(MembreModel membreModel) {
|
|
this.id = membreModel.getId();
|
|
this.lname = membreModel.getLname();
|
|
this.fname = membreModel.getFname();
|
|
this.categorie = membreModel.getCategorie() == null ? "catégorie inconnue" : membreModel.getCategorie().getName();
|
|
this.club = membreModel.getClub() == null ? "Sans club" : membreModel.getClub().getName();
|
|
this.genre = membreModel.getGenre().str;
|
|
this.licence = membreModel.getLicence();
|
|
this.country = membreModel.getCountry();
|
|
this.birth_date = membreModel.getBirth_date();
|
|
this.email = membreModel.getEmail();
|
|
this.role = membreModel.getRole().str;
|
|
this.grade_arbitrage = membreModel.getGrade_arbitrage().str;
|
|
this.resultPrivacy = membreModel.getResultPrivacy();
|
|
}
|
|
}
|