From 2f1263c82c7b5a55b4a73618553acf958343fdf8 Mon Sep 17 00:00:00 2001 From: Ash Date: Mon, 16 May 2022 11:11:24 +0800 Subject: [PATCH] Change to variable fields --- .../java/me/ash/reader/data/entity/Article.kt | 16 ++++++++-------- .../me/ash/reader/data/entity/ArticleWithFeed.kt | 4 ++-- .../main/java/me/ash/reader/data/entity/Feed.kt | 8 ++++---- .../me/ash/reader/data/entity/FeedWithArticle.kt | 4 ++-- .../me/ash/reader/data/entity/FeedWithGroup.kt | 4 ++-- .../main/java/me/ash/reader/data/entity/Group.kt | 6 +++--- .../me/ash/reader/data/entity/GroupWithFeed.kt | 4 ++-- 7 files changed, 23 insertions(+), 23 deletions(-) diff --git a/app/src/main/java/me/ash/reader/data/entity/Article.kt b/app/src/main/java/me/ash/reader/data/entity/Article.kt index c358d2b..c18859e 100644 --- a/app/src/main/java/me/ash/reader/data/entity/Article.kt +++ b/app/src/main/java/me/ash/reader/data/entity/Article.kt @@ -18,13 +18,13 @@ import java.util.* ) data class Article( @PrimaryKey - val id: String, + var id: String, @ColumnInfo - val date: Date, + var date: Date, @ColumnInfo - val title: String, + var title: String, @ColumnInfo - val author: String? = null, + var author: String? = null, @ColumnInfo var rawDescription: String, @ColumnInfo @@ -32,13 +32,13 @@ data class Article( @ColumnInfo var fullContent: String? = null, @ColumnInfo - val img: String? = null, + var img: String? = null, @ColumnInfo - val link: String, + var link: String, @ColumnInfo(index = true) - val feedId: String, + var feedId: String, @ColumnInfo(index = true) - val accountId: Int, + var accountId: Int, @ColumnInfo(defaultValue = "true") var isUnread: Boolean = true, @ColumnInfo(defaultValue = "false") diff --git a/app/src/main/java/me/ash/reader/data/entity/ArticleWithFeed.kt b/app/src/main/java/me/ash/reader/data/entity/ArticleWithFeed.kt index 4910ceb..c3ccc6f 100644 --- a/app/src/main/java/me/ash/reader/data/entity/ArticleWithFeed.kt +++ b/app/src/main/java/me/ash/reader/data/entity/ArticleWithFeed.kt @@ -5,7 +5,7 @@ import androidx.room.Relation data class ArticleWithFeed( @Embedded - val article: Article, + var article: Article, @Relation(parentColumn = "feedId", entityColumn = "id") - val feed: Feed, + var feed: Feed, ) diff --git a/app/src/main/java/me/ash/reader/data/entity/Feed.kt b/app/src/main/java/me/ash/reader/data/entity/Feed.kt index 6c8f0c1..8dafacf 100644 --- a/app/src/main/java/me/ash/reader/data/entity/Feed.kt +++ b/app/src/main/java/me/ash/reader/data/entity/Feed.kt @@ -14,17 +14,17 @@ import androidx.room.* ) data class Feed( @PrimaryKey - val id: String, + var id: String, @ColumnInfo - val name: String, + var name: String, @ColumnInfo var icon: String? = null, @ColumnInfo - val url: String, + var url: String, @ColumnInfo(index = true) var groupId: String, @ColumnInfo(index = true) - val accountId: Int, + var accountId: Int, @ColumnInfo(defaultValue = "false") var isNotification: Boolean = false, @ColumnInfo(defaultValue = "false") diff --git a/app/src/main/java/me/ash/reader/data/entity/FeedWithArticle.kt b/app/src/main/java/me/ash/reader/data/entity/FeedWithArticle.kt index 48ee0ab..f7e77ac 100644 --- a/app/src/main/java/me/ash/reader/data/entity/FeedWithArticle.kt +++ b/app/src/main/java/me/ash/reader/data/entity/FeedWithArticle.kt @@ -5,7 +5,7 @@ import androidx.room.Relation data class FeedWithArticle( @Embedded - val feed: Feed, + var feed: Feed, @Relation(parentColumn = "id", entityColumn = "feedId") - val articles: List
+ var articles: List
) diff --git a/app/src/main/java/me/ash/reader/data/entity/FeedWithGroup.kt b/app/src/main/java/me/ash/reader/data/entity/FeedWithGroup.kt index 01d4087..bf254b7 100644 --- a/app/src/main/java/me/ash/reader/data/entity/FeedWithGroup.kt +++ b/app/src/main/java/me/ash/reader/data/entity/FeedWithGroup.kt @@ -5,7 +5,7 @@ import androidx.room.Relation data class FeedWithGroup( @Embedded - val feed: Feed, + var feed: Feed, @Relation(parentColumn = "groupId", entityColumn = "id") - val group: Group + var group: Group ) diff --git a/app/src/main/java/me/ash/reader/data/entity/Group.kt b/app/src/main/java/me/ash/reader/data/entity/Group.kt index 5aa7962..4929d4b 100644 --- a/app/src/main/java/me/ash/reader/data/entity/Group.kt +++ b/app/src/main/java/me/ash/reader/data/entity/Group.kt @@ -8,11 +8,11 @@ import androidx.room.PrimaryKey @Entity(tableName = "group") data class Group( @PrimaryKey - val id: String, + var id: String, @ColumnInfo - val name: String, + var name: String, @ColumnInfo(index = true) - val accountId: Int, + var accountId: Int, ) { @Ignore var important: Int? = 0 diff --git a/app/src/main/java/me/ash/reader/data/entity/GroupWithFeed.kt b/app/src/main/java/me/ash/reader/data/entity/GroupWithFeed.kt index 28f2c47..f15efdb 100644 --- a/app/src/main/java/me/ash/reader/data/entity/GroupWithFeed.kt +++ b/app/src/main/java/me/ash/reader/data/entity/GroupWithFeed.kt @@ -5,7 +5,7 @@ import androidx.room.Relation data class GroupWithFeed( @Embedded - val group: Group, + var group: Group, @Relation(parentColumn = "id", entityColumn = "groupId") - val feeds: MutableList + var feeds: MutableList )