-
Notifications
You must be signed in to change notification settings - Fork 0
/
Resume.mjs
68 lines (57 loc) · 2.39 KB
/
Resume.mjs
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
import mongoose from "mongoose";
// import { SkillSlot } from "./SkillSlot.mjs";
// import { Education } from "./Education.mjs";
// import { Experience } from "./Experience.mjs";
const skillSlotSchema = new mongoose.Schema({
name: { type: String, required: false },
list: { type: String, required: false },
});
const durationSchema = new mongoose.Schema({
startDate: { type: Date, required: false },
endDate: { type: Date, required: false }
});
const experienceSchema = new mongoose.Schema({
title: { type: String, required: false },
type: { type: String, required: false },
organization: { type: String, required: false },
location: { type: String, required: false },
duration: { type: durationSchema, required: false },
description: { type: String, required: false }
});
const educationSchema = new mongoose.Schema({
institution: { type: String, required: false },
location: { type: String, required: false },
degree: { type: String, required: false },
major: { type: String, required: false },
minor: { type: String, required: false },
gpa: { type: String, required: false },
duration: { type: durationSchema, required: false }
});
const projectSchema = new mongoose.Schema({
name: { type: String, required: false },
skillset: { type: String, required: false },
duration: { type: durationSchema, required: false },
description: { type: String, required: false },
});
const achievementSchema = new mongoose.Schema({
name: { type: String, required: false },
organization: { type: String, required: false },
duration: { type: durationSchema, required: false },
description: { type: String, required: false }
});
const headerSchema = new mongoose.Schema({
name: { type: String, required: false },
phone: { type: String, required: false },
email: { type: String, required: false },
link: { type: String, required: false }
});
const resumeSchema = new mongoose.Schema({
header: { type: [headerSchema], required: false },
educations: { type: [educationSchema], required: false },
experiences: { type: [experienceSchema], required: false },
projects: { type: [projectSchema], required: false },
achievements: { type: [achievementSchema], required: false },
skills: { type: [skillSlotSchema], required: false }
});
const Resume = mongoose.model('Resume', resumeSchema);
export { Resume, resumeSchema };