-
Notifications
You must be signed in to change notification settings - Fork 1
/
models.js
40 lines (31 loc) · 976 Bytes
/
models.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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
var mongoose=require('mongoose');
var userSchema=new mongoose.Schema({
name:{type:String},
address:{type:String},
link:{type:String},
extra:{type:String},
email:{type:String},
number:{type:String},
username:{type:String},
publicKey:{type:String}
});
var auctionSchema=new mongoose.Schema({
owner:{type:String},
project_name:{type:String},
finaladdr:{type:String},
finalbid:{type:String},
auction: [{
user_address:{type:String},
user_bid:{type:String},
}]
});
// var selectedSchema=new mongoose.Schema({
// project_name:{type:String},
// selected_address:{type:String}
// });
var User=mongoose.model('User',userSchema);
var Auction = mongoose.model('Auction',auctionSchema);
// var Selection = mongoose.model('Selection',selectedSchema);
module.exports.User=User;
module.exports.Auction = Auction;
// module.exports.Selection = Selection;