import _sequelize from 'sequelize'; const { Model, Sequelize } = _sequelize; export default class history_store extends Model { static init(sequelize, DataTypes) { super.init({ timemark: { type: DataTypes.DATE, allowNull: false, defaultValue: Sequelize.fn('current_timestamp') }, table_name: { type: DataTypes.TEXT, allowNull: false, primaryKey: true }, pk_date_src: { type: DataTypes.TEXT, allowNull: false }, pk_date_dest: { type: DataTypes.TEXT, allowNull: false, primaryKey: true }, record_state: { type: DataTypes.INTEGER, allowNull: false } }, { sequelize, tableName: 'history_store', timestamps: false, indexes: [ { name: "PRIMARY", unique: true, using: "BTREE", fields: [ { name: "table_name", length: 85 }, { name: "pk_date_dest", length: 85 }, ] }, ] }); return history_store; } }