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

const PredefinedActivityImage = sequelize.define('PredefinedActivityImage', {
  id: {
    type: DataTypes.INTEGER,
    primaryKey: true,
    autoIncrement: true,
  },
  predefinedActivityId: {
    type: DataTypes.INTEGER,
    allowNull: false,
  },
  imagePath: {
    type: DataTypes.STRING,
    allowNull: false,
  },
  mimeType: {
    type: DataTypes.STRING,
    allowNull: true,
  },
  drawingData: {
    type: DataTypes.TEXT,
    allowNull: true,
    comment: 'JSON string containing drawing metadata for Court Drawing Tool'
  },
}, {
  tableName: 'predefined_activity_images',
  timestamps: true,
  underscored: true,
});

export default PredefinedActivityImage;


