change create group event + new group fields
This commit is contained in:
@ -19,15 +19,20 @@ public class Group extends Aggregate {
|
||||
private final List<User> members;
|
||||
private final Map<User, Role> roles;
|
||||
|
||||
private GroupType type;
|
||||
private Visibility visibility;
|
||||
private Long parent;
|
||||
|
||||
public Group() {
|
||||
this.members = new ArrayList<>();
|
||||
this.roles = new HashMap<>();
|
||||
}
|
||||
|
||||
private void applyEvent(CreateGroupEvent event) {
|
||||
title = event.getGroupTitle();
|
||||
description = event.getGroupDescription();
|
||||
id = event.getGroup_id();
|
||||
visibility = event.getGroupVisibility();
|
||||
parent = event.getGroupParent();
|
||||
type = event.getGroupType();
|
||||
}
|
||||
|
||||
private void applyEvent(UpdateRoleEvent event) throws UserNotFoundException {
|
||||
|
||||
Reference in New Issue
Block a user