-
Notifications
You must be signed in to change notification settings - Fork 0
/
model.js
62 lines (52 loc) · 1.21 KB
/
model.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
const mongoose = require('mongoose');
const stockschema = new mongoose.Schema({
_id: Number ,
name : String ,
ltp : String ,
high : String ,
low : String ,
closep: String ,
ycp : String ,
change : String ,
changeP : String,
trade : String ,
value : String ,
volume : String,
last60 : Array ,
},
{
versionKey : false
})
module.exports.stockmodel = mongoose.model('stockdata',stockschema)
const stockschema2 = new mongoose.Schema(
{
marketStatus : String,
dsex : Number,
dsexChange : Number,
dsexChangeP :Number,
ds30 : Number,
ds30Change : Number,
ds30ChangeP : Number,
totaltrade : Number,
totalvolume : Number,
totalvalue : Number,
issueAdvance :Number,
issueDecline :Number,
issueUnchange : Number,
},
{
versionKey : false
})
module.exports.dsexmodel = mongoose.model('dsexdata',stockschema2)
const AnalysisSchema = new mongoose.Schema(
{
_id : String,
ROE : Number,
EarnGrowth : Number ,
PE: Number ,
Sector : String
},
{
versionKey : false
})
module.exports.analysis1 = mongoose.model('analysisdata',AnalysisSchema)