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:
parent
f05a0081f7
commit
3eea7e5cfd
1 changed files with 12 additions and 0 deletions
12
src/types/charts.ts
Normal file
12
src/types/charts.ts
Normal 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;
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue