mirror of
https://github.com/GOSTSec/gostexplr
synced 2025-01-15 17:20:04 +00:00
21 lines
449 B
JavaScript
21 lines
449 B
JavaScript
|
'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;
|
||
|
};
|