spee.ch/server/chainquery/models/InputModel.js

83 lines
1.3 KiB
JavaScript
Raw Normal View History

const getterMethods = {
// Add as needed, prefix all methods with `generated`
}
export default (sequelize, {
BOOLEAN,
DATE,
DECIMAL,
INTEGER,
STRING,
TEXT,
}) => sequelize.define(
'input',
{
id: {
primaryKey: true,
type: INTEGER,
set() { },
},
transaction_id: {
type: INTEGER,
set() { },
},
transaction_hash: {
type: STRING,
set() { },
},
input_address_id: {
type: INTEGER,
set() { },
},
is_coinbase: {
type: BOOLEAN,
set() { },
},
coinbase: {
type: STRING,
set() { },
},
prevout_hash: {
type: STRING,
set() { },
},
prevout_n: {
type: INTEGER.UNSIGNED,
set() { },
},
prevout_spend_updated: {
type: INTEGER,
set() { },
},
sequence: {
type: INTEGER,
set() { },
},
value: {
type: DECIMAL(18, 8),
set() { },
},
script_sig_asm: {
type: TEXT,
set() { },
},
script_sig_hex: {
type: TEXT,
set() { },
},
created: {
type: DATE(6),
set() { },
},
modified: {
type: DATE(6),
set() { },
},
},
{
freezeTableName: true,
2018-09-26 03:20:59 +02:00
//getterMethods,
timestamps: false, // don't use default timestamps columns
}
);