// models/SubmissionHistory.js module.exports = (sequelize, DataTypes) => { const SubmissionHistory = sequelize.define( "SubmissionHistory", { id: { type: DataTypes.INTEGER, autoIncrement: true, primaryKey: true, }, primary_key: { type: DataTypes.INTEGER, allowNull: false, // submission_products.id }, table_name: { type: DataTypes.STRING(100), allowNull: false, }, column_name: { type: DataTypes.STRING(100), allowNull: false, }, old_value: { type: DataTypes.STRING, allowNull: true, }, new_value: { type: DataTypes.STRING, allowNull: true, }, created_at: { type: DataTypes.DATE, allowNull: true, }, created_by: { type: DataTypes.INTEGER, allowNull: false, }, updated_at: { type: DataTypes.DATE, allowNull: true, }, updated_by: { type: DataTypes.INTEGER, allowNull: true, } }, { tableName: "submission_history", timestamps: false, } ); return SubmissionHistory; };