import { Model, DataTypes } from 'sequelize';
import { sequelize } from '../../../utils/sequelize.js';

class Party extends Model {}

Party.init({
    partyTypeId: {
      type: DataTypes.INTEGER,
      allowNull: false,
      field: 'party_type_id'
    },
    falukantUserId: {
      type: DataTypes.INTEGER,
      allowNull: false,
      field: 'falukant_user_id'
    },
    musicTypeId: {
      type: DataTypes.INTEGER,
      allowNull: false,
      field: 'music_type'
    },
    banquetteTypeId: {
      type: DataTypes.INTEGER,
      allowNull: false,
      field: 'banquette_type'
    },
    servantRatio: {
      type: DataTypes.INTEGER,
      allowNull: false,
      field: 'servant_ratio'
    },
    cost: {
      type: DataTypes.FLOAT,
      allowNull: false,
      defaultValue: 0
    }}, {
    sequelize,
    modelName: 'Party',
    tableName: 'party',
    schema: 'falukant_data',
    timestamps: true,
    underscored: true});
  
export default Party;