Skip to content

Commit

Permalink
Merge pull request #244 from tcet-opensource/212-model-for-coursework
Browse files Browse the repository at this point in the history
212 model for coursework
  • Loading branch information
Aastha-S-Rai authored Aug 26, 2023
2 parents c247d60 + e87f8d5 commit 0e4de05
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions models/coursework.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import connector from "#models/databaseUtil";

const courseworkSchema = {
student: { type: mongoose.Schema.Types.ObjectId, ref: 'Student', required: true},
type:{type : String , enum : ['onCampus','offCampus'], required: true},
course:{type:mongoose.Schema.Types.ObjectId, ref: 'Course', required:true},
task: {type: mongoose.Schema.Types.ObjectId, refPath: 'objectID', required: true },
objectID: {type: String, enum: ['Practical', 'Tutorial', 'Assignment'], required: true},
activity:{type:mongoose.Schema.Types.ObjectId, ref: 'Activity',required:true},
marks: {type: Number, required: true},
};
const Coursework = connector.model('Coursework', courseworkSchema);

module.exports = Coursework;

0 comments on commit 0e4de05

Please sign in to comment.