source: iknow-api/DTOs/UserDTO.cs@ 586825e

Last change on this file since 586825e was 586825e, checked in by imbrsk <boris696boris@…>, 11 months ago

Refactored enums

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