1

removed final modifier from aggregate-id

This commit is contained in:
Christoph
2020-03-09 12:28:46 +01:00
parent cfb6af52c2
commit c7f9c0b985
2 changed files with 9 additions and 11 deletions

View File

@ -14,17 +14,19 @@ import java.util.*;
public class Group extends Aggregate {
private String title;
private String description;
private List<User> members;
private Map<User, Role> roles;
private final List<User> members;
private final Map<User, Role> roles;
public Group(CreateGroupEvent event) {
super(event.getGroup_id());
this.title = event.getGroupTitle();
this.description = event.getGroupDescription();
public Group() {
this.members = new ArrayList<>();
this.roles = new HashMap<>();
}
private void applyEvent(CreateGroupEvent event) {
title = event.getGroupTitle();
description = event.getGroupDescription();
}
private void applyEvent(UpdateRoleEvent event) {
User user;