source: src/FinkiChattery/FinkiChattery.Persistence/Repositories/Contracts/Question/QuestionStateDto.cs@ ad0fcd3

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

Restructured voting

  • Property mode set to 100644
File size: 5.0 KB
Line 
1#nullable enable
2
3using System;
4using System.Collections.Generic;
5
6namespace FinkiChattery.Persistence.Repositories.Contracts
7{
8 public class QuestionStateDto
9 {
10 public QuestionStateDto(long id, Guid uid, string title, string text, DateTime createdOn, long views, DateTime lastActiveOn, StudentQuestionStateDto studentDto, IEnumerable<AnswerQuestionStateDto> answersDto, IEnumerable<QuestionCategoryQuestionStateDto> categoriesDto, TeamQuestionStateDto? teamDto)
11 {
12 Id = id;
13 Uid = uid;
14 Title = title;
15 Text = text;
16 CreatedOn = createdOn;
17 Views = views;
18 LastActiveOn = lastActiveOn;
19 StudentDto = studentDto;
20 AnswersDto = answersDto;
21 CategoriesDto = categoriesDto;
22 TeamDto = teamDto;
23 }
24
25 public long Id { get; }
26 public Guid Uid { get; }
27 public string Title { get; }
28 public string Text { get; }
29 public DateTime CreatedOn { get; }
30 public long Views { get; }
31 public DateTime LastActiveOn { get; }
32 public StudentQuestionStateDto StudentDto { get; }
33 public IEnumerable<AnswerQuestionStateDto> AnswersDto { get; }
34 public IEnumerable<QuestionCategoryQuestionStateDto> CategoriesDto { get; }
35 public TeamQuestionStateDto? TeamDto { get; }
36 }
37
38 public class StudentQuestionStateDto
39 {
40 public StudentQuestionStateDto(long id, Guid uid, string index, string imageUrl, long reputation)
41 {
42 Id = id;
43 Uid = uid;
44 Index = index;
45 ImageUrl = imageUrl;
46 Reputation = reputation;
47 }
48
49 public long Id { get; }
50 public Guid Uid { get; }
51 public string Index { get; }
52 public string ImageUrl { get; }
53 public long Reputation { get; }
54 }
55
56 public class TeamQuestionStateDto
57 {
58 public TeamQuestionStateDto(long id, Guid uid, string name)
59 {
60 Id = id;
61 Uid = uid;
62 Name = name;
63 }
64
65 public long Id { get; }
66 public Guid Uid { get; }
67 public string Name { get; }
68 }
69
70 public class QuestionCategoryQuestionStateDto
71 {
72 public QuestionCategoryQuestionStateDto(long id, Guid uid, string name)
73 {
74 Id = id;
75 Uid = uid;
76 Name = name;
77 }
78
79 public long Id { get; }
80 public Guid Uid { get; }
81 public string Name { get; }
82 }
83
84 public class AnswerQuestionStateDto
85 {
86 public AnswerQuestionStateDto(long id, Guid uid, string text, bool correctAnswer, DateTime createdOn, long votesCount, AnswerStudentQuestionStateDto studentDto, IEnumerable<AnswerResponseQuestionStateDto> answerResponsesDto)
87 {
88 Id = id;
89 Uid = uid;
90 Text = text;
91 CorrectAnswer = correctAnswer;
92 CreatedOn = createdOn;
93 VotesCount = votesCount;
94 StudentDto = studentDto;
95 AnswerResponsesDto = answerResponsesDto;
96 }
97
98 public long Id { get; }
99 public Guid Uid { get; }
100 public string Text { get; }
101 public bool CorrectAnswer { get; }
102 public DateTime CreatedOn { get; }
103 public long VotesCount { get; }
104 public AnswerStudentQuestionStateDto StudentDto { get; }
105 public IEnumerable<AnswerResponseQuestionStateDto> AnswerResponsesDto { get; }
106 }
107
108 public class AnswerStudentQuestionStateDto
109 {
110 public AnswerStudentQuestionStateDto(long id, Guid uid, string index, string imageUrl, long reputation)
111 {
112 Id = id;
113 Uid = uid;
114 Index = index;
115 ImageUrl = imageUrl;
116 Reputation = reputation;
117 }
118 public long Id { get; }
119 public Guid Uid { get; }
120 public string Index { get; }
121 public string ImageUrl { get; }
122 public long Reputation { get; }
123 }
124
125 public class AnswerResponseQuestionStateDto
126 {
127 public AnswerResponseQuestionStateDto(long id, Guid uid, string text, DateTime createdOn, AnswerResponseStudentQuestionStateDto studentDto)
128 {
129 Id = id;
130 Uid = uid;
131 Text = text;
132 CreatedOn = createdOn;
133 StudentDto = studentDto;
134 }
135
136 public long Id { get; }
137 public Guid Uid { get; }
138 public string Text { get; }
139 public DateTime CreatedOn { get; }
140 public AnswerResponseStudentQuestionStateDto StudentDto { get; }
141 }
142
143 public class AnswerResponseStudentQuestionStateDto
144 {
145 public AnswerResponseStudentQuestionStateDto(long id, Guid uid, string index, string imageUrl, long reputation)
146 {
147 Id = id;
148 Uid = uid;
149 Index = index;
150 ImageUrl = imageUrl;
151 Reputation = reputation;
152 }
153
154 public long Id { get; }
155 public Guid Uid { get; }
156 public string Index { get; }
157 public string ImageUrl { get; }
158 public long Reputation { get; }
159 }
160}
Note: See TracBrowser for help on using the repository browser.