import Dexie, { type Table } from 'dexie'; export interface Chapter { id: number; chapters: number | null; } export class ChapterDatabase extends Dexie { chapters: Table; constructor() { super('chapterDatabase'); this.version(1).stores({ chapters: 'id, chapters' }); this.chapters = this.table('chapters'); } } export const chapterDatabase = new ChapterDatabase();