-
Notifications
You must be signed in to change notification settings - Fork 0
/
database.js
53 lines (48 loc) · 1.21 KB
/
database.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
require("dotenv").config();
let mongoose = require("mongoose");
mongoose.connect(process.env.MONGODB_ADDRESS, {useNewUrlParser: true, useUnifiedTopology: true});
let classesSchema = new mongoose.Schema({
name: String,
link: String,
day: String,
hour: String,
minutes: String,
decision: String,
user: String,
channelid: String
});
let Class = mongoose.model("Class", classesSchema);
let testsSchema = new mongoose.Schema({
name: String,
month: String,
date: String,
hour: String,
minutes: String,
decision: String,
user: String,
channelid: String
});
let Test = mongoose.model("Test", testsSchema);
let quizzesSchema = new mongoose.Schema({
name: String,
month: String,
date: String,
hour: String,
minutes: String,
decision: String,
user: String,
channelid: String
});
let Quiz = mongoose.model("Quiz", quizzesSchema);
let homeworksSchema = new mongoose.Schema({
name: String,
month: String,
date: String,
hour: String,
minutes: String,
decision: String,
user: String,
channelid: String
});
let Homework = mongoose.model("Homework", homeworksSchema);
module.exports = { Class, Test, Quiz, Homework };