demo_network_visjs/datas.ts
2024-01-23 14:13:26 +01:00

41 lines
1.6 KiB
TypeScript

export type DbEntry = {
id: number
title: string
content: string
links: number[]
}
// Db example
export const db: DbEntry[] = [
{ id: 1, title: 'node1', content: 'Node 1 content', links: [3, 4] },
{ id: 2, title: 'node2', content: 'Node 2 content', links: [1, 11, 8] },
{ id: 3, title: 'node3', content: 'Node 3 content', links: [4, 2] },
{ id: 4, title: 'node4', content: 'Node 4 content', links: [10] },
{ id: 5, title: 'node5', content: 'Node 5 content', links: [] },
{
id: 6,
title: 'node6',
content: 'Node 6 content',
links: [1, 7, 12, 15, 16],
},
{ id: 7, title: 'node7', content: 'Node 7 content', links: [3, 4] },
{ id: 8, title: 'node8', content: 'Node 8 content', links: [2, 3, 7] },
{ id: 9, title: 'node9', content: 'Node 9 content', links: [13, 14] },
{ id: 10, title: 'node10', content: 'Node 10 content', links: [4] },
{ id: 11, title: 'node11', content: 'Node 11 content', links: [7] },
{ id: 12, title: 'node12', content: 'Node 12 content', links: [20, 19, 18] },
{
id: 13,
title: 'node13',
content: 'Node 13 content',
links: [17, 15, 13, 11, 10, 9],
},
{ id: 14, title: 'node14', content: 'Node 14 content', links: [8, 7, 6] },
{ id: 15, title: 'node15', content: 'Node 15 content', links: [] },
{ id: 16, title: 'node16', content: 'Node 16 content', links: [1, 2] },
{ id: 17, title: 'node17', content: 'Node 17 content', links: [9, 11] },
{ id: 18, title: 'node18', content: 'Node 18 content', links: [4, 6, 8] },
{ id: 19, title: 'node19', content: 'Node 19 content', links: [1, 3, 5] },
{ id: 20, title: 'node20', content: 'Node 20 content', links: [17] },
]