mirror of https://github.com/GOSTSec/gostexplr
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.
21 lines
449 B
21 lines
449 B
7 years ago
|
'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;
|
||
|
};
|