package fr.titionfire.ffsaf.rest.data;

import fr.titionfire.ffsaf.net2.data.SimpleCompet;
import io.quarkus.runtime.annotations.RegisterForReflection;
import lombok.AllArgsConstructor;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data
@AllArgsConstructor
@RegisterForReflection
public class SimpleCompetData {
    private long id;
    private boolean show_blason;
    private boolean show_flag;
    private List<String> admin;
    private List<String> table;

    public static SimpleCompetData fromModel(SimpleCompet compet) {
        if (compet == null)
            return null;

        return new SimpleCompetData(compet.id(), compet.show_blason(), compet.show_flag(),
                new ArrayList<>(), new ArrayList<>());
    }
}
