1

change create group event + new group fields

This commit is contained in:
Christoph
2020-03-11 15:27:56 +01:00
parent aaa3437eed
commit e8770066f8
2 changed files with 16 additions and 12 deletions

View File

@ -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 {