Merge remote-tracking branch 'origin/master' into desirepath

pull/31/head
Invinciblelee 6 years ago
commit 2c8b0a31a4
  1. 21
      app/src/main/java/io/legado/app/data/entities/Chapter.kt

@ -10,14 +10,19 @@ import kotlinx.android.parcel.Parcelize
@Parcelize
@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
var name: String = "",
var bookUrl: String = "",
var index: Int = 0,
var resourceUrl: String? = null,
var tag: String? = null,
var start: Long? = null,
var end: Long? = null
var url: String = "", // 章节地址
var name: String = "", // 章节标题
var bookUrl: String = "", // 书籍地址
var index: Int = 0, // 章节序号
var resourceUrl: String? = null, // 音频真实URL
var tag: String? = null, //
var start: Long? = null, // 章节起始地址
var end: Long? = null // 章节终止地址
) : Parcelable

Loading…
Cancel
Save