1

Change UpdateGroupTitleEvent and UpdateGroupDescriptionEvent

This commit is contained in:
XXNitram
2020-03-16 15:44:31 +01:00
parent 22eede051b
commit 801ef1998c
3 changed files with 11 additions and 18 deletions

View File

@ -3,6 +3,7 @@ package mops.gruppen2.domain.event;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import mops.gruppen2.domain.Group;
/**
* Ändert nur die Gruppenbeschreibung.
@ -13,13 +14,12 @@ import lombok.NoArgsConstructor;
public class UpdateGroupDescriptionEvent extends Event {
String newGroupDescription;
public UpdateGroupDescriptionEvent(Long event_id, Long group_id, String user_id, String newGroupDescription) {
super(event_id, group_id, user_id);
this.newGroupDescription = newGroupDescription;
}
public UpdateGroupDescriptionEvent(Long group_id, String user_id, String newGroupDescription) {
super(group_id, user_id);
this.newGroupDescription = newGroupDescription;
}
public void apply(Group group) {
group.setDescription(this.newGroupDescription);
}
}