import { DataTypes } from 'sequelize';
export default (sequelize) => sequelize.define('rfa_revisions', {
  rfa_rev_id:   { type: DataTypes.INTEGER, primaryKey: true, autoIncrement: true },
  rfa_id:       { type: DataTypes.INTEGER, allowNull: false },
  rev_no:       { type: DataTypes.STRING(50), allowNull: false }, // e.g., "A","B","C" or "1","2"
  remark:       { type: DataTypes.STRING(500) },
  status:       { type: DataTypes.STRING(50) },
  created_by:   { type: DataTypes.INTEGER },
  updated_by:   { type: DataTypes.INTEGER },
  created_at:   { type: DataTypes.DATE },
  updated_at:   { type: DataTypes.DATE },
}, { indexes: [{ fields: ['rfa_id'] }, { fields: ['status'] }] });
