V 2.2.10 新增MJ的代理模式
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
import Realm, { ObjectSchema } from 'realm'
|
||||
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
|
||||
updateTime: Date
|
||||
createTime: Date
|
||||
test: string | null
|
||||
|
||||
static schema: ObjectSchema = {
|
||||
name: 'Book',
|
||||
properties: {
|
||||
id: 'string',
|
||||
no: 'int',
|
||||
name: 'string',
|
||||
bookFolderPath: 'string',
|
||||
type: 'string',
|
||||
oldVideoPath: 'string?',
|
||||
srtPath: 'string?',
|
||||
audioPath: 'string?',
|
||||
imageFolder: 'string?',
|
||||
updateTime: 'date',
|
||||
createTime: 'date',
|
||||
test: 'string?'
|
||||
},
|
||||
// 主键为_id
|
||||
primaryKey: 'id'
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user