import { DataTypes } from 'sequelize';
import sequelize from '../database.js';
import Club from './Club.js';

const ClubDisabledPresetGroup = sequelize.define('ClubDisabledPresetGroup', {
    id: {
        type: DataTypes.INTEGER,
        primaryKey: true,
        autoIncrement: true,
        allowNull: false,
    },
    clubId: {
        type: DataTypes.INTEGER,
        allowNull: false,
        references: {
            model: Club,
            key: 'id',
        },
        onDelete: 'CASCADE',
    },
    presetType: {
        type: DataTypes.ENUM('anfaenger', 'fortgeschrittene', 'erwachsene', 'nachwuchs', 'leistungsgruppe'),
        allowNull: false,
        comment: 'Type of preset group that is disabled for this club'
    }
}, {
    tableName: 'club_disabled_preset_groups',
    underscored: true,
    timestamps: true,
});

export default ClubDisabledPresetGroup;

