Skip to content

Commit

Permalink
Merge pull request #223 from tcet-opensource/213_Create_model_paper
Browse files Browse the repository at this point in the history
213 Create paper model
  • Loading branch information
kskarthik5 authored Aug 26, 2023
2 parents 7884984 + 46306ce commit 036be69
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions models/paper.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import connector from "#models/databaseUtil";

const paperSchema = {
answerSheetID: { type: String, required: true },
exam: [{ type: connector.Schema.Types.ObjectId, ref: "Exam", required: true }],
student: [{ type: connector.Schema.Types.ObjectId, ref: "Student", required: true }],
checkedBy: [{ type: connector.Schema.Types.ObjectId, ref: "Faculty", required: true }],
mark: { type: Number, required: true },
};

const Paper = connector.model("Paper", paperSchema);

0 comments on commit 036be69

Please sign in to comment.