From f8c78e5335d389420beb1ca90a1c778568830d8a Mon Sep 17 00:00:00 2001 From: Sam Nystrom Date: Sat, 16 Mar 2024 21:07:09 +0000 Subject: fix: finish DB type definitions --- src/types.ts | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/types.ts b/src/types.ts index 29d14a3..b045a10 100644 --- a/src/types.ts +++ b/src/types.ts @@ -1,18 +1,34 @@ +export type Id = string; + +export type Relation = Id | T; + +export interface User { + id: Id; + username: string; + email: string; +} + export interface Project { - id: string; - owner: string; + id: Id; + owner: Relation; name: string; + public: boolean; } export interface Node { - id: string; + id: Id; + project: Relation; + type: string; x: number; y: number; - name: string; + collapsed: boolean; } export interface Link { - id: string; - from: string; - to: string; + id: Id; + project: Relation; + from: Relation; + fromSocket: string; + to: Relation; + toSocket: string; } -- cgit v1.2.3