-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathGetSolutionModel.cs
More file actions
55 lines (43 loc) · 1.63 KB
/
GetSolutionModel.cs
File metadata and controls
55 lines (43 loc) · 1.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
using System;
using System.Linq;
using HwProj.Models.AuthService.DTO;
namespace HwProj.Models.SolutionsService
{
public class GetSolutionModel
{
public GetSolutionModel(SolutionDto model, AccountDataDto[]? groupMates, AccountDataDto? lecturer)
{
Id = model.Id;
GithubUrl = model.GithubUrl;
Comment = model.Comment;
StudentId = model.StudentId;
GroupMates = groupMates?
.OrderBy(t => t.Surname)
.ThenBy(t => t.Name)
.ToArray()
?? Array.Empty<AccountDataDto>();
LecturerComment = model.LecturerComment;
PublicationDate = model.PublicationDate;
IsModified = model.IsModified;
Rating = model.Rating;
StudentId = model.StudentId;
TaskId = model.TaskId;
State = model.State;
RatingDate = model.RatingDate;
Lecturer = lecturer;
}
public DateTime? RatingDate { get; set; }
public long Id { get; set; }
public string GithubUrl { get; set; }
public string Comment { get; set; }
public SolutionState State { get; set; }
public int Rating { get; set; }
public string StudentId { get; set; }
public long TaskId { get; set; }
public DateTime PublicationDate { get; set; }
public bool IsModified { get; set; }
public string LecturerComment { get; set; }
public AccountDataDto[] GroupMates { get; set; }
public AccountDataDto? Lecturer { get; set; }
}
}