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