|
|
@ -10,14 +10,19 @@ import kotlinx.android.parcel.Parcelize |
|
|
|
|
|
|
|
|
|
|
|
@Parcelize |
|
|
|
@Parcelize |
|
|
|
@Entity(tableName = "chapters", |
|
|
|
@Entity(tableName = "chapters", |
|
|
|
indices = [(Index(value = ["feedId", "feedLink"], unique = true))]) |
|
|
|
indices = [(Index(value = ["url"], unique = true)), (Index(value = ["bookUrl", "index"], unique = true))], |
|
|
|
|
|
|
|
foreignKeys = [(ForeignKey(entity = Book::class, |
|
|
|
|
|
|
|
parentColumns = ["descUrl"], |
|
|
|
|
|
|
|
childColumns = ["bookUrl"], |
|
|
|
|
|
|
|
onDelete = ForeignKey.CASCADE))]) // 删除书籍时自动删除章节 |
|
|
|
data class Chapter(@PrimaryKey |
|
|
|
data class Chapter(@PrimaryKey |
|
|
|
var name: String = "", |
|
|
|
var url: String = "", // 章节地址 |
|
|
|
var bookUrl: String = "", |
|
|
|
var name: String = "", // 章节标题 |
|
|
|
var index: Int = 0, |
|
|
|
var bookUrl: String = "", // 书籍地址 |
|
|
|
var resourceUrl: String? = null, |
|
|
|
var index: Int = 0, // 章节序号 |
|
|
|
var tag: String? = null, |
|
|
|
var resourceUrl: String? = null, // 音频真实URL |
|
|
|
var start: Long? = null, |
|
|
|
var tag: String? = null, // |
|
|
|
var end: Long? = null |
|
|
|
var start: Long? = null, // 章节起始地址 |
|
|
|
|
|
|
|
var end: Long? = null // 章节终止地址 |
|
|
|
) : Parcelable |
|
|
|
) : Parcelable |
|
|
|
|
|
|
|
|
|
|
|