1 | #nullable enable
|
---|
2 |
|
---|
3 | using System;
|
---|
4 | using System.Collections.Generic;
|
---|
5 |
|
---|
6 |
|
---|
7 | namespace FinkiChattery.Contracts.User
|
---|
8 | {
|
---|
9 | public class SelfUserResponse
|
---|
10 | {
|
---|
11 | public SelfUserResponse(StudentSelfResponse? student = null, TeacherSelfResponse? teacher = null, ModeratorSelfResponse? moderator = null)
|
---|
12 | {
|
---|
13 | Student = student;
|
---|
14 | Teacher = teacher;
|
---|
15 | Moderator = moderator;
|
---|
16 | }
|
---|
17 |
|
---|
18 | public StudentSelfResponse? Student { get; }
|
---|
19 | public TeacherSelfResponse? Teacher { get; }
|
---|
20 | public ModeratorSelfResponse? Moderator { get; }
|
---|
21 | }
|
---|
22 |
|
---|
23 | public class StudentSelfResponse
|
---|
24 | {
|
---|
25 | public StudentSelfResponse(Guid uid, long applicationUserId, string index, long reputation, string imageUrl, IEnumerable<StudentQuestionResponse> questions, IEnumerable<StudentTeamResponse> teams, IEnumerable<StudentNotificationResponse> notifications)
|
---|
26 | {
|
---|
27 | Uid = uid;
|
---|
28 | ApplicationUserId = applicationUserId;
|
---|
29 | Index = index;
|
---|
30 | Reputation = reputation;
|
---|
31 | ImageUrl = imageUrl;
|
---|
32 | Questions = questions;
|
---|
33 | Teams = teams;
|
---|
34 | Notifications = notifications;
|
---|
35 | }
|
---|
36 |
|
---|
37 | public Guid Uid { get; }
|
---|
38 | public long ApplicationUserId { get; }
|
---|
39 | public string Index { get; }
|
---|
40 | public long Reputation { get; }
|
---|
41 | public string ImageUrl { get; }
|
---|
42 | public IEnumerable<StudentQuestionResponse> Questions { get; }
|
---|
43 | public IEnumerable<StudentTeamResponse> Teams { get; }
|
---|
44 | public IEnumerable<StudentNotificationResponse> Notifications { get; }
|
---|
45 | }
|
---|
46 |
|
---|
47 | public class StudentNotificationResponse
|
---|
48 | {
|
---|
49 | public StudentNotificationResponse(Guid uid, string text, DateTime createdOn, Guid questionUid)
|
---|
50 | {
|
---|
51 | Uid = uid;
|
---|
52 | Text = text;
|
---|
53 | CreatedOn = createdOn;
|
---|
54 | QuestionUid = questionUid;
|
---|
55 | }
|
---|
56 |
|
---|
57 | public Guid Uid { get; }
|
---|
58 | public string Text { get; }
|
---|
59 | public DateTime CreatedOn { get; }
|
---|
60 | public Guid QuestionUid { get; }
|
---|
61 | }
|
---|
62 |
|
---|
63 | public class StudentQuestionResponse
|
---|
64 | {
|
---|
65 | public StudentQuestionResponse(Guid questionUid, string title)
|
---|
66 | {
|
---|
67 | QuestionUid = questionUid;
|
---|
68 | Title = title;
|
---|
69 | }
|
---|
70 |
|
---|
71 | public Guid QuestionUid { get; }
|
---|
72 | public string Title { get; }
|
---|
73 | }
|
---|
74 |
|
---|
75 | public class StudentTeamResponse
|
---|
76 | {
|
---|
77 | public StudentTeamResponse(Guid teamUid, string name)
|
---|
78 | {
|
---|
79 | TeamUid = teamUid;
|
---|
80 | Name = name;
|
---|
81 | }
|
---|
82 |
|
---|
83 | public Guid TeamUid { get; }
|
---|
84 | public string Name { get; }
|
---|
85 | }
|
---|
86 |
|
---|
87 | public class ModeratorSelfResponse
|
---|
88 | {
|
---|
89 | public ModeratorSelfResponse(Guid uid, long applicationUserId)
|
---|
90 | {
|
---|
91 | Uid = uid;
|
---|
92 | ApplicationUserId = applicationUserId;
|
---|
93 | }
|
---|
94 |
|
---|
95 | public Guid Uid { get; }
|
---|
96 | public long ApplicationUserId { get; }
|
---|
97 | }
|
---|
98 |
|
---|
99 | public class TeacherSelfResponse
|
---|
100 | {
|
---|
101 | public TeacherSelfResponse(Guid uid, long applicationUserId, IEnumerable<TeacherTeamResponse> teams)
|
---|
102 | {
|
---|
103 | Uid = uid;
|
---|
104 | ApplicationUserId = applicationUserId;
|
---|
105 | Teams = teams;
|
---|
106 | }
|
---|
107 |
|
---|
108 | public Guid Uid { get; }
|
---|
109 | public long ApplicationUserId { get; }
|
---|
110 | public IEnumerable<TeacherTeamResponse> Teams { get; }
|
---|
111 | }
|
---|
112 |
|
---|
113 | public class TeacherTeamResponse
|
---|
114 | {
|
---|
115 | public TeacherTeamResponse(Guid teamUid, string name)
|
---|
116 | {
|
---|
117 | TeamUid = teamUid;
|
---|
118 | Name = name;
|
---|
119 | }
|
---|
120 |
|
---|
121 | public Guid TeamUid { get; }
|
---|
122 | public string Name { get; }
|
---|
123 | }
|
---|
124 | }
|
---|