Updated entities

pull/30/head
atbest 6 years ago
parent fe255a5577
commit 891f6ed404
  1. 2
      app/src/main/java/io/legado/app/data/entities/Book.kt
  2. 4
      app/src/main/java/io/legado/app/data/entities/ReplaceRule.kt
  3. 2
      app/src/main/java/io/legado/app/data/entities/Source.kt

@ -5,7 +5,7 @@ import androidx.room.*
import kotlinx.android.parcel.Parcelize
@Parcelize
@Entity(tableName = "books", indices = [(Index(value = ["descUrl"]))])
@Entity(tableName = "books", indices = [(Index(value = ["descUrl"], unique = true))])
data class Book(@PrimaryKey
var descUrl: String = "", // 详情页Url(本地书源存储完整文件路径)
var sourceId: Int = -1, // 书源规则id(默认-1,表示本地书籍)

@ -16,8 +16,8 @@ data class ReplaceRule(
val pattern: String? = null,
val replacement: String? = null,
val scope: String? = null,
val isEnabled: Boolean? = null,
val isRegex: Boolean? = null,
val isEnabled: Boolean = true,
val isRegex: Boolean = true,
val order: Int = 0
) : Parcelable

@ -21,7 +21,7 @@ data class Source(@PrimaryKey(autoGenerate = true)
var loginUrl: String? = null, // 登录地址
var isEnabled: Boolean = true, // 是否启用
var lastUpdateTime: Long = 0, // 最后更新时间,用于排序
var serialNumber: Int = 0, // 手动排序编号
var customOrder: Int = 0, // 手动排序编号
var weight: Int = 0, // 智能排序的权重
var exploreRule: String? = null, // 发现规则
var searchRule: String? = null, // 搜索规则

Loading…
Cancel
Save