Handle database

This commit is contained in:
ZXY101
2023-08-09 10:27:58 +02:00
parent 4e645467bb
commit 416b832f63
17 changed files with 14576 additions and 258 deletions

20
src/lib/catalog/db.ts Normal file
View File

@@ -0,0 +1,20 @@
import type { Volume } from '$lib/upload';
import Dexie, { type Table } from 'dexie';
export interface Catalog {
id?: number;
manga: Volume[];
}
export class CatalogDexie extends Dexie {
catalog!: Table<Catalog>;
constructor() {
super('mokuro');
this.version(1).stores({
catalog: '++id, manga'
});
}
}
export const db = new CatalogDexie();