-
Notifications
You must be signed in to change notification settings - Fork 0
/
AlumniDonationSchema.txt
84 lines (79 loc) · 1.45 KB
/
AlumniDonationSchema.txt
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
const mongoose = require('mongoose')
const projectSchema = new mongoose.Schema({
name: {
type: String,
required: true
},
description: {
type: String,
required: true
},
breif_info: {
type: String,
required: true
},
goal: {
type: Number,
required: true
},
category: {
type: String,
required: true
},
club: {
type: String,
required: true
},
money_used_where: {
type: String,
required: true
},
donors: {
type: Map,
of: Number
},
img:
{
data: Buffer,
contentType: String
},
video:
{
data: Buffer,
contentType: String
}
})
const userSchema = new mongoose.Schema({
name: {
type: String,
required: true
},
profile_photo:{
data: Buffer,
contentType: String
},
designation:{
type: String,
required: true
},
address: {
type: String,
required: true
},
email: {
type: String,
required: true
},
phone: {
countryCode: Number,
mobile: Number,
},
projects_invested_in:{
type: Map,
of: Number
}
})
const ProjectModel = mongoose.model('ProjectModel', projectSchema)
const UserModel = mongoose.model('UserModel', userSchema)
module.exports = ProjectModel
module.exports = UserModel