2021-03-17 17:54:09 -06:00
var mongoose = require ( 'mongoose' ) ,
Schema = mongoose . Schema ;
2019-05-27 10:33:22 -07:00
var AddressSchema = new Schema ( {
a _id : { type : String , unique : true , index : true } ,
2023-09-26 18:22:28 -06:00
name : { type : String } , // no longer used but cannot be removed or else older versions that have data here will not be able to auto move claim name data to the new claimaddress collection
2020-11-22 14:39:10 -07:00
received : { type : Number , default : 0 , index : true } ,
2020-11-23 15:33:54 -07:00
sent : { type : Number , default : 0 , index : true } ,
2020-11-22 14:39:10 -07:00
balance : { type : Number , default : 0 , index : true } ,
2019-05-27 10:33:22 -07:00
} , { id : false } ) ;
2021-03-17 17:54:09 -06:00
module . exports = mongoose . model ( 'Address' , AddressSchema ) ;