forked from ethereumclassic/explorer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
db-dao.js
26 lines (23 loc) · 787 Bytes
/
db-dao.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
var mongoose = require( 'mongoose' );
var Schema = mongoose.Schema;
var DAOCreatedToken = new Schema(
{
"transactionHash": {type: String, index: {unique: true}},
"blockNumber": {type: Number, index: {unique: false}},
"amount": String,
"to": String,
"timestamp": Number
});
var DAOTransferToken = new Schema(
{
"transactionHash": {type: String, index: {unique: true}},
"blockNumber": {type: Number, index: {unique: false}},
"amount": String,
"to": String,
"from": String,
"timestamp": Number
});
mongoose.model('DAOCreatedToken', DAOCreatedToken);
mongoose.model('DAOTransferToken', DAOTransferToken);
module.exports.DAOCreatedToken = mongoose.model('DAOCreatedToken');
module.exports.DAOTransferToken = mongoose.model('DAOTransferToken');