Files
yourpart3/backend/models/community/vocab_conversation_session.js
Torsten Schulz (local) 3248579529 feat: add A2-B1 course expansion features including listening activities and conversation sessions
- 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.
2026-08-27 15:18:16 +02:00

26 lines
1.1 KiB
JavaScript

import { Model, DataTypes } from 'sequelize';
import { sequelize } from '../../utils/sequelize.js';
class VocabConversationSession extends Model {}
VocabConversationSession.init({
id: { type: DataTypes.INTEGER, primaryKey: true, autoIncrement: true },
userId: { type: DataTypes.INTEGER, allowNull: false, field: 'user_id' },
lessonId: { type: DataTypes.INTEGER, allowNull: false, field: 'lesson_id' },
scenario: { type: DataTypes.JSONB, allowNull: false, defaultValue: {} },
turns: { type: DataTypes.JSONB, allowNull: false, defaultValue: [] },
summary: { type: DataTypes.JSONB, allowNull: true },
status: { type: DataTypes.TEXT, allowNull: false, defaultValue: 'active' },
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: 'VocabConversationSession',
tableName: 'vocab_conversation_session',
schema: 'community',
timestamps: true,
underscored: true
});
export default VocabConversationSession;