- Updated VocabCourseView.vue to display CEFR level for courses. - Enhanced VocabLessonView.vue with new sections for listening activities and conversation labs, including audio controls and transcript toggling. - Created migration to add new columns to vocab_course and new tables for conversation sessions and listening activities. - Implemented models for vocab_conversation_session and vocab_listening_activity. - Developed scripts to create new A2 and B1 bridge courses with structured lesson plans. - Documented the A2-B1 expansion plan detailing course structure, learning goals, and assessment criteria.
92 lines
2.1 KiB
JavaScript
Executable File
92 lines
2.1 KiB
JavaScript
Executable File
import { Model, DataTypes } from 'sequelize';
|
|
import { sequelize } from '../../utils/sequelize.js';
|
|
|
|
class VocabCourse extends Model {}
|
|
|
|
VocabCourse.init({
|
|
id: {
|
|
type: DataTypes.INTEGER,
|
|
primaryKey: true,
|
|
autoIncrement: true
|
|
},
|
|
ownerUserId: {
|
|
type: DataTypes.INTEGER,
|
|
allowNull: false,
|
|
field: 'owner_user_id'
|
|
},
|
|
title: {
|
|
type: DataTypes.TEXT,
|
|
allowNull: false
|
|
},
|
|
description: {
|
|
type: DataTypes.TEXT,
|
|
allowNull: true
|
|
},
|
|
languageId: {
|
|
type: DataTypes.INTEGER,
|
|
allowNull: false,
|
|
field: 'language_id'
|
|
},
|
|
nativeLanguageId: {
|
|
type: DataTypes.INTEGER,
|
|
allowNull: true,
|
|
field: 'native_language_id',
|
|
comment: 'Muttersprache des Lerners (z.B. Deutsch, Englisch). NULL bedeutet "für alle Sprachen".'
|
|
},
|
|
difficultyLevel: {
|
|
type: DataTypes.INTEGER,
|
|
allowNull: false,
|
|
defaultValue: 1,
|
|
field: 'difficulty_level'
|
|
},
|
|
cefrLevel: {
|
|
type: DataTypes.TEXT,
|
|
allowNull: true,
|
|
field: 'cefr_level'
|
|
},
|
|
courseKind: {
|
|
type: DataTypes.TEXT,
|
|
allowNull: false,
|
|
defaultValue: 'core',
|
|
field: 'course_kind'
|
|
},
|
|
prerequisiteCourseId: {
|
|
type: DataTypes.INTEGER,
|
|
allowNull: true,
|
|
field: 'prerequisite_course_id'
|
|
},
|
|
isPublic: {
|
|
type: DataTypes.BOOLEAN,
|
|
allowNull: false,
|
|
defaultValue: false,
|
|
field: 'is_public'
|
|
},
|
|
shareCode: {
|
|
type: DataTypes.TEXT,
|
|
allowNull: true,
|
|
unique: true,
|
|
field: 'share_code'
|
|
},
|
|
createdAt: {
|
|
type: DataTypes.DATE,
|
|
allowNull: false,
|
|
defaultValue: DataTypes.NOW,
|
|
field: 'created_at'
|
|
},
|
|
updatedAt: {
|
|
type: DataTypes.DATE,
|
|
allowNull: false,
|
|
defaultValue: DataTypes.NOW,
|
|
field: 'updated_at'
|
|
}
|
|
}, {
|
|
sequelize,
|
|
modelName: 'VocabCourse',
|
|
tableName: 'vocab_course',
|
|
schema: 'community',
|
|
timestamps: true,
|
|
underscored: true
|
|
});
|
|
|
|
export default VocabCourse;
|