59 lines
1.3 KiB
JavaScript
59 lines
1.3 KiB
JavaScript
module.exports = (sequelize, DataTypes) => {
|
|
const Isic3DigitIndices = sequelize.define("isic_3digit_indices", {
|
|
id: {
|
|
type: DataTypes.INTEGER,
|
|
autoIncrement: true,
|
|
primaryKey: true,
|
|
},
|
|
isic_3digit_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_3digit_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_3digit_indices",
|
|
timestamps: false,
|
|
});
|
|
|
|
return Isic3DigitIndices;
|
|
}; |