-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprofile_image.js
More file actions
35 lines (32 loc) Β· 627 Bytes
/
profile_image.js
File metadata and controls
35 lines (32 loc) Β· 627 Bytes
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
const mongoose = require('mongoose');
const Schema = mongoose.Schema;
const ImageSchema = new Schema({
userId: {
required: true,
type: String,
},
userName: {
required: true,
type: String,
},
userRole: {
required: true,
type: String,
},
caption: {
required: true,
type: String,
},
filename: {
required: true,
type: String,
},
fileId: {
required: true,
type: String,
}
}, {
timestamps: true,
});
const Image = mongoose.model('User_Profile', ImageSchema);
module.exports = Image;