1 | export class QuestionStateViewModel {
|
---|
2 | constructor(
|
---|
3 | public uid: string,
|
---|
4 | public title: string,
|
---|
5 | public text: string,
|
---|
6 | public createdOn: moment.Moment,
|
---|
7 | public views: number,
|
---|
8 | public lastActiveOn: moment.Moment,
|
---|
9 | public student: StudentQuestionStateViewModel,
|
---|
10 | public answers: AnswerQuestionStateViewModel[],
|
---|
11 | public categories: QuestionCategoryQuestionStateViewModel[],
|
---|
12 | public team: TeamQuestionStateViewModel | null
|
---|
13 | ) {}
|
---|
14 | }
|
---|
15 |
|
---|
16 | export class StudentQuestionStateViewModel {
|
---|
17 | constructor(public uid: string, public index: string, public imageUrl: string, public reputation: number) {}
|
---|
18 | }
|
---|
19 |
|
---|
20 | export class TeamQuestionStateViewModel {
|
---|
21 | constructor(public uid: string, public name: string) {}
|
---|
22 | }
|
---|
23 |
|
---|
24 | export class QuestionCategoryQuestionStateViewModel {
|
---|
25 | constructor(public uid: string, public name: string) {}
|
---|
26 | }
|
---|
27 |
|
---|
28 | export class AnswerQuestionStateViewModel {
|
---|
29 | constructor(
|
---|
30 | public uid: string,
|
---|
31 | public text: string,
|
---|
32 | public correctAnswer: boolean,
|
---|
33 | public createdOn: moment.Moment,
|
---|
34 | public upvotesCount: number,
|
---|
35 | public student: AnswerStudentQuestionStateViewModel,
|
---|
36 | public answerResponses: AnswerResponseQuestionStateViewModel[]
|
---|
37 | ) {}
|
---|
38 | }
|
---|
39 |
|
---|
40 | export class AnswerStudentQuestionStateViewModel {
|
---|
41 | constructor(public uid: string, public index: string, public imageUrl: string, public reputation: number) {}
|
---|
42 | }
|
---|
43 |
|
---|
44 | export class AnswerResponseQuestionStateViewModel {
|
---|
45 | constructor(
|
---|
46 | public uid: string,
|
---|
47 | public text: string,
|
---|
48 | public createdOn: moment.Moment,
|
---|
49 | public student: AnswerResponseStudentQuestionStateViewModel
|
---|
50 | ) {}
|
---|
51 | }
|
---|
52 |
|
---|
53 | export class AnswerResponseStudentQuestionStateViewModel {
|
---|
54 | constructor(public uid: string, public index: string, public imageUrl: string, public reputation: number) {}
|
---|
55 | }
|
---|