Added types/interfaces

This commit is contained in:
Nico
2025-09-15 17:53:26 +02:00
parent 9899d00f53
commit 0fe2aea028
5 changed files with 33 additions and 0 deletions

5
src/enums/nodeTypes.ts Normal file
View File

@@ -0,0 +1,5 @@
enum NodeTypes {
type,
fill,
match,
}

View File

@@ -0,0 +1,5 @@
interface Exercise {
id: number,
type: NodeTypes,
content: string // as json
}

11
src/interfaces/Path.ts Normal file
View File

@@ -0,0 +1,11 @@
interface Path {
id: number,
title: string,
description: string,
nodes: Node[],
metadata: {
versions: string[],
createdAt: Date,
updatedAt: Date,
}
}

View File

@@ -0,0 +1,6 @@
interface Node {
id: number,
title: string,
description: string,
}

View File

@@ -0,0 +1,6 @@
interface Progress {
pathId: number,
nodeId: number,
exerciseId: number,
localVersion: number,
}