All checks were successful
Deploy to production / deploy (push) Successful in 2m52s
- 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.
54 lines
1.3 KiB
JavaScript
54 lines
1.3 KiB
JavaScript
import { Model, DataTypes } from 'sequelize';
|
|
import { sequelize } from '../../../utils/sequelize.js';
|
|
import RegionData from './region.js';
|
|
|
|
class FalukantUser extends Model { }
|
|
|
|
FalukantUser.init({
|
|
userId: {
|
|
type: DataTypes.INTEGER,
|
|
allowNull: false,
|
|
unique: true},
|
|
money: {
|
|
type: DataTypes.DECIMAL(10, 2),
|
|
allowNull: false,
|
|
defaultValue: 0.00},
|
|
creditAmount: {
|
|
type: DataTypes.DECIMAL(10, 2),
|
|
allowNull: false,
|
|
defaultValue: 0.00},
|
|
todayCreditTaken: {
|
|
type: DataTypes.DECIMAL(10, 2),
|
|
allowNull: false,
|
|
defaultValue: 0.00},
|
|
creditInterestRate: {
|
|
type: DataTypes.DECIMAL(5, 2),
|
|
allowNull: false,
|
|
defaultValue: 0.00},
|
|
certificate: {
|
|
type: DataTypes.INTEGER,
|
|
allowNull: false,
|
|
defaultValue: 1},
|
|
mainBranchRegionId: {
|
|
type: DataTypes.INTEGER,
|
|
allowNull: true
|
|
},
|
|
lastNobilityAdvanceAt: {
|
|
type: DataTypes.DATE,
|
|
allowNull: true
|
|
},
|
|
lastPoliticalDailySalaryOn: {
|
|
type: DataTypes.DATEONLY,
|
|
allowNull: true,
|
|
field: 'last_political_daily_salary_on'
|
|
}
|
|
}, {
|
|
sequelize,
|
|
modelName: 'FalukantUser',
|
|
tableName: 'falukant_user',
|
|
schema: 'falukant_data',
|
|
timestamps: true,
|
|
underscored: true});
|
|
|
|
export default FalukantUser;
|