import { DataTypes } from 'sequelize';
export default (sequelize) => sequelize.define('vw_files_by_module', {
  file_id:     { type: DataTypes.INTEGER, primaryKey: true },
  module:      { type: DataTypes.STRING(50) },
  ref_id:      { type: DataTypes.INTEGER },
  orig_name:   { type: DataTypes.STRING(255) },
  mime:        { type: DataTypes.STRING(120) },
  size:        { type: DataTypes.BIGINT },
  disk_path:   { type: DataTypes.STRING(1000) },
  sha256:      { type: DataTypes.STRING(64) },
  uploaded_by: { type: DataTypes.INTEGER },
  created_at:  { type: DataTypes.DATE },
}, { timestamps: false, freezeTableName: true });
