import Dexie from 'dexie'; export interface Teacher { id: string; name: string } export interface AttendanceRecord { id: string; teacherId: string; timestamp: number; type: 'in' | 'out'; } export class AppDB extends Dexie { teachers!: Dexie.Table; records!: Dexie.Table; constructor() { super('AttendanceDB'); this.version(1).stores({ teachers: 'id, name', records: 'id, teacherId, timestamp, type', }); } } export const db = new AppDB();