-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathUser.js
30 lines (27 loc) · 934 Bytes
/
User.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
// models/User.js
const mongoose = require('mongoose');
const userSchema = new mongoose.Schema({
name: { type: String, required: true },
rollno: { type: String, required: true, unique: true },
dept: { type: String, required: true },
dob: { type: String, required: true },
year: { type: Number, required: true },
no_of_cert: { type: Number, required: true },
certificates: [String],
leetcode_solved: { type: Number, required: true },
codechef_solved: { type: Number, required: true },
github: String,
cgpa: { type: Number, required: true },
attendance: { type: Number, required: true },
nptel: [String],
coursera: [String],
udemy: [String],
other_platform: [String],
no_of_project: { type: Number, required: true },
projects: [String],
external_participations: [String],
awards: [String],
paper_published: [String]
});
const User = mongoose.model('User', userSchema);
module.exports = User;