[b25b9ea] | 1 | #nullable enable
|
---|
| 2 |
|
---|
| 3 | using System;
|
---|
| 4 | using System.Collections.Generic;
|
---|
| 5 |
|
---|
| 6 | namespace 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 | {
|
---|
[dab7a9b] | 40 | public StudentQuestionStateDto(long id, Guid uid, string index, string imageUrl, long reputation)
|
---|
[b25b9ea] | 41 | {
|
---|
| 42 | Id = id;
|
---|
| 43 | Uid = uid;
|
---|
| 44 | Index = index;
|
---|
| 45 | ImageUrl = imageUrl;
|
---|
[dab7a9b] | 46 | Reputation = reputation;
|
---|
[b25b9ea] | 47 | }
|
---|
| 48 |
|
---|
| 49 | public long Id { get; }
|
---|
| 50 | public Guid Uid { get; }
|
---|
| 51 | public string Index { get; }
|
---|
| 52 | public string ImageUrl { get; }
|
---|
[dab7a9b] | 53 | public long Reputation { get; }
|
---|
[b25b9ea] | 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 | {
|
---|
[ad0fcd3] | 86 | public AnswerQuestionStateDto(long id, Guid uid, string text, bool correctAnswer, DateTime createdOn, long votesCount, AnswerStudentQuestionStateDto studentDto, IEnumerable<AnswerResponseQuestionStateDto> answerResponsesDto)
|
---|
[b25b9ea] | 87 | {
|
---|
| 88 | Id = id;
|
---|
| 89 | Uid = uid;
|
---|
| 90 | Text = text;
|
---|
| 91 | CorrectAnswer = correctAnswer;
|
---|
| 92 | CreatedOn = createdOn;
|
---|
[ad0fcd3] | 93 | VotesCount = votesCount;
|
---|
[b25b9ea] | 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; }
|
---|
[ad0fcd3] | 103 | public long VotesCount { get; }
|
---|
[b25b9ea] | 104 | public AnswerStudentQuestionStateDto StudentDto { get; }
|
---|
| 105 | public IEnumerable<AnswerResponseQuestionStateDto> AnswerResponsesDto { get; }
|
---|
| 106 | }
|
---|
| 107 |
|
---|
| 108 | public class AnswerStudentQuestionStateDto
|
---|
| 109 | {
|
---|
[dab7a9b] | 110 | public AnswerStudentQuestionStateDto(long id, Guid uid, string index, string imageUrl, long reputation)
|
---|
[b25b9ea] | 111 | {
|
---|
| 112 | Id = id;
|
---|
| 113 | Uid = uid;
|
---|
| 114 | Index = index;
|
---|
| 115 | ImageUrl = imageUrl;
|
---|
[dab7a9b] | 116 | Reputation = reputation;
|
---|
[b25b9ea] | 117 | }
|
---|
| 118 | public long Id { get; }
|
---|
| 119 | public Guid Uid { get; }
|
---|
| 120 | public string Index { get; }
|
---|
| 121 | public string ImageUrl { get; }
|
---|
[dab7a9b] | 122 | public long Reputation { get; }
|
---|
[b25b9ea] | 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 | {
|
---|
[dab7a9b] | 145 | public AnswerResponseStudentQuestionStateDto(long id, Guid uid, string index, string imageUrl, long reputation)
|
---|
[b25b9ea] | 146 | {
|
---|
| 147 | Id = id;
|
---|
| 148 | Uid = uid;
|
---|
| 149 | Index = index;
|
---|
| 150 | ImageUrl = imageUrl;
|
---|
[dab7a9b] | 151 | Reputation = reputation;
|
---|
[b25b9ea] | 152 | }
|
---|
| 153 |
|
---|
| 154 | public long Id { get; }
|
---|
| 155 | public Guid Uid { get; }
|
---|
| 156 | public string Index { get; }
|
---|
| 157 | public string ImageUrl { get; }
|
---|
[dab7a9b] | 158 | public long Reputation { get; }
|
---|
[b25b9ea] | 159 | }
|
---|
| 160 | }
|
---|