feat(tournament): add mini championship functionality and enhance tournament class handling
- Introduced addMiniChampionship method in tournamentService to create tournaments with predefined classes for mini championships. - Updated getTournaments method to filter tournaments based on type, including support for mini championships. - Enhanced TournamentClass model to include maxBirthYear for age class restrictions. - Modified tournamentController and tournamentRoutes to support new mini championship endpoint. - Updated frontend components to manage mini championship creation and display, including localization for new terms.
This commit is contained in:
@@ -39,6 +39,12 @@ const Tournament = sequelize.define('Tournament', {
|
||||
allowNull: false,
|
||||
defaultValue: false,
|
||||
},
|
||||
miniChampionshipYear: {
|
||||
type: DataTypes.INTEGER,
|
||||
allowNull: true,
|
||||
field: 'mini_championship_year',
|
||||
comment: 'Jahr der Minimeisterschaft; nur gesetzt bei Minimeisterschaften'
|
||||
},
|
||||
}, {
|
||||
underscored: true,
|
||||
tableName: 'tournament',
|
||||
|
||||
@@ -44,6 +44,13 @@ const TournamentClass = sequelize.define('TournamentClass', {
|
||||
defaultValue: null,
|
||||
field: 'min_birth_year',
|
||||
comment: 'Geboren im Jahr X oder später (>=)'
|
||||
},
|
||||
maxBirthYear: {
|
||||
type: DataTypes.INTEGER,
|
||||
allowNull: true,
|
||||
defaultValue: null,
|
||||
field: 'max_birth_year',
|
||||
comment: 'Geboren im Jahr X oder früher (<=); für Altersklassen 12/10'
|
||||
}
|
||||
}, {
|
||||
underscored: true,
|
||||
|
||||
Reference in New Issue
Block a user