|
- import Dexie, { Table } from 'dexie';
- import { IAnnotation } from './Annotation';
- import { IAnnotationSource } from './AnnotationSource';
-
- export class AnnotationDexie extends Dexie {
- annotations!: Table<IAnnotation>;
- annotationSources!: Table<IAnnotationSource>;
-
- constructor() {
- super('AnnotationDB');
- this.version(3).stores({
- annotations: '++_id, source',
- annotationSources: '++_id',
- });
- }
- }
-
- export const db = new AnnotationDexie();
|