Files
yourpart3/backend/models/falukant/predefine/political_office_benefit.js
Torsten Schulz (local) 5fcd55be43
All checks were successful
Deploy to production / deploy (push) Successful in 2m52s
feat(vocab): add dashboard learning summary and related endpoints
- Introduced `getDashboardLearningSummary` method in `VocabService` to provide a compact overview of enrolled courses and current lessons for users.
- Updated `vocabController` to include a new route for the dashboard widget, allowing users to access their learning summary.
- Enhanced `vocabRouter` to route requests for the new dashboard widget endpoint.
- Added localization support for the new dashboard features across multiple languages, improving user engagement and accessibility.
- Updated UI components to integrate the new dashboard widget, ensuring a seamless user experience.
2026-04-02 15:06:50 +02:00

37 lines
803 B
JavaScript

// falukant/predefine/political_office_benefit.js
import { Model, DataTypes } from 'sequelize';
import { sequelize } from '../../../utils/sequelize.js';
class PoliticalOfficeBenefit extends Model {}
PoliticalOfficeBenefit.init({
id: {
type: DataTypes.INTEGER,
primaryKey: true,
autoIncrement: true
},
officeTypeId: {
type: DataTypes.INTEGER,
allowNull: false,
field: 'office_type_id'
},
benefitTypeId: {
type: DataTypes.INTEGER,
allowNull: false,
field: 'benefit_type_id'
},
value: {
type: DataTypes.JSONB,
allowNull: false
}
}, {
sequelize,
modelName: 'PoliticalOfficeBenefit',
tableName: 'political_office_benefit',
schema: 'falukant_predefine',
timestamps: false,
underscored: true
});
export default PoliticalOfficeBenefit;