diff --git a/app/src/main/java/io/github/chronosx88/influence/models/roomEntities/ChatEntity.java b/app/src/main/java/io/github/chronosx88/influence/models/roomEntities/ChatEntity.java index f55a1a0..79861f1 100644 --- a/app/src/main/java/io/github/chronosx88/influence/models/roomEntities/ChatEntity.java +++ b/app/src/main/java/io/github/chronosx88/influence/models/roomEntities/ChatEntity.java @@ -1,12 +1,13 @@ package io.github.chronosx88.influence.models.roomEntities; +import androidx.annotation.NonNull; import androidx.room.ColumnInfo; import androidx.room.Entity; import androidx.room.PrimaryKey; @Entity(tableName = "chats") public class ChatEntity { - @PrimaryKey String id; + @NonNull @PrimaryKey String id; @ColumnInfo String name; @ColumnInfo String keyPairID; diff --git a/app/src/main/java/io/github/chronosx88/influence/models/roomEntities/MessageEntity.java b/app/src/main/java/io/github/chronosx88/influence/models/roomEntities/MessageEntity.java index eed5e44..a9fd45d 100644 --- a/app/src/main/java/io/github/chronosx88/influence/models/roomEntities/MessageEntity.java +++ b/app/src/main/java/io/github/chronosx88/influence/models/roomEntities/MessageEntity.java @@ -7,7 +7,7 @@ import androidx.room.PrimaryKey; @Entity(tableName = "messages") public class MessageEntity { - @PrimaryKey String id; + @NonNull @PrimaryKey String id; @ColumnInfo String chatID; @ColumnInfo String sender; @ColumnInfo String text;