From 3eea7e5cfdda12c5bbd7e0cf2eb3062492611dcb Mon Sep 17 00:00:00 2001 From: Marko Djordjevic Date: Wed, 18 Feb 2026 15:43:30 +0100 Subject: [PATCH] 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 --- src/types/charts.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 src/types/charts.ts diff --git a/src/types/charts.ts b/src/types/charts.ts new file mode 100644 index 0000000..da057d5 --- /dev/null +++ b/src/types/charts.ts @@ -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; +}