import { DataTypes } from 'sequelize';
export default (sequelize) => sequelize.define('contract_dwg', {
  condwg_id:   { type: DataTypes.INTEGER, primaryKey: true, autoIncrement: true },
  project_id:  { type: DataTypes.INTEGER, allowNull: false },
  condwg_no:   { type: DataTypes.STRING(255), allowNull: false, unique: true },
  title:       { type: DataTypes.STRING(255) },
  sub_cat_id:  { type: DataTypes.INTEGER },
  volume_id:   { type: DataTypes.INTEGER },
  sub_no:      { type: DataTypes.INTEGER },
  remark:      { type: DataTypes.STRING(500) },
  created_at:  { type: DataTypes.DATE },
  updated_at:  { type: DataTypes.DATE },
}, { indexes: [{ fields:['project_id'] }] });
