Added types/interfaces
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
enum NodeTypes {
|
||||
type,
|
||||
fill,
|
||||
match,
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
interface Exercise {
|
||||
id: number,
|
||||
type: NodeTypes,
|
||||
content: string // as json
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
interface Path {
|
||||
id: number,
|
||||
title: string,
|
||||
description: string,
|
||||
nodes: Node[],
|
||||
metadata: {
|
||||
versions: string[],
|
||||
createdAt: Date,
|
||||
updatedAt: Date,
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
interface Node {
|
||||
id: number,
|
||||
title: string,
|
||||
description: string,
|
||||
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
interface Progress {
|
||||
pathId: number,
|
||||
nodeId: number,
|
||||
exerciseId: number,
|
||||
localVersion: number,
|
||||
}
|
||||
Reference in New Issue
Block a user