rename events package, add aggregat superclass
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user