From 9db3f3730213a7f21eef1aadd2b142e1d4ae69b4 Mon Sep 17 00:00:00 2001 From: kj1352 Date: Tue, 21 Sep 2021 12:03:46 +0530 Subject: [PATCH] defined models --- models/quiz.ts | 21 +++++++++++++++++++++ models/user.ts | 28 ++++++++++++++++++++++++++++ src/index.ts | 2 -- 3 files changed, 49 insertions(+), 2 deletions(-) create mode 100644 models/quiz.ts create mode 100644 models/user.ts diff --git a/models/quiz.ts b/models/quiz.ts new file mode 100644 index 0000000..d06eb84 --- /dev/null +++ b/models/quiz.ts @@ -0,0 +1,21 @@ +export default interface Question { + type: 'INPUT' | 'MCQ', + text: string, + choices?: Array, + correctAnswer?: string, + durationInSeconds: number, + marks: number, +} + +export default interface Quiz { + questions: Array, + minScoreToPass: number, + totalDuration?: number, // Military time 060 is 6 AM, 1300 is 1 PM +} + +export default interface Assignment { + heading: string, + description: string, //Rich text + deadlineDate: string, + minimumCriteria: string, +} \ No newline at end of file diff --git a/models/user.ts b/models/user.ts new file mode 100644 index 0000000..4de44e9 --- /dev/null +++ b/models/user.ts @@ -0,0 +1,28 @@ +export default interface skillInformation { + name: string, + category: 'FRONT_END' | 'BACKEND' | 'DATABASE' | 'BENIFICIAL' +}; + +export default interface IUser { + name: string, + email: string, + userType: 'ADMIN' | 'MODERATOR' | 'APPLICANT', + skillSet?: Array, + progress?: Array<{ + roundType: 'PRELIMINARY' | 'TECHNICAL_INTERVIEW' | 'ASSIGNMENT' | 'FINAL_INTERVIEW', + score: number, + status: undefined | 'PASS' | 'FAIL' | 'PAUSED' | 'IN_PROGRESS' | 'REVIEW', + answers?: Array, + preferredInterviewSlot?: Date, + }>, + userDocuments?: Array<{ + type: 'ID_PROOF' | 'CERTIFICATES' | 'EXPERIENCE_LETTER' | 'PAYSLIPS', + status: undefined | 'UPLOADED' | 'VERIFYING' | 'VERIFIED' | 'FAILED', + comments?: Array<{ + userName: string, + comment: string, + timeStamps: Date, + }>, + document: File, + }>, +} \ No newline at end of file diff --git a/src/index.ts b/src/index.ts index a64d6ee..34f998d 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,10 +1,8 @@ import express from 'express'; const app = express(); - const port = 3000; -const key = '315740fef6af918da31cc00800d6b6a5'; app.get('/', (req, res) => { res.send("Run it!");