-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcreator.js
More file actions
55 lines (53 loc) · 1.36 KB
/
creator.js
File metadata and controls
55 lines (53 loc) · 1.36 KB
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
const mongoose = require("mongoose");
const { Schema } = mongoose;
const creatorSchema = new Schema(
{
firstName: String,
lastName: String,
profilePicPath: String,
thumblenLink: String,
isTemp: Boolean,
instructorCoat: String,
certicates: [
{
name: String,
url: String,
issuedBy: String,
validTill: String,
issueDate: Date,
active: Boolean,
},
],
aboutMe: { type: String, required: true },
experience: { type: String, required: true },
isPartner: Boolean,
active: Boolean,
isDeleted: Boolean,
email: String,
userName: String,
passwordHashed: String,
tokens: [{ token: String, exprireDate: { type: Date, required: true } }],
isBlocked: Boolean,
preorityPercentage: Schema.Types.Decimal128,
address: [
{
street: String,
pinCode: String,
country: Schema.Types.ObjectId,
city: Schema.Types.ObjectId,
lat: String,
lng: String,
},
],
reviewCount: Number,
studentCount: Number,
socialMediaHandles: { type: Map, of: String },
partnerWith: [Schema.Types.ObjectId],
partnerWithCount: Number,
rating: Number,
couseTopics: [String],
},
{ timestamps: true }
);
const creator = mongoose.model("creator", creatorSchema);
module.exports= { creator, creatorSchema };