const { DataTypes } = require('sequelize');
const sequelize = require('../database/database.js');

const TrainingProjectDetails = sequelize.define('TrainingProjectDetails', {
  id: {
    type: DataTypes.INTEGER,
    primaryKey: true,
    autoIncrement: true,
    unique: true,
  },
  project_id: {
    type: DataTypes.INTEGER,
    allowNull: false,
    unique: true,
  },
  annotation_projects: {
    type: DataTypes.JSON,
    allowNull: false,
  },
  class_map: {
    type: DataTypes.JSON,
    allowNull: true,
  },
  description: {
    type: DataTypes.JSON,
    allowNull: true,
  }
}, {
  tableName: 'training_project_details',
  timestamps: false,
});

module.exports = TrainingProjectDetails;
