diff options
-rw-r--r-- | app/src/main/java/it/niedermann/nextcloud/deck/model/board/Card.java | 11 | ||||
-rw-r--r-- | app/src/main/java/it/niedermann/nextcloud/deck/model/board/User.java | 46 |
2 files changed, 53 insertions, 4 deletions
diff --git a/app/src/main/java/it/niedermann/nextcloud/deck/model/board/Card.java b/app/src/main/java/it/niedermann/nextcloud/deck/model/board/Card.java index d74b66ed0..2cffedac3 100644 --- a/app/src/main/java/it/niedermann/nextcloud/deck/model/board/Card.java +++ b/app/src/main/java/it/niedermann/nextcloud/deck/model/board/Card.java @@ -4,7 +4,6 @@ import java.time.LocalDate; import java.util.ArrayList; import java.util.List; -import it.niedermann.nextcloud.deck.model.DBStatus; import it.niedermann.nextcloud.deck.model.RemoteEntity; public class Card extends RemoteEntity { @@ -17,7 +16,7 @@ public class Card extends RemoteEntity { private LocalDate createdAt; private LocalDate deletedAt; private List<Label> labels = new ArrayList<>(); - private String assignedUsers; + private List<User> assignedUsers; private String attachments; private int attachmentCount; private String owner; @@ -100,14 +99,18 @@ public class Card extends RemoteEntity { this.labels.add(label); } - public String getAssignedUsers() { + public List<User> getAssignedUsers() { return assignedUsers; } - public void setAssignedUsers(String assignedUsers) { + public void setAssignedUsers(List<User> assignedUsers) { this.assignedUsers = assignedUsers; } + public void addAssignedUser(User user) { + this.assignedUsers.add(user); + } + public String getAttachments() { return attachments; } diff --git a/app/src/main/java/it/niedermann/nextcloud/deck/model/board/User.java b/app/src/main/java/it/niedermann/nextcloud/deck/model/board/User.java new file mode 100644 index 000000000..34c4210ad --- /dev/null +++ b/app/src/main/java/it/niedermann/nextcloud/deck/model/board/User.java @@ -0,0 +1,46 @@ +package it.niedermann.nextcloud.deck.model.board; + +import java.io.Serializable; + +import it.niedermann.nextcloud.deck.model.RemoteEntity; + +public class User implements Serializable { + + private String primaryKey; + private String uid; + private String displayname; + + public User() { + super(); + } + + public User(String primaryKey, String uid, String displayname) { + this.primaryKey = primaryKey; + this.uid = uid; + this.displayname = displayname; + } + + public String getPrimaryKey() { + return primaryKey; + } + + public void setPrimaryKey(String primaryKey) { + this.primaryKey = primaryKey; + } + + public String getUid() { + return uid; + } + + public void setUid(String uid) { + this.uid = uid; + } + + public String getDisplayname() { + return displayname; + } + + public void setDisplayname(String displayname) { + this.displayname = displayname; + } +} |