module.exports = (sequelize, DataTypes) => { const Isic4DigitIndices = sequelize.define("isic_4digit_indices", { id: { type: DataTypes.INTEGER, autoIncrement: true, primaryKey: true, }, isic_4digit_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, }, month: { type: DataTypes.INTEGER, allowNull: false, }, month_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_4digit_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_4digit_indices", timestamps: false, }); return Isic4DigitIndices; };