source: iknow-api/DTOs/UserDTO.cs@ e423ff3

Last change on this file since e423ff3 was e423ff3, checked in by GitHub <noreply@…>, 11 months ago

Merge branch 'Dev' into feature/getUser

  • Property mode set to 100644
File size: 2.0 KB
Line 
1namespace iknow_api.DTOs
2{
3 // Login DTO
4 public class LoginDto
5 {
6 public string Email { get; set; } = string.Empty;
7 public string Password { get; set; } = string.Empty;
8 public bool GenerateRefreshToken { get; set; }
9 }
10 public class GetUserDataDto
11 {
12 public string JWT { get; set; }
13 }
14
15 // Registration DTO
16 public class RegisterDto
17 {
18 public string Name { get; set; } = string.Empty;
19 public string Surname { get; set; } = string.Empty;
20 public string? Index { get; set; }
21 public string Email { get; set; } = string.Empty;
22 public string Password { get; set; } = string.Empty;
23 public DateTime Bday { get; set; }
24 public UserRole Role { get; set; }
25 public float gpa { get; set; }
26 public type tip { get; set; }
27 public string city { get; set; } = string.Empty;
28 public string address { get; set; } = string.Empty;
29 public string municipality { get; set; } = string.Empty;
30 public string phoneNumber { get; set; } = string.Empty;
31 public string microsoftEmail { get; set; } = string.Empty;
32 public int enrollmentYear { get; set; }
33 public quota quotaType { get; set; }
34 public major majorType { get; set; }
35
36 }
37
38 // User response DTO (for returning user data without password)
39 public class UserResponseDto
40 {
41 public int Id { get; set; }
42 public string? Name { get; set; }
43 public string? Surname { get; set; }
44 public string? Index { get; set; }
45 public string? Email { get; set; }
46 public DateTime Bday { get; set; }
47 public DateTime CreatedAt { get; set; }
48 public UserRole Role { get; set; }
49 }
50
51 // User role enum
52 public enum UserRole
53 {
54 Admin,
55 Professor,
56 Student
57 }
58 public enum type
59 {
60 strucen, gimnazija
61 }
62 public enum quota
63 {
64 drzavna, privatna, stipendija
65 }
66 public enum major
67 {
68 SIIS, PIT, KN, KI, IMB, IE, SSP, SEIS
69 }
70}
Note: See TracBrowser for help on using the repository browser.