the great renaming

This commit is contained in:
2026-02-26 15:33:24 +01:00
parent 4a4df0e799
commit 1ac2de123e
63 changed files with 11931 additions and 2674 deletions

28
src/app/dexie/db.ts Normal file
View File

@@ -0,0 +1,28 @@
import Dexie, { type EntityTable } from 'dexie';
import { Food } from '../types/food';
import { FOODS } from './entities/foods';
import { CHIBIS } from './entities/chibis';
import { Chibi } from '../types/chibi/chibi';
const db = new Dexie('ChibiCollector') as Dexie & {
chibis: EntityTable<Chibi, 'id'>;
foods: EntityTable<Food, 'id'>;
};
db.version(1).stores({
chibis: '++id',
foods: '++id',
});
//db.delete();
// Populate with sample data on first run
db.on('populate', async () => {
await db.chibis.bulkAdd(CHIBIS);
await db.foods.bulkAdd(FOODS);
});
export { db };