pull/32/head
gedoor 6 years ago
parent d5b78fa1e2
commit d90ea77f08
  1. 3
      app/src/main/java/io/legado/app/data/entities/Chapter.kt

@ -10,12 +10,13 @@ import kotlinx.android.parcel.Parcelize
@Parcelize
@Entity(tableName = "chapters",
primaryKeys = ["url", "bookUrl"],
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(
var url: String = "", // 章节地址
var title: String = "", // 章节标题
var bookUrl: String = "", // 书籍地址

Loading…
Cancel
Save