You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
49 lines
1014 B
49 lines
1014 B
4 years ago
|
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;
|
||
|
}
|
||
|
}
|