Add UpdateGroupTitleEvent and UpdateGroupDescriptionEvent
This commit is contained in:
@ -2,6 +2,8 @@ package mops.gruppen2.entities;
|
||||
|
||||
import lombok.Data;
|
||||
import mops.gruppen2.events.CreateGroupEvent;
|
||||
import mops.gruppen2.events.UpdateGroupDescriptionEvent;
|
||||
import mops.gruppen2.events.UpdateGroupTitleEvent;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -18,4 +20,12 @@ public class Gruppe extends Aggregat {
|
||||
this.beschreibung = event.getBeschreibung();
|
||||
this.teilnehmersList= null;
|
||||
}
|
||||
|
||||
public void applyEvent(UpdateGroupTitleEvent event) {
|
||||
this.titel = event.getTitel();
|
||||
}
|
||||
|
||||
public void applyEvent(UpdateGroupDescriptionEvent event) {
|
||||
this.beschreibung = event.getBeschreibung();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user