source: src/Clients/Angular/finki-chattery/src/app/core/state/question-state/question-state-response.models.ts@ fcc3080

dev
Last change on this file since fcc3080 was fcc3080, checked in by Стојков Марко <mst@…>, 3 years ago

Fixed bug when voting an answer

  • Property mode set to 100644
File size: 2.2 KB
Line 
1import { VoteType } from 'src/app/shared-app/models';
2
3export class QuestionStateResponse {
4 public uid!: string;
5 public title!: string;
6 public text!: string;
7 public createdOn!: moment.Moment;
8 public views!: number;
9 public lastActiveOn!: moment.Moment;
10 public studentResponse!: StudentQuestionStateResponse;
11 public answersResponse!: AnswerQuestionStateResponse[];
12 public categoriesResponse!: QuestionCategoryQuestionStateResponse[];
13 public teamResponse!: TeamQuestionStateResponse | null;
14}
15
16export class StudentQuestionStateResponse {
17 public uid!: string;
18 public index!: string;
19 public imageUrl!: string;
20 public reputation!: number;
21}
22
23export class TeamQuestionStateResponse {
24 public uid!: string;
25 public name!: string;
26}
27
28export class QuestionCategoryQuestionStateResponse {
29 public uid!: string;
30 public name!: string;
31}
32
33export class AnswerQuestionStateResponse {
34 public uid!: string;
35 public text!: string;
36 public correctAnswer!: boolean;
37 public createdOn!: moment.Moment;
38 public votesCount!: number;
39 public studentResponse!: AnswerStudentQuestionStateResponse;
40 public answerResponsesResponse!: AnswerResponseQuestionStateResponse[];
41}
42
43export class AnswerStudentQuestionStateResponse {
44 public uid!: string;
45 public index!: string;
46 public imageUrl!: string;
47 public reputation!: number;
48}
49
50export class AnswerResponseQuestionStateResponse {
51 public uid!: string;
52 public text!: string;
53 public createdOn!: moment.Moment;
54 public studentResponse!: AnswerResponseStudentQuestionStateResponse;
55}
56
57export class AnswerResponseStudentQuestionStateResponse {
58 public uid!: string;
59 public index!: string;
60 public imageUrl!: string;
61 public reputation!: number;
62}
63
64export class PreviewQuestionResponse {
65 public uid!: string;
66 public title!: string;
67 public createdOn!: moment.Moment;
68 public views!: number;
69 public answersCount!: number;
70 public categories!: PreviewQuestionCategoryResponse[];
71}
72
73export class PreviewQuestionCategoryResponse {
74 public uid!: string;
75 public text!: string;
76}
77
78export class VoteAnswerResponse {
79 public answerUid!: string;
80 public voteUid!: string;
81 public voteType!: VoteType;
82 public voteAlreadyExists!: boolean;
83}
Note: See TracBrowser for help on using the repository browser.