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

const Log = sequelize.define('Log', {
  activity: {
    type: DataTypes.STRING,
    allowNull: false,
  },
  userId: {
    type: DataTypes.INTEGER,
    allowNull: false,
    references: {
      model: 'user', 
      key: 'id',
    },
  },
}, {
  underscored: true,
  tableName: 'log',
  timestamps: true
});

export default Log;
