source: iknow-api/DTOs/EnrollmentDTO.cs

Last change on this file was ea40556, checked in by Stefan-Saveski <stefansaveski19@…>, 8 days ago
  • ready for presentation
  • Property mode set to 100644
File size: 1.8 KB
Line 
1namespace iknow_api.DTOs
2{
3 /// <summary>Everything the enrolment form needs to render.</summary>
4 public class EnrollmentOptionsDto
5 {
6 /// <summary>How many subjects an enrolment must contain.</summary>
7 public int RequiredSubjects { get; set; }
8
9 /// <summary>Semesters this student has not enrolled in yet.</summary>
10 public List<SemesterOptionDto> Semesters { get; set; } = new();
11
12 public List<MajorOptionDto> Majors { get; set; } = new();
13
14 /// <summary>The major from the most recent enrolment, if there is one.</summary>
15 public int? DefaultMajorId { get; set; }
16 }
17
18 public class SemesterOptionDto
19 {
20 public int Id { get; set; }
21 public string? Name { get; set; }
22 public int Year { get; set; }
23 public string? Type { get; set; }
24 }
25
26 public class MajorOptionDto
27 {
28 public int Id { get; set; }
29 public string? Name { get; set; }
30 public List<SubjectOptionDto> Subjects { get; set; } = new();
31 }
32
33 public class SubjectOptionDto
34 {
35 public int Id { get; set; }
36 public string? Name { get; set; }
37 public string? Code { get; set; }
38 public int Credits { get; set; }
39 public int MandatorySemester { get; set; }
40 /// <summary>True when the student already passed this subject.</summary>
41 public bool AlreadyPassed { get; set; }
42 }
43
44 public class EnrollSemesterRequestDto
45 {
46 public int SemesterId { get; set; }
47 public int MajorId { get; set; }
48 public List<int> SubjectIds { get; set; } = new();
49 }
50
51 public class EnrollSemesterResultDto
52 {
53 public bool Ok { get; set; }
54 public string? Message { get; set; }
55 public int? EnrolledSemesterId { get; set; }
56 }
57}
Note: See TracBrowser for help on using the repository browser.