package fr.titionfire.ffsaf.rest.from;

import jakarta.ws.rs.FormParam;
import jakarta.ws.rs.core.MediaType;
import lombok.Getter;
import lombok.ToString;
import org.eclipse.microprofile.openapi.annotations.enums.SchemaType;
import org.eclipse.microprofile.openapi.annotations.media.Schema;
import org.jboss.resteasy.reactive.PartType;
import org.jboss.resteasy.reactive.multipart.FileUpload;

@ToString
@Getter
public class FullClubForm {
    @FormParam("id")
    @Schema(description = "Identifiant du club", examples = "1", required = true)
    private String id = null;

    @FormParam("name")
    @Schema(description = "Nom du club", examples = "Association sportive", required = true)
    private String name = null;

    @FormParam("country")
    @Schema(description = "Pays du club", examples = "FR", required = true)
    private String country = null;

    @FormParam("contact")
    @Schema(description = "Les contacts du club", examples = "{\"SITE\": \"www.test.com\", \"COURRIEL\": \"test@test.com\"}", required = true)
    private String contact = null;

    @FormParam("training_location")
    @Schema(description = "Liste des lieux d'entraînement", examples = "[{\"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;

    @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)", examples = "[{\"day\":0,\"time_start\":164,\"time_end\":240},{\"day\":3,\"time_start\":124,\"time_end\":250}]", required = true)
    private String training_day_time = null;

    @FormParam("contact_intern")
    @Schema(description = "Contact interne du club", examples = "john.doe@test.com")
    private String contact_intern = null;

    @FormParam("address")
    @Schema(description = "Adresse postale du club", examples = "1 rue de l'exemple, 75000 Paris", required = true)
    private String address = null;

    @FormParam("state_id")
    @Schema(description = "Numéro SIRET ou RNA du club", examples = "12345678901234", required = true)
    private String state_id = null;

    @FormParam("international")
    @Schema(description = "Club international", examples = "false", required = true)
    private boolean international = false;

    @FormParam("status")
    @PartType(MediaType.APPLICATION_OCTET_STREAM)
    @Schema(description = "Le statut de l'association.", type = SchemaType.ARRAY)
    private FileUpload status = null;

    @FormParam("logo")
    @PartType(MediaType.APPLICATION_OCTET_STREAM)
    @Schema(description = "Le logo de l'association.", type = SchemaType.ARRAY)
    private FileUpload logo = null;
}
