task 9.3: create src/types/charts.ts with Chart interface

Adds a shared Chart interface matching the DB schema (id, name, created_at)
and the existing usages in page.tsx and ChartSelector.tsx.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Marko Djordjevic 2026-02-18 15:43:30 +01:00
parent f05a0081f7
commit 3eea7e5cfd

12
src/types/charts.ts Normal file
View file

@ -0,0 +1,12 @@
/**
* Chart types for chart metadata.
*
* created_at is stored as a PostgreSQL timestamp (returned as Date by Drizzle ORM)
* but is often treated as a Unix epoch number in the frontend after JSON serialisation.
*/
export interface Chart {
id: number;
name: string;
created_at: Date | number;
}