update
This commit is contained in:
@@ -37,9 +37,21 @@ const Lesson = sequelize.define('lessons', {
|
||||
},
|
||||
|
||||
// Dạng 1: JSON Content - Nội dung học tập dạng JSON
|
||||
// Cấu trúc content_json phụ thuộc vào lesson_content_type:
|
||||
// - vocabulary: { type: "vocabulary", vocabulary_ids: [uuid1, uuid2, ...], exercises: [...] }
|
||||
// - grammar: { type: "grammar", grammar_ids: [uuid1, uuid2, ...], examples: [...], exercises: [...] }
|
||||
// - phonics: { type: "phonics", phonics_rules: [{ipa: "/æ/", words: [...]}], exercises: [...] }
|
||||
// - review: { type: "review", sections: [{type: "vocabulary", ...}, {type: "grammar", ...}, {type: "phonics", ...}] }
|
||||
content_json: {
|
||||
type: DataTypes.JSON,
|
||||
comment: 'Nội dung học tập dạng JSON: text, quiz, interactive, assignment, etc.'
|
||||
comment: 'Nội dung học tập dạng JSON: vocabulary, grammar, phonics, review'
|
||||
},
|
||||
|
||||
// Loại nội dung của bài học (để query dễ dàng)
|
||||
lesson_content_type: {
|
||||
type: DataTypes.ENUM('vocabulary', 'grammar', 'phonics', 'review', 'mixed'),
|
||||
allowNull: true,
|
||||
comment: 'Loại nội dung: vocabulary, grammar, phonics, review, mixed'
|
||||
},
|
||||
|
||||
// Dạng 2: URL Content - Chứa link external
|
||||
|
||||
Reference in New Issue
Block a user