diff options
Diffstat (limited to '')
-rw-r--r-- | app/src/main/java/User/UserData.java (renamed from app/src/main/java/User/User.java) | 25 |
1 files changed, 5 insertions, 20 deletions
diff --git a/app/src/main/java/User/User.java b/app/src/main/java/User/UserData.java index 3fd8dcb3..89eafb96 100644 --- a/app/src/main/java/User/User.java +++ b/app/src/main/java/User/UserData.java @@ -2,17 +2,12 @@ package User; import android.arch.persistence.room.ColumnInfo; import android.arch.persistence.room.Entity; -import android.arch.persistence.room.PrimaryKey; import android.support.annotation.NonNull; +import SubscribedUserDatabase.SubscribedUserData; + @Entity(tableName = "users") -public class User { - @PrimaryKey - @NonNull - @ColumnInfo(name = "user_name") - private String userName; - @ColumnInfo(name = "icon") - private String icon; +public class UserData extends SubscribedUserData { @ColumnInfo(name = "banner") private String banner; @ColumnInfo(name = "karma") @@ -22,24 +17,14 @@ public class User { @ColumnInfo(name = "is_friend") private boolean isFriend; - User(@NonNull String userName, String icon, String banner, int karma, boolean isGold, boolean isFriend) { - this.userName = userName; - this.icon = icon; + public UserData(@NonNull String name, String iconUrl, String banner, int karma, boolean isGold, boolean isFriend) { + super(name, iconUrl); this.banner = banner; this.karma = karma; this.isGold = isGold; this.isFriend = isFriend; } - @NonNull - public String getUserName() { - return userName; - } - - public String getIcon() { - return icon; - } - public String getBanner() { return banner; } |