Преглед на файлове

user model updated

master
kj1352 преди 4 години
родител
ревизия
ae2fd50c21
променени са 2 файла, в които са добавени 40 реда и са изтрити 43 реда
  1. +0
    -21
      models/quiz.ts
  2. +40
    -22
      models/user.ts

+ 0
- 21
models/quiz.ts Целия файл

@@ -1,21 +0,0 @@
export type Question = {
type: 'INPUT' | 'MCQ',
text: string,
choices?: Array<string>,
correctAnswer?: string,
durationInSeconds: number,
marks: number,
}

export type Quiz = {
questions: Array<Question>,
minScoreToPass: number,
totalDuration?: number, // Military time 060 is 6 AM, 1300 is 1 PM
}

export type Assignment = {
heading: string,
description: string, //Rich text
deadlineDate: string,
minimumCriteria: string,
}

+ 40
- 22
models/user.ts Целия файл

@@ -1,32 +1,50 @@
export type skillInformation = {
export type IWord = {
name: string,
category: 'FRONT_END' | 'BACKEND' | 'DATABASE' | 'BENIFICIAL'
};
pronounciation: {
text: string,
audio: string, // URL for the audio file
},
similarWords: Array<IWord>,
gramaticalDetails: Array<{
type: 'NOUN' | 'PRONOUN' | 'ADJECTIVE' | 'VERB' | 'ADVERB' | 'PREPOSITION' | 'CONJUNCTION' | 'INTERJECTION',
description: string,
examples: Array<string>,
}>
}

export type IShelf = {
name: string,
description: string,
viewType: 'PUBLIC' | 'PRIVATE' | 'FRIENDS' | 'FOLLOWERS',
isArchived: boolean,
addedWords: Array<{
word: IWord,
notes: Array<string>,
isFavourite: boolean,
nextRevisionDateTime: Date,
revisionHistory : Array<{
day: Date,
wasRecallSuccessful: boolean,
}>
}>
}

export type ICategory = {
name: string,
icon: string,
shelves: Array<IShelf>,
isArchived: boolean,
}

export type IUser = {
// For Auth purposes
_id: string,
name: string,
email: string,
password: string,
isVerified: boolean,
otp: number,
userType: 'ADMIN' | 'MODERATOR' | 'APPLICANT',
skillSet?: Array<skillInformation>,
progress?: Array<{
roundType: 'PRELIMINARY' | 'TECHNICAL_INTERVIEW' | 'ASSIGNMENT' | 'FINAL_INTERVIEW',
score: number,
status: undefined | 'PASS' | 'FAIL' | 'PAUSED' | 'IN_PROGRESS' | 'REVIEW',
answers?: Array<string>,
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,
}>,

// Other records
categories: Array<ICategory>
}

Зареждане…
Отказ
Запис