2020-11-19 21:37:42 -07:00
|
|
|
var mongoose = require('mongoose')
|
|
|
|
|
, Schema = mongoose.Schema;
|
|
|
|
|
|
|
|
|
|
var AddressTXSchema = new Schema({
|
|
|
|
|
a_id: { type: String, index: true},
|
2020-11-22 15:00:47 -07:00
|
|
|
blockindex: {type: Number, default: 0, index: true},
|
2020-11-20 16:50:53 -07:00
|
|
|
txid: { type: String, lowercase: true, index: true},
|
2020-11-22 18:27:04 -07:00
|
|
|
amount: { type: Number, default: 0, index: true}
|
2020-11-19 21:37:42 -07:00
|
|
|
}, {id: false});
|
|
|
|
|
|
2020-11-23 15:33:54 -07:00
|
|
|
AddressTXSchema.index({a_id: 1, blockindex: -1});
|
|
|
|
|
|
2020-11-20 16:28:28 -07:00
|
|
|
module.exports = mongoose.model('AddressTx', AddressTXSchema);
|