diff --git a/src/app/structure/course.ts b/src/app/structure/course.ts index b897536..ccaec5e 100644 --- a/src/app/structure/course.ts +++ b/src/app/structure/course.ts @@ -1,4 +1,7 @@ import { IUser } from './user'; +import { IQuiz } from './quiz'; +import { ITest } from './test'; +import { IForum } from './forum'; export type ICourse = { id: string | number, @@ -6,9 +9,24 @@ export type ICourse = { name: string, description?: string, code: string, - teacher : IUser, - chapterList: Array; - enrolledList: Array; + teacher: IUser, + chapterList: Array, + enrolledList: Array, + timeTable: Array, + testList: Array, + forum: IForum +}; + +export type ISchedule = { + id: string | number, + dateTime: Date, + attendanceList: Array +}; + +export type IAttendance = { + student: IUser, + status: 'PRESENT' | 'ABSENT' | 'LATE', + additionalNote: string }; export type IChapter = { @@ -23,25 +41,26 @@ export type ITopic = { id: string | number, name: string, description?: string, - media: IVideo | IAudio | IText, + type: 'VIDEO' | 'AUDIO' | 'RICH_TEXT' | 'QUIZ' + media: IVideo | IAudio | IRichText | IQuiz, attachments: Array, }; -type IVideo = { +export type IVideo = { id: string | number, url: string, transcript: string, notes: Array }; -type IAudio = { +export type IAudio = { id: string | number, url: string, transcript: string, notes: Array }; -type INotes = { +export type INotes = { id: string | number, seekTime: string, type: 'PUBLIC' | 'PRIVATE', @@ -49,19 +68,19 @@ type INotes = { createdBy: IUser }; -type IText = { +export type IRichText = { id: string | number, transcript: string }; -type IAttachment = { +export type IAttachment = { id: string | number, name: string, description?: string, url: string }; -type IResource = { +export type IResource = { id: string, name: string, description?: string, diff --git a/src/app/structure/forum.ts b/src/app/structure/forum.ts new file mode 100644 index 0000000..3615f7e --- /dev/null +++ b/src/app/structure/forum.ts @@ -0,0 +1,45 @@ +import { IUser } from './user'; + +export type IForum = { + id: string | number, + name: string, + description?: string, + moderatorList: Array, + postList: Array +}; + +export type IPost = { + id: string | number, + heading: string, + description: string, + isBookmarked: boolean, + hashTags: Array, + taggedFriends: Array, + externalLink: string, + files: Array, + author: IUser, + dateTime: Date, + likedUsers: Array, + dislikedUsers: Array, + reports: Array + commentList: Array, + answerList: Array +}; + +export type IComment = { + id: string | number, + description: string, + author: IUser, + dateTime: Date, + likedUsers: Array, + dislikedUsers: Array, + reports: Array, + replyList: Array, + replyThreadLimit: number +} + +export type IReport = { + user: IUser, + description: string, + dateTime: Date +}; diff --git a/src/app/structure/quiz.ts b/src/app/structure/quiz.ts new file mode 100644 index 0000000..057a965 --- /dev/null +++ b/src/app/structure/quiz.ts @@ -0,0 +1,33 @@ +import { IUser } from './user'; + +export type IQuiz = { + id: string | number, + name: string, + description?: string, + questionList: Array, + quizAttendanceList: Array, + canRetake: boolean +}; + +export type IQuizAttendance = { + student: IUser, + answerList: Array +}; + +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 +}; + +export type IOption = { + id: string | number, + heading: string +}; diff --git a/src/app/structure/test.ts b/src/app/structure/test.ts new file mode 100644 index 0000000..ca0a7b6 --- /dev/null +++ b/src/app/structure/test.ts @@ -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, + canRetake: boolean, + testAttendanceList: Array, +}; + +export type ITestAttendance = { + student: IUser, + answerList: Array, + 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 + type: 'TEXT' | 'SINGLE_SELECT' | 'MULTI_SELECT' | 'MATCH_THE_FOLLOWING', + options?: Array, + leftGroup?: Array, + rightGroup?: Array, +}; + +export type IOption = { + id: string | number, + name: string, +}; + +export type IMatchOption = { + id: string, + color: string, + name: string +};