@mytec Phase 1 - Core UI & Manual Input, Phase 2 - RF Calculation Engine, Phase 3 - Heatmap Visualization
This commit is contained in:
32
frontend/src/db/schema.ts
Normal file
32
frontend/src/db/schema.ts
Normal file
@@ -0,0 +1,32 @@
|
||||
import Dexie, { type Table } from 'dexie';
|
||||
|
||||
export interface DBSite {
|
||||
id: string;
|
||||
data: string; // JSON serialized Site
|
||||
createdAt: number;
|
||||
updatedAt: number;
|
||||
}
|
||||
|
||||
export interface DBProjectConfig {
|
||||
id: string;
|
||||
name: string;
|
||||
data: string; // JSON serialized ProjectConfig
|
||||
createdAt: number;
|
||||
updatedAt: number;
|
||||
syncedAt?: number;
|
||||
}
|
||||
|
||||
export class RFCPDatabase extends Dexie {
|
||||
sites!: Table<DBSite, string>;
|
||||
projects!: Table<DBProjectConfig, string>;
|
||||
|
||||
constructor() {
|
||||
super('rfcp-db');
|
||||
this.version(1).stores({
|
||||
sites: 'id, updatedAt',
|
||||
projects: 'id, updatedAt, syncedAt',
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
export const db = new RFCPDatabase();
|
||||
Reference in New Issue
Block a user