package fr.titionfire.ffsaf.rest.data;

import fr.titionfire.ffsaf.data.model.MembreModel;
import fr.titionfire.ffsaf.utils.RoleAsso;
import io.quarkus.runtime.annotations.RegisterForReflection;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@RegisterForReflection
public class RenewAffData {
    String name;
    String state_id;
    String address;
    String contact;
    int saison;
    List<RenewMember> members;


    @Data
    @AllArgsConstructor
    @RegisterForReflection
    public static class RenewMember {
        String lname;
        String fname;
        String email;
        int licence;
        RoleAsso role;

        public RenewMember(MembreModel o) {
            this.lname = o.getLname();
            this.fname = o.getFname();
            this.email = o.getEmail();
            this.licence = o.getLicence();
            this.role = o.getRole();
        }
    }
}
