mirror of
https://github.com/gedoor/legado.git
synced 2025-08-10 00:52:30 +00:00
替换规则添加作用于标题和作用于正文
This commit is contained in:
1557
app/schemas/io.legado.app.data.AppDatabase/44.json
Normal file
1557
app/schemas/io.legado.app.data.AppDatabase/44.json
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,7 @@
|
||||
package io.legado.app.data
|
||||
|
||||
import android.content.Context
|
||||
import androidx.room.AutoMigration
|
||||
import androidx.room.Database
|
||||
import androidx.room.Room
|
||||
import androidx.room.RoomDatabase
|
||||
@@ -16,13 +17,14 @@ val appDb by lazy {
|
||||
}
|
||||
|
||||
@Database(
|
||||
version = 43,
|
||||
version = 44,
|
||||
exportSchema = true,
|
||||
entities = [Book::class, BookGroup::class, BookSource::class, BookChapter::class,
|
||||
ReplaceRule::class, SearchBook::class, SearchKeyword::class, Cookie::class,
|
||||
RssSource::class, Bookmark::class, RssArticle::class, RssReadRecord::class,
|
||||
RssStar::class, TxtTocRule::class, ReadRecord::class, HttpTTS::class, Cache::class,
|
||||
RuleSub::class]
|
||||
RuleSub::class],
|
||||
autoMigrations = [AutoMigration(from = 43, to = 44)]
|
||||
)
|
||||
abstract class AppDatabase : RoomDatabase() {
|
||||
|
||||
|
||||
@@ -29,8 +29,8 @@ data class Book(
|
||||
var tocUrl: String = "", // 目录页Url (toc=table of Contents)
|
||||
var origin: String = BookType.local, // 书源URL(默认BookType.local)
|
||||
var originName: String = "", //书源名称 or 本地书籍文件名
|
||||
override var name: String = "", // 书籍名称(书源获取)
|
||||
override var author: String = "", // 作者名称(书源获取)
|
||||
override var name: String = "", // 书籍名称(书源获取)
|
||||
override var author: String = "", // 作者名称(书源获取)
|
||||
override var kind: String? = null, // 分类信息(书源获取)
|
||||
var customTag: String? = null, // 分类信息(用户修改)
|
||||
var coverUrl: String? = null, // 封面Url(书源获取)
|
||||
|
||||
@@ -18,14 +18,33 @@ import java.util.regex.PatternSyntaxException
|
||||
data class ReplaceRule(
|
||||
@PrimaryKey(autoGenerate = true)
|
||||
var id: Long = System.currentTimeMillis(),
|
||||
//名称
|
||||
@ColumnInfo(defaultValue = "")
|
||||
var name: String = "",
|
||||
//分组
|
||||
var group: String? = null,
|
||||
//替换内容
|
||||
@ColumnInfo(defaultValue = "")
|
||||
var pattern: String = "",
|
||||
//替换为
|
||||
@ColumnInfo(defaultValue = "")
|
||||
var replacement: String = "",
|
||||
//作用范围
|
||||
var scope: String? = null,
|
||||
//作用于标题
|
||||
@ColumnInfo(defaultValue = "0")
|
||||
var scopeTitle: Boolean = false,
|
||||
//作用于正文
|
||||
@ColumnInfo(defaultValue = "1")
|
||||
var scopeContent: Boolean = true,
|
||||
//是否启用
|
||||
@ColumnInfo(defaultValue = "1")
|
||||
var isEnabled: Boolean = true,
|
||||
//是否正则
|
||||
@ColumnInfo(defaultValue = "1")
|
||||
var isRegex: Boolean = true,
|
||||
@ColumnInfo(name = "sortOrder")
|
||||
//排序
|
||||
@ColumnInfo(name = "sortOrder", defaultValue = "0")
|
||||
var order: Int = 0
|
||||
) : Parcelable {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user