feat: swagger
This commit is contained in:
parent
b3bfb7e267
commit
cc00da4e5e
@ -3,6 +3,7 @@ package fr.titionfire.ffsaf.data.model;
|
|||||||
import io.quarkus.runtime.annotations.RegisterForReflection;
|
import io.quarkus.runtime.annotations.RegisterForReflection;
|
||||||
import jakarta.persistence.*;
|
import jakarta.persistence.*;
|
||||||
import lombok.*;
|
import lombok.*;
|
||||||
|
import org.eclipse.microprofile.openapi.annotations.media.Schema;
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
@ -16,15 +17,20 @@ import lombok.*;
|
|||||||
public class LicenceModel {
|
public class LicenceModel {
|
||||||
@Id
|
@Id
|
||||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
@Schema(description = "L'identifiant de la licence.")
|
||||||
Long id;
|
Long id;
|
||||||
|
|
||||||
@ManyToOne(fetch = FetchType.LAZY)
|
@ManyToOne(fetch = FetchType.LAZY)
|
||||||
@JoinColumn(name = "membre", referencedColumnName = "id")
|
@JoinColumn(name = "membre", referencedColumnName = "id")
|
||||||
|
@Schema(description = "Le membre de la licence. (optionnel)")
|
||||||
MembreModel membre;
|
MembreModel membre;
|
||||||
|
|
||||||
|
@Schema(description = "La saison de la licence.", example = "2025")
|
||||||
int saison;
|
int saison;
|
||||||
|
|
||||||
|
@Schema(description = "Nom du médecin sur certificat médical.", example = "M. Jean")
|
||||||
String certificate;
|
String certificate;
|
||||||
|
|
||||||
|
@Schema(description = "Licence validée", example = "true")
|
||||||
boolean validate;
|
boolean validate;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,6 +7,7 @@ import fr.titionfire.ffsaf.utils.RoleAsso;
|
|||||||
import io.quarkus.runtime.annotations.RegisterForReflection;
|
import io.quarkus.runtime.annotations.RegisterForReflection;
|
||||||
import jakarta.persistence.*;
|
import jakarta.persistence.*;
|
||||||
import lombok.*;
|
import lombok.*;
|
||||||
|
import org.eclipse.microprofile.openapi.annotations.media.Schema;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -24,35 +25,50 @@ public class MembreModel {
|
|||||||
|
|
||||||
@Id
|
@Id
|
||||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
@Schema(description = "L'identifiant du membre.", example = "1")
|
||||||
Long id;
|
Long id;
|
||||||
|
|
||||||
|
@Schema(description = "L'identifiant long du membre (userID).", example = "e81d1d35-d897-421e-8086-6c5e74d13c6e")
|
||||||
String userId;
|
String userId;
|
||||||
|
|
||||||
|
@Schema(description = "Le nom du membre.", example = "Dupont")
|
||||||
String lname;
|
String lname;
|
||||||
|
@Schema(description = "Le prénom du membre.", example = "Jean")
|
||||||
String fname;
|
String fname;
|
||||||
|
|
||||||
|
@Schema(description = "La catégorie du membre.", example = "SENIOR")
|
||||||
Categorie categorie;
|
Categorie categorie;
|
||||||
|
|
||||||
@ManyToOne(fetch = FetchType.EAGER)
|
@ManyToOne(fetch = FetchType.EAGER)
|
||||||
@JoinColumn(name = "club", referencedColumnName = "id")
|
@JoinColumn(name = "club", referencedColumnName = "id")
|
||||||
|
@Schema(description = "Le club du membre.")
|
||||||
ClubModel club;
|
ClubModel club;
|
||||||
|
|
||||||
|
@Schema(description = "Le genre du membre.", example = "H")
|
||||||
Genre genre;
|
Genre genre;
|
||||||
|
|
||||||
|
@Schema(description = "Le numéro de licence du membre.", example = "12345")
|
||||||
int licence;
|
int licence;
|
||||||
|
|
||||||
|
@Schema(description = "Le pays du membre.", example = "FR")
|
||||||
String country;
|
String country;
|
||||||
|
|
||||||
|
@Schema(description = "La date de naissance du membre.")
|
||||||
Date birth_date;
|
Date birth_date;
|
||||||
|
|
||||||
|
@Schema(description = "L'adresse e-mail du membre.", example = "jean.dupont@example.com")
|
||||||
String email;
|
String email;
|
||||||
|
|
||||||
|
@Schema(description = "Le rôle du membre dans l'association.", example = "MEMBRE")
|
||||||
RoleAsso role;
|
RoleAsso role;
|
||||||
|
|
||||||
|
@Schema(description = "Le grade d'arbitrage du membre.", example = "NA")
|
||||||
GradeArbitrage grade_arbitrage;
|
GradeArbitrage grade_arbitrage;
|
||||||
|
|
||||||
|
@Schema(hidden = true)
|
||||||
String url_photo;
|
String url_photo;
|
||||||
|
|
||||||
@OneToMany(mappedBy = "membre", fetch = FetchType.LAZY, cascade = CascadeType.ALL)
|
@OneToMany(mappedBy = "membre", fetch = FetchType.LAZY, cascade = CascadeType.ALL)
|
||||||
|
@Schema(description = "Les licences du membre. (optionnel)")
|
||||||
List<LicenceModel> licences;
|
List<LicenceModel> licences;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,12 +8,14 @@ import lombok.AllArgsConstructor;
|
|||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
|
import org.eclipse.microprofile.openapi.annotations.media.Schema;
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@RegisterForReflection
|
@RegisterForReflection
|
||||||
|
@Schema(hidden = true)
|
||||||
public class SimpleCombModel {
|
public class SimpleCombModel {
|
||||||
Long id;
|
Long id;
|
||||||
String lname = "";
|
String lname = "";
|
||||||
|
|||||||
@ -5,6 +5,7 @@ import io.quarkus.runtime.annotations.RegisterForReflection;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.ToString;
|
import lombok.ToString;
|
||||||
|
import org.eclipse.microprofile.openapi.annotations.media.Schema;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -14,18 +15,31 @@ import java.util.List;
|
|||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@RegisterForReflection
|
@RegisterForReflection
|
||||||
public class MeData {
|
public class MeData {
|
||||||
|
@Schema(description = "L'identifiant du membre.", example = "1")
|
||||||
private long id;
|
private long id;
|
||||||
|
@Schema(description = "Le nom du membre.", example = "Dupont")
|
||||||
private String lname = "";
|
private String lname = "";
|
||||||
|
@Schema(description = "Le prénom du membre.", example = "Jean")
|
||||||
private String fname = "";
|
private String fname = "";
|
||||||
|
@Schema(description = "La catégorie du membre.", example = "SENIOR")
|
||||||
private String categorie;
|
private String categorie;
|
||||||
|
@Schema(description = "Le nom du club du membre.", example = "Association sportive")
|
||||||
private String club;
|
private String club;
|
||||||
|
@Schema(description = "Le genre du membre.", example = "Homme")
|
||||||
private String genre;
|
private String genre;
|
||||||
|
@Schema(description = "Le numéro de licence du membre.", example = "12345")
|
||||||
private int licence;
|
private int licence;
|
||||||
|
@Schema(description = "Le pays du membre.", example = "FR")
|
||||||
private String country;
|
private String country;
|
||||||
|
@Schema(description = "La date de naissance du membre.")
|
||||||
private Date birth_date;
|
private Date birth_date;
|
||||||
|
@Schema(description = "L'adresse e-mail du membre.", example = "jean.dupont@example.com")
|
||||||
private String email;
|
private String email;
|
||||||
|
@Schema(description = "Le rôle du membre dans l'association.", example = "MEMBRE")
|
||||||
private String role;
|
private String role;
|
||||||
|
@Schema(description = "Le grade d'arbitrage du membre.", example = "N/A")
|
||||||
private String grade_arbitrage;
|
private String grade_arbitrage;
|
||||||
|
@Schema(description = "La liste des licences du membre.")
|
||||||
private List<SimpleLicence> licences;
|
private List<SimpleLicence> licences;
|
||||||
|
|
||||||
public void setMembre(MembreModel membreModel) {
|
public void setMembre(MembreModel membreModel) {
|
||||||
|
|||||||
@ -5,16 +5,21 @@ import io.quarkus.runtime.annotations.RegisterForReflection;
|
|||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Builder;
|
import lombok.Builder;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import org.eclipse.microprofile.openapi.annotations.media.Schema;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@Builder
|
@Builder
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@RegisterForReflection
|
@RegisterForReflection
|
||||||
public class SimpleAffiliation {
|
public class SimpleAffiliation {
|
||||||
Long id;
|
@Schema(description = "L'identifiant de l'affiliation.", example = "1")
|
||||||
Long club;
|
private Long id;
|
||||||
int saison;
|
@Schema(description = "L'identifiant du club associé à l'affiliation.", example = "123")
|
||||||
boolean validate;
|
private Long club;
|
||||||
|
@Schema(description = "La saison de l'affiliation.", example = "2022")
|
||||||
|
private int saison;
|
||||||
|
@Schema(description = "Indique si l'affiliation est validée ou non.", example = "true")
|
||||||
|
private boolean validate;
|
||||||
|
|
||||||
public static SimpleAffiliation fromModel(AffiliationModel model) {
|
public static SimpleAffiliation fromModel(AffiliationModel model) {
|
||||||
if (model == null)
|
if (model == null)
|
||||||
|
|||||||
@ -7,6 +7,7 @@ import lombok.AllArgsConstructor;
|
|||||||
import lombok.Builder;
|
import lombok.Builder;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.ToString;
|
import lombok.ToString;
|
||||||
|
import org.eclipse.microprofile.openapi.annotations.media.Schema;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@ -17,19 +18,33 @@ import java.util.Map;
|
|||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@RegisterForReflection
|
@RegisterForReflection
|
||||||
public class SimpleClub {
|
public class SimpleClub {
|
||||||
|
@Schema(description = "L'identifiant unique du club.", example = "1")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
@Schema(description = "Identifiant long du club (UUID)", example = "b94f3167-3f6a-449c-a73b-ec84202bf07e")
|
||||||
private String clubId;
|
private String clubId;
|
||||||
|
@Schema(description = "Le nom du club.", example = "Association sportive")
|
||||||
private String name;
|
private String name;
|
||||||
|
@Schema(description = "Le pays du club.", example = "FR")
|
||||||
private String country;
|
private String country;
|
||||||
|
@Schema(description = "Les contacts du club", example = "{\"SITE\": \"www.test.com\", \"COURRIEL\": \"test@test.com\"}")
|
||||||
private Map<Contact, String> contact;
|
private Map<Contact, String> contact;
|
||||||
|
@Schema(description = "Liste des lieux d'entraînement", example = "[{\"text\":\"addr 1\",\"lng\":2.24654,\"lat\":52.4868658},{\"text\":\"addr 2\",\"lng\":2.88654,\"lat\":52.7865456}]")
|
||||||
private String training_location;
|
private String training_location;
|
||||||
|
@Schema(description = "Liste des jours et horaires d'entraînement (jours 0-6, 0=>lundi) (temps en minute depuis 00:00, 122=>2h02)", example = "[{\"day\":0,\"time_start\":164,\"time_end\":240},{\"day\":3,\"time_start\":124,\"time_end\":250}]")
|
||||||
private String training_day_time;
|
private String training_day_time;
|
||||||
|
@Schema(description = "Contact interne du club", example = "john.doe@test.com")
|
||||||
private String contact_intern;
|
private String contact_intern;
|
||||||
|
@Schema(description = "Adresse postale du club", example = "1 rue de l'exemple, 75000 Paris")
|
||||||
private String address;
|
private String address;
|
||||||
|
@Schema(description = "RNA du club", example = "W123456789")
|
||||||
private String RNA;
|
private String RNA;
|
||||||
|
@Schema(description = "Numéro SIRET du club", example = "12345678901234")
|
||||||
private Long SIRET;
|
private Long SIRET;
|
||||||
|
@Schema(description = "Numéro d'affiliation du club", example = "12345")
|
||||||
private Long no_affiliation;
|
private Long no_affiliation;
|
||||||
|
@Schema(description = "Club international", example = "false")
|
||||||
private boolean international;
|
private boolean international;
|
||||||
|
@Schema(description = "Une map contenant les contacts possible pout un club.")
|
||||||
private HashMap<String, String> contactMap = null;
|
private HashMap<String, String> contactMap = null;
|
||||||
|
|
||||||
public static SimpleClub fromModel(ClubModel model) {
|
public static SimpleClub fromModel(ClubModel model) {
|
||||||
|
|||||||
@ -6,6 +6,7 @@ import lombok.AllArgsConstructor;
|
|||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
|
import org.eclipse.microprofile.openapi.annotations.media.Schema;
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
@ -13,10 +14,15 @@ import lombok.Setter;
|
|||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@RegisterForReflection
|
@RegisterForReflection
|
||||||
public class SimpleClubList {
|
public class SimpleClubList {
|
||||||
|
@Schema(description = "Identifiant du club", example = "1")
|
||||||
Long id;
|
Long id;
|
||||||
|
@Schema(description = "Nom du club", example = "Club de test")
|
||||||
String name;
|
String name;
|
||||||
|
@Schema(description = "Pays du club", example = "FR")
|
||||||
String country;
|
String country;
|
||||||
|
@Schema(description = "Numéro SIRET du club", example = "12345678901234")
|
||||||
Long siret;
|
Long siret;
|
||||||
|
@Schema(description = "Numéro d'affiliation du club", example = "12345")
|
||||||
Long no_affiliation;
|
Long no_affiliation;
|
||||||
|
|
||||||
public static SimpleClubList fromModel(ClubModel model) {
|
public static SimpleClubList fromModel(ClubModel model) {
|
||||||
|
|||||||
@ -5,16 +5,22 @@ import io.quarkus.runtime.annotations.RegisterForReflection;
|
|||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Builder;
|
import lombok.Builder;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import org.eclipse.microprofile.openapi.annotations.media.Schema;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@Builder
|
@Builder
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@RegisterForReflection
|
@RegisterForReflection
|
||||||
public class SimpleLicence {
|
public class SimpleLicence {
|
||||||
|
@Schema(description = "ID de la licence", example = "1")
|
||||||
Long id;
|
Long id;
|
||||||
|
@Schema(description = "ID du membre", example = "1")
|
||||||
Long membre;
|
Long membre;
|
||||||
|
@Schema(description = "Saison de la licence", example = "2024")
|
||||||
int saison;
|
int saison;
|
||||||
|
@Schema(description = "Nom du médecin sur certificat médical.", example = "M. Jean")
|
||||||
String certificate;
|
String certificate;
|
||||||
|
@Schema(description = "Validation de la licence", example = "true")
|
||||||
boolean validate;
|
boolean validate;
|
||||||
|
|
||||||
public static SimpleLicence fromModel(LicenceModel model) {
|
public static SimpleLicence fromModel(LicenceModel model) {
|
||||||
|
|||||||
@ -10,6 +10,7 @@ import io.quarkus.runtime.annotations.RegisterForReflection;
|
|||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Builder;
|
import lombok.Builder;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import org.eclipse.microprofile.openapi.annotations.media.Schema;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
@ -18,19 +19,33 @@ import java.util.Date;
|
|||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@RegisterForReflection
|
@RegisterForReflection
|
||||||
public class SimpleMembre {
|
public class SimpleMembre {
|
||||||
|
@Schema(description = "L'identifiant du membre.", example = "1")
|
||||||
private long id;
|
private long id;
|
||||||
|
@Schema(description = "L'identifiant long du membre (userID).", example = "e81d1d35-d897-421e-8086-6c5e74d13c6e")
|
||||||
private String userId;
|
private String userId;
|
||||||
|
@Schema(description = "Le nom du membre.", example = "Dupont")
|
||||||
private String lname = "";
|
private String lname = "";
|
||||||
|
@Schema(description = "Le prénom du membre.", example = "Jean")
|
||||||
private String fname = "";
|
private String fname = "";
|
||||||
|
@Schema(description = "La catégorie du membre.", example = "SENIOR")
|
||||||
private Categorie categorie;
|
private Categorie categorie;
|
||||||
|
@Schema(description = "Le club du membre.")
|
||||||
private SimpleClubModel club;
|
private SimpleClubModel club;
|
||||||
|
@Schema(description = "Le genre du membre.", example = "H")
|
||||||
private Genre genre;
|
private Genre genre;
|
||||||
|
@Schema(description = "Le numéro de licence du membre.", example = "12345")
|
||||||
private int licence;
|
private int licence;
|
||||||
|
@Schema(description = "Le pays du membre.", example = "FR")
|
||||||
private String country;
|
private String country;
|
||||||
|
@Schema(description = "La date de naissance du membre.")
|
||||||
private Date birth_date;
|
private Date birth_date;
|
||||||
|
@Schema(description = "L'adresse e-mail du membre.", example = "jean.dupont@example.com")
|
||||||
private String email;
|
private String email;
|
||||||
|
@Schema(description = "Le rôle du membre dans l'association.", example = "MEMBRE")
|
||||||
private RoleAsso role;
|
private RoleAsso role;
|
||||||
|
@Schema(description = "Le grade d'arbitrage du membre.", example = "N/A")
|
||||||
private GradeArbitrage grade_arbitrage;
|
private GradeArbitrage grade_arbitrage;
|
||||||
|
@Schema(hidden = true)
|
||||||
private String url_photo;
|
private String url_photo;
|
||||||
|
|
||||||
public static SimpleMembre fromModel(MembreModel model) {
|
public static SimpleMembre fromModel(MembreModel model) {
|
||||||
|
|||||||
@ -15,15 +15,25 @@ import java.util.List;
|
|||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@RegisterForReflection
|
@RegisterForReflection
|
||||||
public class SimpleReqAffiliation {
|
public class SimpleReqAffiliation {
|
||||||
|
@Schema(description = "Identifiant de la demande d'affiliation", example = "1")
|
||||||
Long id;
|
Long id;
|
||||||
|
@Schema(description = "Identifiant du club", example = "1")
|
||||||
Long club;
|
Long club;
|
||||||
|
@Schema(description = "Nom du club si club similar trouver (même siret)", example = "Association sportive")
|
||||||
String club_name;
|
String club_name;
|
||||||
|
@Schema(description = "Identifiant du club affilié", example = "1")
|
||||||
Long club_no_aff;
|
Long club_no_aff;
|
||||||
|
@Schema(description = "Nom du club demander", example = "Association sportive")
|
||||||
String name;
|
String name;
|
||||||
|
@Schema(description = "Numéro SIRET de l'association", example = "12345678901234")
|
||||||
long siret;
|
long siret;
|
||||||
|
@Schema(description = "Numéro RNA de l'association", example = "W123456789")
|
||||||
String RNA;
|
String RNA;
|
||||||
|
@Schema(description = "Adresse de l'association", example = "1 rue de l'exemple, 75000 Paris")
|
||||||
String address;
|
String address;
|
||||||
|
@Schema(description = "Liste des membres pour la demande d'affiliation")
|
||||||
List<AffiliationMember> members;
|
List<AffiliationMember> members;
|
||||||
|
@Schema(description = "Saison de l'affiliation", example = "2025")
|
||||||
int saison;
|
int saison;
|
||||||
|
|
||||||
public static SimpleReqAffiliation fromModel(AffiliationRequestModel model) {
|
public static SimpleReqAffiliation fromModel(AffiliationRequestModel model) {
|
||||||
|
|||||||
@ -5,15 +5,20 @@ import io.quarkus.runtime.annotations.RegisterForReflection;
|
|||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Builder;
|
import lombok.Builder;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import org.eclipse.microprofile.openapi.annotations.media.Schema;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@Builder
|
@Builder
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@RegisterForReflection
|
@RegisterForReflection
|
||||||
public class SimpleReqAffiliationResume {
|
public class SimpleReqAffiliationResume {
|
||||||
|
@Schema(description = "L'identifiant de la demande d'affiliation.", example = "1")
|
||||||
Long id;
|
Long id;
|
||||||
|
@Schema(description = "Le nom de l'association.", example = "Association sportive")
|
||||||
String name;
|
String name;
|
||||||
|
@Schema(description = "Le numéro SIRET de l'association.", example = "12345678901234")
|
||||||
long siret;
|
long siret;
|
||||||
|
@Schema(description = "La saison de l'affiliation.", example = "2025")
|
||||||
int saison;
|
int saison;
|
||||||
|
|
||||||
public static SimpleReqAffiliationResume fromModel(AffiliationRequestModel model) {
|
public static SimpleReqAffiliationResume fromModel(AffiliationRequestModel model) {
|
||||||
|
|||||||
@ -5,6 +5,7 @@ import io.quarkus.security.identity.SecurityIdentity;
|
|||||||
import lombok.Builder;
|
import lombok.Builder;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import org.eclipse.microprofile.jwt.JsonWebToken;
|
import org.eclipse.microprofile.jwt.JsonWebToken;
|
||||||
|
import org.eclipse.microprofile.openapi.annotations.media.Schema;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -14,14 +15,23 @@ import java.util.Set;
|
|||||||
@Builder
|
@Builder
|
||||||
@RegisterForReflection
|
@RegisterForReflection
|
||||||
public class UserInfo {
|
public class UserInfo {
|
||||||
|
@Schema(description = "L'identifiant de l'utilisateur.", example = "1234567890")
|
||||||
String id;
|
String id;
|
||||||
|
@Schema(description = "Le nom complet de l'utilisateur.", example = "John Doe")
|
||||||
String name;
|
String name;
|
||||||
|
@Schema(description = "Le prénom de l'utilisateur.", example = "John")
|
||||||
String givenName;
|
String givenName;
|
||||||
|
@Schema(description = "Le nom de famille de l'utilisateur.", example = "Doe")
|
||||||
String familyName;
|
String familyName;
|
||||||
|
@Schema(description = "L'adresse e-mail de l'utilisateur.", example = "jihn.doe@test.fr")
|
||||||
String email;
|
String email;
|
||||||
|
@Schema(description = "L'adresse e-mail de l'utilisateur a été vérifiée.", example = "true")
|
||||||
boolean emailVerified;
|
boolean emailVerified;
|
||||||
|
@Schema(description = "La date d'expiration du token d'accès.")
|
||||||
long expiration;
|
long expiration;
|
||||||
|
@Schema(description = "La liste des groupes de l'utilisateur.")
|
||||||
List<String> groups;
|
List<String> groups;
|
||||||
|
@Schema(description = "La liste des rôles de l'utilisateur.")
|
||||||
Set<String> roles;
|
Set<String> roles;
|
||||||
|
|
||||||
public static UserInfo makeUserInfo(JsonWebToken accessToken, SecurityIdentity securityIdentity) {
|
public static UserInfo makeUserInfo(JsonWebToken accessToken, SecurityIdentity securityIdentity) {
|
||||||
|
|||||||
@ -7,48 +7,62 @@ import fr.titionfire.ffsaf.utils.RoleAsso;
|
|||||||
import jakarta.ws.rs.FormParam;
|
import jakarta.ws.rs.FormParam;
|
||||||
import jakarta.ws.rs.core.MediaType;
|
import jakarta.ws.rs.core.MediaType;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
|
import org.eclipse.microprofile.openapi.annotations.media.Schema;
|
||||||
import org.jboss.resteasy.reactive.PartType;
|
import org.jboss.resteasy.reactive.PartType;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
public class FullMemberForm {
|
public class FullMemberForm {
|
||||||
|
@Schema(description = "L'identifiant du membre.", example = "1")
|
||||||
@FormParam("id")
|
@FormParam("id")
|
||||||
private String id = null;
|
private String id = null;
|
||||||
|
|
||||||
|
@Schema(description = "Le nom du membre.", example = "Dupont")
|
||||||
@FormParam("lname")
|
@FormParam("lname")
|
||||||
private String lname = null;
|
private String lname = null;
|
||||||
|
|
||||||
|
@Schema(description = "Le prénom du membre.", example = "Jean")
|
||||||
@FormParam("fname")
|
@FormParam("fname")
|
||||||
private String fname = null;
|
private String fname = null;
|
||||||
|
|
||||||
|
@Schema(description = "La catégorie du membre.", example = "SENIOR")
|
||||||
@FormParam("categorie")
|
@FormParam("categorie")
|
||||||
private Categorie categorie = null;
|
private Categorie categorie = null;
|
||||||
|
|
||||||
|
@Schema(description = "L'identifiant du club du membre.", example = "1")
|
||||||
@FormParam("club")
|
@FormParam("club")
|
||||||
private Long club = null;
|
private Long club = null;
|
||||||
|
|
||||||
|
@Schema(description = "Le genre du membre.", example = "H")
|
||||||
@FormParam("genre")
|
@FormParam("genre")
|
||||||
private Genre genre;
|
private Genre genre;
|
||||||
|
|
||||||
|
@Schema(description = "Le numéro de licence du membre.", example = "12345")
|
||||||
@FormParam("licence")
|
@FormParam("licence")
|
||||||
private int licence;
|
private int licence;
|
||||||
|
|
||||||
|
@Schema(description = "Le pays du membre.", example = "FR")
|
||||||
@FormParam("country")
|
@FormParam("country")
|
||||||
private String country;
|
private String country;
|
||||||
|
|
||||||
|
@Schema(description = "La date de naissance du membre.")
|
||||||
@FormParam("birth_date")
|
@FormParam("birth_date")
|
||||||
private Date birth_date = null;
|
private Date birth_date = null;
|
||||||
|
|
||||||
|
@Schema(description = "L'adresse e-mail du membre.", example = "jean.dupont@example.com")
|
||||||
@FormParam("email")
|
@FormParam("email")
|
||||||
private String email;
|
private String email;
|
||||||
|
|
||||||
|
@Schema(description = "Le rôle du membre dans l'association.", example = "MEMBRE")
|
||||||
@FormParam("role")
|
@FormParam("role")
|
||||||
private RoleAsso role;
|
private RoleAsso role;
|
||||||
|
|
||||||
|
@Schema(description = "Le grade d'arbitrage du membre.", example = "ASSESSEUR")
|
||||||
@FormParam("grade_arbitrage")
|
@FormParam("grade_arbitrage")
|
||||||
private GradeArbitrage grade_arbitrage;
|
private GradeArbitrage grade_arbitrage;
|
||||||
|
|
||||||
|
@Schema(description = "La photo du membre.")
|
||||||
@FormParam("photo_data")
|
@FormParam("photo_data")
|
||||||
@PartType(MediaType.APPLICATION_OCTET_STREAM)
|
@PartType(MediaType.APPLICATION_OCTET_STREAM)
|
||||||
private byte[] photo_data = new byte[0];
|
private byte[] photo_data = new byte[0];
|
||||||
|
|||||||
@ -3,22 +3,28 @@ package fr.titionfire.ffsaf.rest.from;
|
|||||||
import jakarta.ws.rs.FormParam;
|
import jakarta.ws.rs.FormParam;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.ToString;
|
import lombok.ToString;
|
||||||
|
import org.eclipse.microprofile.openapi.annotations.media.Schema;
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
@ToString
|
@ToString
|
||||||
public class LicenceForm {
|
public class LicenceForm {
|
||||||
@FormParam("id")
|
@FormParam("id")
|
||||||
|
@Schema(description = "L'identifiant de la licence. (-1 si nouvelle demande de licence)", required = true)
|
||||||
private long id;
|
private long id;
|
||||||
|
|
||||||
@FormParam("membre")
|
@FormParam("membre")
|
||||||
|
@Schema(description = "L'identifiant du membre.", example = "1", required = true)
|
||||||
private long membre;
|
private long membre;
|
||||||
|
|
||||||
@FormParam("saison")
|
@FormParam("saison")
|
||||||
|
@Schema(description = "La saison de la licence.", example = "2025", required = true)
|
||||||
private int saison;
|
private int saison;
|
||||||
|
|
||||||
@FormParam("certificate")
|
@FormParam("certificate")
|
||||||
|
@Schema(description = "Nom du médecin sur certificat médical.", example = "M. Jean", required = true)
|
||||||
private String certificate = null;
|
private String certificate = null;
|
||||||
|
|
||||||
@FormParam("validate")
|
@FormParam("validate")
|
||||||
|
@Schema(description = "Licence validée (seuls les admin pourrons enregistrer cette valeur)", example = "true", required = true)
|
||||||
private boolean validate;
|
private boolean validate;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,19 +3,24 @@ package fr.titionfire.ffsaf.rest.from;
|
|||||||
import jakarta.ws.rs.FormParam;
|
import jakarta.ws.rs.FormParam;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.ToString;
|
import lombok.ToString;
|
||||||
|
import org.eclipse.microprofile.openapi.annotations.media.Schema;
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
@ToString
|
@ToString
|
||||||
public class MemberPermForm {
|
public class MemberPermForm {
|
||||||
|
@Schema(description = "Indique si le membre est un administrateur de la fédération.", example = "false", required = true)
|
||||||
@FormParam("federation_admin")
|
@FormParam("federation_admin")
|
||||||
private boolean federation_admin;
|
private boolean federation_admin;
|
||||||
|
|
||||||
|
@Schema(description = "Indique si le membre est un utilisateur SAFCA.", example = "false", required = true)
|
||||||
@FormParam("safca_user")
|
@FormParam("safca_user")
|
||||||
private boolean safca_user;
|
private boolean safca_user;
|
||||||
|
|
||||||
|
@Schema(description = "Indique si le membre peut créer des compétitions sur SAFCA.", example = "false", required = true)
|
||||||
@FormParam("safca_create_compet")
|
@FormParam("safca_create_compet")
|
||||||
private boolean safca_create_compet;
|
private boolean safca_create_compet;
|
||||||
|
|
||||||
|
@Schema(description = "Indique si le membre est un super administrateur SAFCA.", example = "false", required = true)
|
||||||
@FormParam("safca_super_admin")
|
@FormParam("safca_super_admin")
|
||||||
private boolean safca_super_admin;
|
private boolean safca_super_admin;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,25 +3,32 @@ package fr.titionfire.ffsaf.rest.from;
|
|||||||
import jakarta.ws.rs.FormParam;
|
import jakarta.ws.rs.FormParam;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.ToString;
|
import lombok.ToString;
|
||||||
|
import org.eclipse.microprofile.openapi.annotations.media.Schema;
|
||||||
|
|
||||||
@ToString
|
@ToString
|
||||||
@Getter
|
@Getter
|
||||||
public class PartClubForm {
|
public class PartClubForm {
|
||||||
@FormParam("id")
|
@FormParam("id")
|
||||||
|
@Schema(description = "Identifiant du club", example = "1", required = true)
|
||||||
private String id = null;
|
private String id = null;
|
||||||
|
|
||||||
@FormParam("contact")
|
@FormParam("contact")
|
||||||
|
@Schema(description = "Les contacts du club", example = "{\"SITE\": \"www.test.com\", \"COURRIEL\": \"test@test.com\"}", required = true)
|
||||||
private String contact = null;
|
private String contact = null;
|
||||||
|
|
||||||
@FormParam("training_location")
|
@FormParam("training_location")
|
||||||
|
@Schema(description = "Liste des lieux d'entraînement", example = "[{\"text\":\"addr 1\",\"lng\":2.24654,\"lat\":52.4868658},{\"text\":\"addr 2\",\"lng\":2.88654,\"lat\":52.7865456}]", required = true)
|
||||||
private String training_location = null;
|
private String training_location = null;
|
||||||
|
|
||||||
@FormParam("training_day_time")
|
@FormParam("training_day_time")
|
||||||
|
@Schema(description = "Liste des jours et horaires d'entraînement (jours 0-6, 0=>lundi) (temps en minute depuis 00:00, 122=>2h02)", example = "[{\"day\":0,\"time_start\":164,\"time_end\":240},{\"day\":3,\"time_start\":124,\"time_end\":250}]", required = true)
|
||||||
private String training_day_time = null;
|
private String training_day_time = null;
|
||||||
|
|
||||||
@FormParam("contact_intern")
|
@FormParam("contact_intern")
|
||||||
|
@Schema(description = "Contact interne du club", example = "john.doe@test.com")
|
||||||
private String contact_intern = null;
|
private String contact_intern = null;
|
||||||
|
|
||||||
@FormParam("address")
|
@FormParam("address")
|
||||||
|
@Schema(description = "Adresse postale du club", example = "1 rue de l'exemple, 75000 Paris", required = true)
|
||||||
private String address = null;
|
private String address = null;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,6 +2,7 @@ package fr.titionfire.ffsaf.utils;
|
|||||||
|
|
||||||
import io.quarkus.runtime.annotations.RegisterForReflection;
|
import io.quarkus.runtime.annotations.RegisterForReflection;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import org.eclipse.microprofile.openapi.annotations.media.Schema;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -9,9 +10,13 @@ import java.util.List;
|
|||||||
@Data
|
@Data
|
||||||
@RegisterForReflection
|
@RegisterForReflection
|
||||||
public class PageResult<T> {
|
public class PageResult<T> {
|
||||||
|
@Schema(description = "Le numéro de la page courante.", example = "1")
|
||||||
private int page;
|
private int page;
|
||||||
|
@Schema(description = "Le nombre d'éléments par page.", example = "10")
|
||||||
private int page_size;
|
private int page_size;
|
||||||
|
@Schema(description = "Le nombre total de pages.", example = "5")
|
||||||
private int page_count;
|
private int page_count;
|
||||||
|
@Schema(description = "Le nombre total d'éléments.", example = "47")
|
||||||
private long result_count;
|
private long result_count;
|
||||||
private List<T> result = new ArrayList<>();
|
private List<T> result = new ArrayList<>();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user