1
0
mirror of https://github.com/GOSTSec/gostexplr synced 2025-01-15 09:10:06 +00:00
gostexplr/models/address.js
2018-02-03 21:14:56 +05:00

21 lines
475 B
JavaScript

'use strict';
module.exports = (sequelize, DataTypes) => {
const Address = sequelize.define('Address', {
address: DataTypes.STRING(34),
}, {
timestamps: false,
indexes: [{
unique: true,
fields: ['address']
}],
});
const AddressVout = sequelize.define('AddressVout', {}, { timestamps: false });
Address.associate = function (models) {
models.Address.belongsToMany(models.Vout, { through: 'AddressVout' });
};
return Address;
};