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. 4
      app/src/main/java/io/legado/app/data/entities/Source.kt

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

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

@ -14,14 +14,14 @@ data class Source(@PrimaryKey(autoGenerate = true)
@ColumnInfo(name = "sourceId") @ColumnInfo(name = "sourceId")
var id: Int = 0, // 编号 var id: Int = 0, // 编号
var name: String = "", // 名称 var name: String = "", // 名称
var origin: String = "", // 地址,包括 http/https var origin: String = "", // 地址,包括 http/https
var type: Int = 0, // 类型,0 文本,1 音频 var type: Int = 0, // 类型,0 文本,1 音频
var group: String? = null, // 分组 var group: String? = null, // 分组
var header: String? = null, // header var header: String? = null, // header
var loginUrl: String? = null, // 登录地址 var loginUrl: String? = null, // 登录地址
var isEnabled: Boolean = true, // 是否启用 var isEnabled: Boolean = true, // 是否启用
var lastUpdateTime: Long = 0, // 最后更新时间,用于排序 var lastUpdateTime: Long = 0, // 最后更新时间,用于排序
var serialNumber: Int = 0, // 手动排序编号 var customOrder: Int = 0, // 手动排序编号
var weight: Int = 0, // 智能排序的权重 var weight: Int = 0, // 智能排序的权重
var exploreRule: String? = null, // 发现规则 var exploreRule: String? = null, // 发现规则
var searchRule: String? = null, // 搜索规则 var searchRule: String? = null, // 搜索规则

Loading…
Cancel
Save