diff --git a/db/src/main/java/com/readrops/db/pojo/FolderWithFeedCount.java b/db/src/main/java/com/readrops/db/pojo/FolderWithFeedCount.java deleted file mode 100644 index a4fda1ba..00000000 --- a/db/src/main/java/com/readrops/db/pojo/FolderWithFeedCount.java +++ /dev/null @@ -1,34 +0,0 @@ -package com.readrops.db.pojo; - -import androidx.room.ColumnInfo; -import androidx.room.Embedded; - -import com.readrops.db.entities.Folder; - -public class FolderWithFeedCount { - - @Embedded - private Folder folder; - - @ColumnInfo(name = "feed_count") - private int feedCount; - - public FolderWithFeedCount() { - } - - public Folder getFolder() { - return folder; - } - - public void setFolder(Folder folder) { - this.folder = folder; - } - - public int getFeedCount() { - return feedCount; - } - - public void setFeedCount(int feedCount) { - this.feedCount = feedCount; - } -} diff --git a/db/src/main/java/com/readrops/db/pojo/FolderWithFeedCount.kt b/db/src/main/java/com/readrops/db/pojo/FolderWithFeedCount.kt new file mode 100644 index 00000000..b87d5178 --- /dev/null +++ b/db/src/main/java/com/readrops/db/pojo/FolderWithFeedCount.kt @@ -0,0 +1,10 @@ +package com.readrops.db.pojo + +import androidx.room.ColumnInfo +import androidx.room.Embedded +import com.readrops.db.entities.Folder + +data class FolderWithFeedCount( + @Embedded val folder: Folder, + @ColumnInfo(name = "feed_count") val feedCount: Int, +) \ No newline at end of file diff --git a/db/src/main/java/com/readrops/db/pojo/ItemWithFeed.java b/db/src/main/java/com/readrops/db/pojo/ItemWithFeed.java deleted file mode 100644 index 6a23e6f8..00000000 --- a/db/src/main/java/com/readrops/db/pojo/ItemWithFeed.java +++ /dev/null @@ -1,99 +0,0 @@ -package com.readrops.db.pojo; - -import androidx.room.ColumnInfo; -import androidx.room.Embedded; -import androidx.annotation.ColorInt; - -import com.readrops.db.entities.Folder; -import com.readrops.db.entities.Item; - -public class ItemWithFeed { - - @Embedded - private Item item; - - @ColumnInfo(name = "name") - private String feedName; - - @ColumnInfo(name = "feedId") - private int feedId; - - @ColumnInfo(name = "text_color") - private @ColorInt int color; - - @ColumnInfo(name = "background_color") - private @ColorInt int bgColor; - - @ColumnInfo(name = "icon_url") - private String feedIconUrl; - - @ColumnInfo(name = "siteUrl") - private String websiteUrl; - - @Embedded(prefix = "folder_") - private Folder folder; - - public Item getItem() { - return item; - } - - public void setItem(Item item) { - this.item = item; - } - - public String getFeedName() { - return feedName; - } - - public void setFeedName(String feedName) { - this.feedName = feedName; - } - - public int getFeedId() { - return feedId; - } - - public void setFeedId(int feedId) { - this.feedId = feedId; - } - - public @ColorInt int getColor() { - return color; - } - - public void setColor(@ColorInt int color) { - this.color = color; - } - - public String getFeedIconUrl() { - return feedIconUrl; - } - - public void setFeedIconUrl(String feedIconUrl) { - this.feedIconUrl = feedIconUrl; - } - - public @ColorInt int getBgColor() { - return bgColor; - } - - public void setBgColor(@ColorInt int bgColor) { - this.bgColor = bgColor; - } - - public Folder getFolder() { - return folder; - } - - public void setFolder(Folder folder) { - this.folder = folder; - } - - public String getWebsiteUrl() { - return websiteUrl; - } - - public void setWebsiteUrl(String websiteUrl) { - this.websiteUrl = websiteUrl; - } -} diff --git a/db/src/main/java/com/readrops/db/pojo/ItemWithFeed.kt b/db/src/main/java/com/readrops/db/pojo/ItemWithFeed.kt new file mode 100644 index 00000000..24357509 --- /dev/null +++ b/db/src/main/java/com/readrops/db/pojo/ItemWithFeed.kt @@ -0,0 +1,18 @@ +package com.readrops.db.pojo + +import androidx.annotation.ColorInt +import androidx.room.ColumnInfo +import androidx.room.Embedded +import com.readrops.db.entities.Folder +import com.readrops.db.entities.Item + +data class ItemWithFeed( + @Embedded val item: Item, + @ColumnInfo(name = "name") val feedName: String, + @ColumnInfo(name = "feedId") val feedId: Int, + @ColumnInfo(name = "text_color") @ColorInt val color: Int, + @ColumnInfo(name = "background_color") @ColorInt val bgColor: Int, + @ColumnInfo(name = "icon_url") val feedIconUrl: String?, + @ColumnInfo(name = "siteUrl") val websiteUrl: String?, + @Embedded(prefix = "folder_") val folder: Folder, +) \ No newline at end of file