Files
mokuro-reader/src/lib/catalog/db.ts
2023-08-11 12:35:17 +02:00

21 lines
368 B
TypeScript

import type { Volume } from '$lib/types';
import Dexie, { type Table } from 'dexie';
export interface Catalog {
id: string;
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();