-
Notifications
You must be signed in to change notification settings - Fork 0
/
leaders_model.js
27 lines (25 loc) · 914 Bytes
/
leaders_model.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
const mongoose = require("mongoose");
const Schema = mongoose.Schema;
const leaderSchema = new Schema({
leaderName: { type: String, trim: true },
leaderSector: {type:String, trim: true},
leaderBio: { type: String, trim: true },
leaderImgPath: { type: String, trim:true},
leaderRBLink: {type: String, trim:true},
leaderStoryLink: {type: String, trim:true},
twitter: { id: { type: String, trim: true }, followers: { type: Number } },
booksReco: [{
id: {type: String, trim: true},
ISBN13: {type: String, trim: true},
ISBN10: {type: String, trim: true},
ASIN: {type: String, trim: true}
}],
clickBy: [String],
sortCount: {type: Number},
createdBy: {type: String, trim: true},
updatedBy: {type: String, trim: true}
},{
timestamps: true,
collection: 'leaders'
});
module.exports = mongoose.model("leader", leaderSchema);