forked from HorizonsBot/NewBot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
models.js
50 lines (45 loc) · 997 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
41
42
43
44
45
46
47
48
49
50
var mongoose = require('mongoose');
var userSchema = mongoose.Schema({
googleAccount: {
access_token: String,
refresh_token: String,
profile_ID: String,
expiry_date: Number,
email: String
},
pendingState: {
subject: String,
date: String,
invitees: Array,
inviteesBySlackid: Array,
time: String,
},
slack_ID: String,
slack_Username: String,
slack_Email: String,
slack_DM_ID: String,
active: Number
});
var reminderSchema = mongoose.Schema({
subject: String,
day: String,
googCalID: String,
reqID: String
})
var meetingSchema = mongoose.Schema({
date: String,
time: String,
invitees: Array,
subject: String,
location: String,
createdAt: String,
requesterId: String
})
var User = mongoose.model('User', userSchema);
var Reminder = mongoose.model('Reminder', reminderSchema);
var Meeting = mongoose.model('Meeting', meetingSchema);
module.exports = {
User: User,
Reminder: Reminder,
Meeting: Meeting,
};