module.exports = (sequelize, DataTypes) => { const Isic2DigitIndices = sequelize.define("isic_2digit_indices", { id: { type: DataTypes.INTEGER, autoIncrement: true, primaryKey: true, }, isic_2digit_code: { type: DataTypes.STRING, allowNull: false, }, isic_description: { type: DataTypes.STRING, allowNull: true, validate: { len: { args: [0, 1000], msg: "Description is too long. Maximum allowed length is 1000 characters." }} }, year: { type: DataTypes.INTEGER, allowNull: false, }, quarter: { type: DataTypes.STRING, allowNull: false, }, quarter_name: { type: DataTypes.STRING, allowNull: false, }, total_weight: { type: DataTypes.DECIMAL(10, 2), allowNull: false, }, weighted_index_sum: { type: DataTypes.DECIMAL(10, 4), allowNull: false, }, isic_2digit_index: { type: DataTypes.DECIMAL(10, 2), allowNull: false, }, created_at: { type: DataTypes.DATE, defaultValue: DataTypes.NOW, }, updated_at: { type: DataTypes.DATE, allowNull: true, }, }, { tableName: "isic_2digit_indices", timestamps: false, }); return Isic2DigitIndices; };