29 lines
710 B
TypeScript
29 lines
710 B
TypeScript
|
|
import Realm, { ObjectSchema } from 'realm'
|
||
|
|
import { BookBackTaskStatus, BookBackTaskType } from '../../../enum/bookEnum'
|
||
|
|
|
||
|
|
export class BookBackTaskList extends Realm.Object<BookBackTaskList> {
|
||
|
|
id: string
|
||
|
|
bookId: string
|
||
|
|
bookTaskId: string
|
||
|
|
name: string
|
||
|
|
type: BookBackTaskType
|
||
|
|
status: BookBackTaskStatus
|
||
|
|
createTime: Date
|
||
|
|
updateTime: Date
|
||
|
|
|
||
|
|
static schema: ObjectSchema = {
|
||
|
|
name: 'BookBackTaskList',
|
||
|
|
properties: {
|
||
|
|
id: 'string',
|
||
|
|
bookId: { type: 'string', indexed: true },
|
||
|
|
bookTaskId: { type: 'string', indexed: true },
|
||
|
|
name: 'string',
|
||
|
|
type: 'string',
|
||
|
|
status: 'string',
|
||
|
|
createTime: 'date',
|
||
|
|
updateTime: 'date'
|
||
|
|
},
|
||
|
|
primaryKey: 'id'
|
||
|
|
}
|
||
|
|
}
|