@@ -1,4 +1,7 @@ | |||||
import { IUser } from './user'; | import { IUser } from './user'; | ||||
import { IQuiz } from './quiz'; | |||||
import { ITest } from './test'; | |||||
import { IForum } from './forum'; | |||||
export type ICourse = { | export type ICourse = { | ||||
id: string | number, | id: string | number, | ||||
@@ -6,9 +9,24 @@ export type ICourse = { | |||||
name: string, | name: string, | ||||
description?: string, | description?: string, | ||||
code: string, | code: string, | ||||
teacher : IUser, | |||||
chapterList: Array<IChapter>; | |||||
enrolledList: Array<IUser>; | |||||
teacher: IUser, | |||||
chapterList: Array<IChapter>, | |||||
enrolledList: Array<IUser>, | |||||
timeTable: Array<ISchedule>, | |||||
testList: Array<ITest>, | |||||
forum: IForum | |||||
}; | |||||
export type ISchedule = { | |||||
id: string | number, | |||||
dateTime: Date, | |||||
attendanceList: Array<IAttendance> | |||||
}; | |||||
export type IAttendance = { | |||||
student: IUser, | |||||
status: 'PRESENT' | 'ABSENT' | 'LATE', | |||||
additionalNote: string | |||||
}; | }; | ||||
export type IChapter = { | export type IChapter = { | ||||
@@ -23,25 +41,26 @@ export type ITopic = { | |||||
id: string | number, | id: string | number, | ||||
name: string, | name: string, | ||||
description?: string, | description?: string, | ||||
media: IVideo | IAudio | IText, | |||||
type: 'VIDEO' | 'AUDIO' | 'RICH_TEXT' | 'QUIZ' | |||||
media: IVideo | IAudio | IRichText | IQuiz, | |||||
attachments: Array<IAttachment>, | attachments: Array<IAttachment>, | ||||
}; | }; | ||||
type IVideo = { | |||||
export type IVideo = { | |||||
id: string | number, | id: string | number, | ||||
url: string, | url: string, | ||||
transcript: string, | transcript: string, | ||||
notes: Array<INotes> | notes: Array<INotes> | ||||
}; | }; | ||||
type IAudio = { | |||||
export type IAudio = { | |||||
id: string | number, | id: string | number, | ||||
url: string, | url: string, | ||||
transcript: string, | transcript: string, | ||||
notes: Array<INotes> | notes: Array<INotes> | ||||
}; | }; | ||||
type INotes = { | |||||
export type INotes = { | |||||
id: string | number, | id: string | number, | ||||
seekTime: string, | seekTime: string, | ||||
type: 'PUBLIC' | 'PRIVATE', | type: 'PUBLIC' | 'PRIVATE', | ||||
@@ -49,19 +68,19 @@ type INotes = { | |||||
createdBy: IUser | createdBy: IUser | ||||
}; | }; | ||||
type IText = { | |||||
export type IRichText = { | |||||
id: string | number, | id: string | number, | ||||
transcript: string | transcript: string | ||||
}; | }; | ||||
type IAttachment = { | |||||
export type IAttachment = { | |||||
id: string | number, | id: string | number, | ||||
name: string, | name: string, | ||||
description?: string, | description?: string, | ||||
url: string | url: string | ||||
}; | }; | ||||
type IResource = { | |||||
export type IResource = { | |||||
id: string, | id: string, | ||||
name: string, | name: string, | ||||
description?: string, | description?: string, | ||||
@@ -0,0 +1,45 @@ | |||||
import { IUser } from './user'; | |||||
export type IForum = { | |||||
id: string | number, | |||||
name: string, | |||||
description?: string, | |||||
moderatorList: Array<IUser>, | |||||
postList: Array<IPost> | |||||
}; | |||||
export type IPost = { | |||||
id: string | number, | |||||
heading: string, | |||||
description: string, | |||||
isBookmarked: boolean, | |||||
hashTags: Array<string>, | |||||
taggedFriends: Array<IUser>, | |||||
externalLink: string, | |||||
files: Array<Blob>, | |||||
author: IUser, | |||||
dateTime: Date, | |||||
likedUsers: Array<IUser>, | |||||
dislikedUsers: Array<IUser>, | |||||
reports: Array<IReport> | |||||
commentList: Array<IComment>, | |||||
answerList: Array<IPost> | |||||
}; | |||||
export type IComment = { | |||||
id: string | number, | |||||
description: string, | |||||
author: IUser, | |||||
dateTime: Date, | |||||
likedUsers: Array<IUser>, | |||||
dislikedUsers: Array<IUser>, | |||||
reports: Array<IReport>, | |||||
replyList: Array<IComment>, | |||||
replyThreadLimit: number | |||||
} | |||||
export type IReport = { | |||||
user: IUser, | |||||
description: string, | |||||
dateTime: Date | |||||
}; |
@@ -0,0 +1,33 @@ | |||||
import { IUser } from './user'; | |||||
export type IQuiz = { | |||||
id: string | number, | |||||
name: string, | |||||
description?: string, | |||||
questionList: Array<IQuestion>, | |||||
quizAttendanceList: Array<IQuizAttendance>, | |||||
canRetake: boolean | |||||
}; | |||||
export type IQuizAttendance = { | |||||
student: IUser, | |||||
answerList: Array<IAnswer> | |||||
}; | |||||
export type IAnswer = { | |||||
questionId: string, | |||||
answer: string | |||||
}; | |||||
export type IQuestion = { | |||||
id: string | number, | |||||
question: string, | |||||
answer: string, | |||||
type: 'SINGLE_SELECT' | 'MULTI_SELECT' | 'FILL_IN_THE_BLANK', | |||||
optionList?: Array<IOption> | |||||
}; | |||||
export type IOption = { | |||||
id: string | number, | |||||
heading: string | |||||
}; |
@@ -0,0 +1,54 @@ | |||||
import { IUser } from './user'; | |||||
export type ITest = { | |||||
id: string | number, | |||||
dateTime: Date, | |||||
durationInMinutes: number, | |||||
description?: string, | |||||
totalMarks: number, | |||||
rules: string, | |||||
categoricalQuestionList: Array<ICategory>, | |||||
canRetake: boolean, | |||||
testAttendanceList: Array<ITestAttendance>, | |||||
}; | |||||
export type ITestAttendance = { | |||||
student: IUser, | |||||
answerList: Array<IAnswer>, | |||||
evaluator: IUser, | |||||
}; | |||||
export type IAnswer = { | |||||
questionId: string, | |||||
answer: string, | |||||
status: 'CORRECT' | 'WRONG' | 'PARTIAL' // Using this so that the teacher can check the theoritical answers and decide the status, | |||||
marksAllotted?: string // For providing partial marks based on the textual answer written by the student | |||||
}; | |||||
export type ICategory = { | |||||
unitValue: number, | |||||
maximumMarks: number, // So the teacher can add extra questions | |||||
description?: string, | |||||
question: IQuestion, | |||||
}; | |||||
export type IQuestion = { | |||||
id: string | number, | |||||
heading: string, | |||||
answer: string | Array<string> | |||||
type: 'TEXT' | 'SINGLE_SELECT' | 'MULTI_SELECT' | 'MATCH_THE_FOLLOWING', | |||||
options?: Array<IOption>, | |||||
leftGroup?: Array<IMatchOption>, | |||||
rightGroup?: Array<IMatchOption>, | |||||
}; | |||||
export type IOption = { | |||||
id: string | number, | |||||
name: string, | |||||
}; | |||||
export type IMatchOption = { | |||||
id: string, | |||||
color: string, | |||||
name: string | |||||
}; |