Add lastNobilityAdvanceAt field and update logic in FalukantService

- Introduced a new field `lastNobilityAdvanceAt` in the FalukantUser model to track the last time a user advanced in nobility.
- Updated the `FalukantService` to enforce a one-week cooldown between nobility advancements, throwing an error if the user attempts to advance too soon.
- Ensured the `lastNobilityAdvanceAt` field is updated with the current date upon a successful nobility advancement.
This commit is contained in:
Torsten Schulz (local)
2025-11-26 17:17:37 +01:00
parent 182f38597c
commit c1b69389c6
3 changed files with 43 additions and 1 deletions

View File

@@ -44,6 +44,10 @@ FalukantUser.init({
key: 'id',
schema: 'falukant_data'
}
},
lastNobilityAdvanceAt: {
type: DataTypes.DATE,
allowNull: true
}
}, {
sequelize,