apix/lib/db.ts
Khoa.vo 8741e3b89f
Some checks are pending
CI / build (18.x) (push) Waiting to run
CI / build (20.x) (push) Waiting to run
feat: Initial commit with multi-provider image generation
2026-01-05 13:50:35 +07:00

22 lines
470 B
TypeScript

import Dexie, { Table } from 'dexie';
export interface ImageItem {
id?: number;
data: string; // Base64
prompt: string;
aspectRatio: string;
createdAt: number;
}
export class KeyValuePixDB extends Dexie {
gallery!: Table<ImageItem, number>;
constructor() {
super('kv-pix-db');
this.version(1).stores({
gallery: '++id, createdAt'
});
}
}
export const db = new KeyValuePixDB();