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

const ClubRequestNote = sequelize.define('ClubRequestNote', {
  clubRequestId: {
    type: DataTypes.INTEGER,
    allowNull: false,
    field: 'club_request_id'
  },
  noteType: {
    type: DataTypes.STRING(32),
    allowNull: false,
    defaultValue: 'internal',
    field: 'note_type'
  },
  createdByUserId: {
    type: DataTypes.INTEGER,
    allowNull: true,
    field: 'created_by_user_id'
  },
  body: {
    type: DataTypes.TEXT,
    allowNull: false
  }
}, {
  tableName: 'club_request_notes',
  underscored: true,
  timestamps: true,
  updatedAt: false
});

export default ClubRequestNote;
