LaiTool/src/define/db/model/Book/BookBackTaskListModel.ts

29 lines
710 B
TypeScript
Raw Normal View History

2024-06-24 13:11:19 +08:00
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'
}
}