From b5c486c4ac3daa0c3725c07c0889dc9f156c9907 Mon Sep 17 00:00:00 2001 From: bill bittner Date: Fri, 27 Apr 2018 15:17:09 -0700 Subject: [PATCH] added blocked model --- server/models/blocked.js | 14 ++++++++++++++ server/models/index.js | 2 ++ 2 files changed, 16 insertions(+) create mode 100644 server/models/blocked.js diff --git a/server/models/blocked.js b/server/models/blocked.js new file mode 100644 index 00000000..04adbb79 --- /dev/null +++ b/server/models/blocked.js @@ -0,0 +1,14 @@ +module.exports = (sequelize, { STRING }) => { + return sequelize.define( + 'Blocked', + { + outpoint: { + type : STRING, + allowNull: false, + }, + }, + { + freezeTableName: true, + } + ); +}; diff --git a/server/models/index.js b/server/models/index.js index cda6419f..6c030cd6 100644 --- a/server/models/index.js +++ b/server/models/index.js @@ -4,6 +4,7 @@ const Claim = require('./claim.js'); const File = require('./file.js'); const Request = require('./request.js'); const User = require('./user.js'); +const Blocked = require('./blocked.js'); const Sequelize = require('sequelize'); const logger = require('winston'); @@ -42,6 +43,7 @@ db['Claim'] = sequelize.import('Claim', Claim); db['File'] = sequelize.import('File', File); db['Request'] = sequelize.import('Request', Request); db['User'] = sequelize.import('User', User); +db['Blocked'] = sequelize.import('Blocked', Blocked); // run model.association for each model in the db object that has an association logger.info('associating db models...');