Merge pull request #20 from gedoor/atbest

Added source entities
pull/22/head
atbest 6 years ago committed by GitHub
commit b5a75835d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 27
      app/src/main/java/io/legado/app/data/entities/Source.kt

@ -1,2 +1,29 @@
package io.legado.app.data.entities package io.legado.app.data.entities
import android.os.Parcelable
import androidx.room.Entity
import androidx.room.Index
import androidx.room.PrimaryKey
import kotlinx.android.parcel.Parcelize
@Parcelize
@Entity(tableName = "sources",
indices = [(Index(value = ["id"]))])
data class Source(@PrimaryKey
var id: Int = 0, // 编号
var host: String = "", // 地址,包括 http/https
var name: String = "", // 名称
var type: Int = 0, // 类型,0 文本,1 音频
var group: String? = null, // 分组
var header: String? = null, // header
var loginUrl: String? = null, // 登录地址
var isEnabled: Boolean = true, // 是否启用
var lastUpdateTime: Long = 0, // 最后更新时间,用于排序
var serialNumber: Int = 0, // 手动排序编号
var weight: Int = 0, // 智能排序的权重
var exploreRule: String? = null, // 发现规则
var searchRule: String? = null, // 搜索规则
var bookInfoRule: String? = null, // 书籍信息页规则
var tocRule: String? = null, // 目录页规则
var contentRule: String? = null // 正文页规则
) : Parcelable
Loading…
Cancel
Save