feat: rework CatPreset for add more detail + add preset
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
package fr.titionfire.ffsaf.rest.data;
|
||||
|
||||
import fr.titionfire.ffsaf.data.model.CatPresetModel;
|
||||
import fr.titionfire.ffsaf.utils.Categorie;
|
||||
import io.quarkus.runtime.annotations.RegisterForReflection;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
@@ -16,17 +15,15 @@ public class PresetData {
|
||||
private String name;
|
||||
private CatPresetModel.SwordType sword;
|
||||
private CatPresetModel.ShieldType shield;
|
||||
private List<Categorie> categories;
|
||||
long roundDuration;
|
||||
long pauseDuration;
|
||||
int mandatoryProtection;
|
||||
private List<CatPresetModel.CategorieEmbeddable> categories;
|
||||
private int mandatoryProtection1;
|
||||
private int mandatoryProtection2;
|
||||
|
||||
public static PresetData fromModel(CatPresetModel model) {
|
||||
if (model == null)
|
||||
return null;
|
||||
|
||||
return new PresetData(model.getId(), model.getName(), model.getSwordType(), model.getShieldType(),
|
||||
model.getCategories(), model.getRoundDuration(), model.getPauseDuration(),
|
||||
model.getMandatoryProtection());
|
||||
model.getCategories(), model.getMandatoryProtection1(), model.getMandatoryProtection2());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user