blob: 571c16e1b7e262e422c754874024d7b31483e563 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
import Dexie, { type Table } from 'dexie';
export interface Chapter {
id: number;
chapters: number | null;
volumes: number | null;
}
export class ChapterDatabase extends Dexie {
chapters: Table<Chapter>;
constructor() {
super('chapters');
this.version(1).stores({
chapters: 'id, chapters, volumes'
});
this.chapters = this.table('chapters');
}
}
export const database = new ChapterDatabase();
|