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

21 lines
475 B
JavaScript
Raw Normal View History

2018-02-03 21:14:56 +05:00
'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;
};