1

rename events package, add aggregat superclass

This commit is contained in:
Christoph
2020-03-06 14:40:55 +01:00
parent 166e3bb5fb
commit 1ddfab0091
9 changed files with 61 additions and 47 deletions

View File

@ -1,29 +1,21 @@
package mops.gruppen2.entities;
import lombok.Data;
import mops.gruppen2.Events.CreateGroupEvent;
import mops.gruppen2.Events.Event;
import org.springframework.data.annotation.Id;
import mops.gruppen2.events.CreateGroupEvent;
import java.util.List;
@Data
public class Gruppe {
@Id
Long id;
public class Gruppe extends Aggregat {
long id;
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;
}
}