-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSchema.js
43 lines (41 loc) · 789 Bytes
/
Schema.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
const mongoose = require("mongoose");
const Schema = mongoose.Schema;
const userSubmissions = new Schema({
uid: {
type: String,
required: true
},
assignmentSlug: {
type: String,
required: true
},
fileData: {
type: Object,
required: true
}
})
const users = new Schema({
uid: {
type: String,
required: true
},
email: {
type: String,
required: true,
},
photoURL: {
type: String
},
name: {
type: String
},
phone: {
type: Number
}
})
const userSubmissionsModel = mongoose.model('UserSubmission', userSubmissions)
const usersModel = mongoose.model('Users', users)
module.exports = {
userSubmissionsModel,
usersModel
}