Publish Nerbus source snapshot and build documentation
This commit is contained in:
commit
76cccceca7
198 files changed
+338574
No files matched your search
@@ -0,0 +1,20 @@
|
||||
const mongoose = require('mongoose');
|
||||
const Schema = mongoose.Schema;
|
||||
const D0 = () => mongoose.Types.Decimal128.fromString('0');
|
||||
|
||||
const TxSchema = new Schema({
|
||||
txid: { type: String, lowercase: true, unique: true, index: true},
|
||||
vin: { type: Array, default: [] },
|
||||
vout: { type: Array, default: [] },
|
||||
total: { type: Schema.Types.Decimal128, default: D0, index: true },
|
||||
timestamp: { type: Number, default: 0, index: true },
|
||||
blockhash: { type: String, index: true },
|
||||
blockindex: {type: Number, default: 0, index: true},
|
||||
tx_type: { type: String, default: null },
|
||||
op_return: { type: String, default: null },
|
||||
algo: { type: String, default: null }
|
||||
}, {id: false});
|
||||
|
||||
TxSchema.index({total: 1, total: -1, blockindex: 1, blockindex: -1});
|
||||
|
||||
module.exports = mongoose.model('Tx', TxSchema);
|
||||
Reference in new issue
Block a user