aboutsummaryrefslogtreecommitdiff
path: root/src/lib/Media/chapters.ts
blob: d580e6fadf490c7ca20e807b53961dc62189aebd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import Dexie, { type Table } from 'dexie';

export interface Chapter {
	id: number;
	chapters: number | null;
}

export class ChapterDatabase extends Dexie {
	chapters: Table<Chapter>;

	constructor() {
		super('chapterDatabase');
		this.version(1).stores({
			chapters: 'id, chapters'
		});

		this.chapters = this.table('chapters');
	}
}

export const chapterDatabase = new ChapterDatabase();