add Event related stuff and Group example
This commit is contained in:
@ -1,6 +1,8 @@
|
||||
package mops.gruppen2.entities;
|
||||
|
||||
import lombok.Data;
|
||||
import mops.gruppen2.Events.CreateGroupEvent;
|
||||
import mops.gruppen2.Events.Event;
|
||||
import org.springframework.data.annotation.Id;
|
||||
|
||||
import java.util.List;
|
||||
@ -12,4 +14,16 @@ public class Gruppe {
|
||||
String titel;
|
||||
String beschreibung;
|
||||
List<Teilnehmer> teilnehmersList;
|
||||
|
||||
public void applyEvent(Event event){
|
||||
|
||||
}
|
||||
|
||||
public void applyEvent(CreateGroupEvent event){
|
||||
this.id = event.getId();
|
||||
this.titel = event.getTitel();
|
||||
this.beschreibung = event.getBeschreibung();
|
||||
this.teilnehmersList= null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user