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:
@@ -44,6 +44,10 @@ FalukantUser.init({
|
||||
key: 'id',
|
||||
schema: 'falukant_data'
|
||||
}
|
||||
},
|
||||
lastNobilityAdvanceAt: {
|
||||
type: DataTypes.DATE,
|
||||
allowNull: true
|
||||
}
|
||||
}, {
|
||||
sequelize,
|
||||
|
||||
Reference in New Issue
Block a user