2024-08-03 12:46:12 +08:00
|
|
|
// @ts-ignore
|
|
|
|
|
import Realm from 'realm'
|
2024-06-24 13:11:19 +08:00
|
|
|
import { BookType } from '../../../enum/bookEnum'
|
|
|
|
|
|
|
|
|
|
export class BookModel extends Realm.Object<BookModel> {
|
|
|
|
|
id: string
|
|
|
|
|
no: number
|
|
|
|
|
name: string
|
|
|
|
|
bookFolderPath: string
|
|
|
|
|
imageFolder: string | null
|
|
|
|
|
type: BookType
|
|
|
|
|
oldVideoPath: string | null
|
|
|
|
|
srtPath: string | null
|
|
|
|
|
audioPath: string | null
|
2024-08-03 12:46:12 +08:00
|
|
|
draftSrtStyle: string | null // 草稿字幕样式
|
|
|
|
|
backgroundMusic: string | null // 背景音乐ID
|
|
|
|
|
friendlyReminder: string | null // 友情提示
|
2024-06-24 13:11:19 +08:00
|
|
|
updateTime: Date
|
|
|
|
|
createTime: Date
|
2024-07-13 15:44:13 +08:00
|
|
|
version: string
|
2024-08-03 12:46:12 +08:00
|
|
|
imageStyle: string[] | null // 软件内置的样式
|
|
|
|
|
autoAnalyzeCharacter: string | null // 自动分析角色设置
|
|
|
|
|
customizeImageStyle: string[] | null // 自定义的样式
|
|
|
|
|
videoConfig: string | null // 合成视频设置
|
|
|
|
|
prefixPrompt: string | null // 前缀
|
|
|
|
|
suffixPrompt: string | null // 后缀
|
2024-07-13 15:44:13 +08:00
|
|
|
subtitlePosition: string | null
|
2024-06-24 13:11:19 +08:00
|
|
|
|
2024-08-03 12:46:12 +08:00
|
|
|
static schema: Realm.ObjectSchema = {
|
2024-06-24 13:11:19 +08:00
|
|
|
name: 'Book',
|
|
|
|
|
properties: {
|
|
|
|
|
id: 'string',
|
|
|
|
|
no: 'int',
|
|
|
|
|
name: 'string',
|
|
|
|
|
bookFolderPath: 'string',
|
|
|
|
|
type: 'string',
|
|
|
|
|
oldVideoPath: 'string?',
|
|
|
|
|
srtPath: 'string?',
|
|
|
|
|
audioPath: 'string?',
|
2024-08-03 12:46:12 +08:00
|
|
|
draftSrtStyle : 'string?',
|
|
|
|
|
backgroundMusic: 'string?',
|
|
|
|
|
friendlyReminder: 'string?',
|
2024-06-24 13:11:19 +08:00
|
|
|
imageFolder: 'string?',
|
|
|
|
|
updateTime: 'date',
|
|
|
|
|
createTime: 'date',
|
2024-07-13 15:44:13 +08:00
|
|
|
version: 'string',
|
2024-08-03 12:46:12 +08:00
|
|
|
imageStyle: 'string?[]',
|
|
|
|
|
autoAnalyzeCharacter: 'string?',
|
|
|
|
|
customizeImageStyle: 'string?[]',
|
|
|
|
|
videoConfig: "string?",
|
|
|
|
|
prefixPrompt: "string?",
|
|
|
|
|
suffixPrompt: "string?",
|
2024-07-13 15:44:13 +08:00
|
|
|
subtitlePosition: 'string?'
|
2024-06-24 13:11:19 +08:00
|
|
|
},
|
|
|
|
|
// 主键为_id
|
|
|
|
|
primaryKey: 'id'
|
|
|
|
|
}
|
|
|
|
|
}
|