Initial commit: teaching institution management API.

Express/MongoDB backend with JWT auth, RBAC, S3 uploads, notifications, and scheduled jobs.
This commit is contained in:
2026-08-09 04:18:08 +02:00
commit f04c797be6
107 changed files with 9190 additions and 0 deletions
+51
View File
@@ -0,0 +1,51 @@
// /components/professors/professorModel.js
const mongoose = require('mongoose');
const professorSchema = new mongoose.Schema({
nationalIdCode: {
type: String,
required: true,
unique: true,
trim: true,
index: true
},
name: {
type: String,
required: true,
trim: true
},
surname: {
type: String,
required: true,
trim: true
},
phoneNumber: {
type: String,
required: true,
unique: true,
trim: true,
index: true
},
email: {
type: String,
trim: true,
lowercase: true
},
expertise: [{
type: String,
trim: true
}],
courses: [{
type: mongoose.Schema.Types.ObjectId,
ref: 'Course'
}],
isActive: {
type: Boolean,
default: true
}
}, {
timestamps: true
});
module.exports = mongoose.model('Professor', professorSchema);