Spaces:
Sleeping
Sleeping
| // 知識節點 | |
| const nodeSchema = { | |
| id: 'string', | |
| title: 'string', | |
| content: 'string', | |
| prerequisites: ['nodeId'], | |
| relatedNodes: ['nodeId'], | |
| exercises: ['exerciseId'], | |
| difficulty: 'number' | |
| }; | |
| // 練習 | |
| const exerciseSchema = { | |
| id: 'string', | |
| nodeId: 'string', | |
| type: 'string', // multiple_choice, open_ended, etc | |
| question: 'string', | |
| options: ['string'], // for multiple choice | |
| correctAnswer: 'string', | |
| explanation: 'string' | |
| }; | |
| // 使用者進度 | |
| const userProgressSchema = { | |
| userId: 'string', | |
| completedNodes: ['nodeId'], | |
| exerciseResults: [{ | |
| exerciseId: 'string', | |
| score: 'number', | |
| attempts: 'number' | |
| }], | |
| skills: { | |
| [skillName]: 'number' // 技能熟練度 | |
| } | |
| }; |