File tree Expand file tree Collapse file tree 1 file changed +94
-0
lines changed Expand file tree Collapse file tree 1 file changed +94
-0
lines changed Original file line number Diff line number Diff line change 1+ const { connector } = require ( './databaseUtil' ) ;
2+
3+ const facultySchema = new mongoose . Schema ( {
4+ name : {
5+ type : String ,
6+ required : true ,
7+ } ,
8+ department : {
9+ type : mongoose . Schema . Types . ObjectId ,
10+ ref : 'Department' ,
11+ required : true ,
12+ } ,
13+ empType : {
14+ type : String ,
15+ required : true ,
16+ } ,
17+ emdUID : {
18+ type : String ,
19+ required : true ,
20+ } ,
21+ preferredSubjects : {
22+ type : [ { type : mongoose . Schema . Types . ObjectId , ref : 'Subject' } ] ,
23+ required : true ,
24+ } ,
25+ profileLink : {
26+ type : String ,
27+ required : true ,
28+ } ,
29+ designation : {
30+ type : [ String ] ,
31+ required : true ,
32+ } ,
33+ natureOfAssociation : {
34+ type : String ,
35+ required : true ,
36+ } ,
37+ uniApprovalStatus : {
38+ type : String ,
39+ required : true ,
40+ } ,
41+ qualifications : {
42+ type : [ String ] ,
43+ required : true ,
44+ } ,
45+ totalExperience : {
46+ type : String ,
47+ required : true ,
48+ } ,
49+ additionalResponsibilities : {
50+ type : String ,
51+ required : true ,
52+ } ,
53+ achievements : {
54+ type : [ String ] ,
55+ required : true ,
56+ } ,
57+ areaOfSpecialization : {
58+ type : [ String ] ,
59+ required : true ,
60+ } ,
61+ papersPublishedPG : {
62+ type : Number ,
63+ required : true ,
64+ } ,
65+ papersPublishedUG : {
66+ type : Number ,
67+ required : true ,
68+ } ,
69+ email : {
70+ type : String ,
71+ required : true ,
72+ unique : true ,
73+ } ,
74+ phoneNumber : {
75+ type : String ,
76+ required : true ,
77+ } ,
78+ office : {
79+ type : String ,
80+ required : true ,
81+ } ,
82+ isTenured : {
83+ type : Boolean ,
84+ default : false ,
85+ } ,
86+ joinedDate : {
87+ type : Date ,
88+ default : Date . now ,
89+ } ,
90+ } ) ;
91+
92+ const Faculty = connector . model ( 'Faculty' , facultySchema ) ;
93+
94+ module . exports = Faculty ;
You can’t perform that action at this time.
0 commit comments