add list user and part of user page
This commit is contained in:
@@ -1,11 +1,16 @@
|
||||
package fr.titionfire.ffsaf.domain.entity;
|
||||
|
||||
import fr.titionfire.ffsaf.data.model.ClubModel;
|
||||
import fr.titionfire.ffsaf.utils.Contact;
|
||||
import io.quarkus.runtime.annotations.RegisterForReflection;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@RegisterForReflection
|
||||
public class ClubEntity {
|
||||
@@ -13,12 +18,39 @@ public class ClubEntity {
|
||||
private String name;
|
||||
private String country;
|
||||
private String shieldURL;
|
||||
private Map<Contact, String> contact;
|
||||
private String training_location;
|
||||
private String training_day_time;
|
||||
private String contact_intern;
|
||||
private String RNA;
|
||||
private String SIRET;
|
||||
private String no_affiliation;
|
||||
private boolean international;
|
||||
|
||||
public static ClubEntity fromModel (ClubModel model) {
|
||||
return new ClubEntity(model.getId(), model.getName(), model.getCountry(), model.getShieldURL());
|
||||
if (model == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return ClubEntity.builder()
|
||||
.id(model.getId())
|
||||
.name(model.getName())
|
||||
.country(model.getCountry())
|
||||
.shieldURL(model.getShieldURL())
|
||||
.contact(model.getContact())
|
||||
.training_location(model.getTraining_location())
|
||||
.training_day_time(model.getTraining_day_time())
|
||||
.contact_intern(model.getContact_intern())
|
||||
.RNA(model.getRNA())
|
||||
.SIRET(model.getSIRET())
|
||||
.no_affiliation(model.getNo_affiliation())
|
||||
.international(model.isInternational())
|
||||
.build();
|
||||
}
|
||||
|
||||
public ClubModel toModel () {
|
||||
return new ClubModel(this.id, this.name, this.country, this.shieldURL);
|
||||
return new ClubModel(this.id, this.name, this.country, this.shieldURL, this.contact, this.training_location,
|
||||
this.training_day_time, this.contact_intern, this.RNA, this.SIRET, this.no_affiliation,
|
||||
this.international);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user