Some checks failed
CI - Multi-Platform Native / Build iOS (RSSuper) (push) Has been cancelled
CI - Multi-Platform Native / Build macOS (push) Has been cancelled
CI - Multi-Platform Native / Build Android (push) Has been cancelled
CI - Multi-Platform Native / Build Linux (push) Has been cancelled
CI - Multi-Platform Native / Build Summary (push) Has been cancelled
58 lines
1.2 KiB
Kotlin
58 lines
1.2 KiB
Kotlin
package com.rssuper.database.entities
|
|
|
|
import androidx.room.Entity
|
|
import androidx.room.ForeignKey
|
|
import androidx.room.Index
|
|
import androidx.room.PrimaryKey
|
|
import java.util.Date
|
|
|
|
@Entity(
|
|
tableName = "feed_items",
|
|
foreignKeys = [
|
|
ForeignKey(
|
|
entity = SubscriptionEntity::class,
|
|
parentColumns = ["id"],
|
|
childColumns = ["subscriptionId"],
|
|
onDelete = ForeignKey.CASCADE
|
|
)
|
|
],
|
|
indices = [
|
|
Index(value = ["subscriptionId"]),
|
|
Index(value = ["published"])
|
|
]
|
|
)
|
|
data class FeedItemEntity(
|
|
@PrimaryKey
|
|
val id: String,
|
|
|
|
val subscriptionId: String,
|
|
|
|
val title: String,
|
|
|
|
val link: String? = null,
|
|
|
|
val description: String? = null,
|
|
|
|
val content: String? = null,
|
|
|
|
val author: String? = null,
|
|
|
|
val published: Date? = null,
|
|
|
|
val updated: Date? = null,
|
|
|
|
val categories: String? = null,
|
|
|
|
val enclosureUrl: String? = null,
|
|
|
|
val enclosureType: String? = null,
|
|
|
|
val enclosureLength: Long? = null,
|
|
|
|
val guid: String? = null,
|
|
|
|
val isRead: Boolean = false,
|
|
|
|
val isStarred: Boolean = false
|
|
)
|