1
0
mirror of https://github.com/GOSTSec/gostexplr synced 2025-01-15 17:20:04 +00:00
gostexplr/models/vout.js

21 lines
449 B
JavaScript
Raw Normal View History

2018-02-03 21:14:56 +05:00
'use strict';
module.exports = (sequelize, DataTypes) => {
const Vout = sequelize.define('Vout', {
value: DataTypes.DECIMAL(16, 8),
}, {
timestamps: false,
});
Vout.associate = function (models) {
models.Vout.belongsTo(models.Transaction, {
onDelete: "CASCADE",
foreignKey: {
allowNull: false
}
});
models.Vout.belongsToMany(models.Address, { through: 'AddressVout' });
};
return Vout;
};