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

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

ADDEED ALL MODESL :)

  • Property mode set to 100644
File size: 2.1 KB
RevLine 
[277bd72]1namespace iknow_api.DTOs
[5b42c8d]2{
[c7d4a59]3 // Login DTO
4 public class LoginDto
[5b42c8d]5 {
[c7d4a59]6 public string Email { get; set; } = string.Empty;
7 public string Password { get; set; } = string.Empty;
[3347c1b]8 public bool GenerateRefreshToken { get; set; }
[c7d4a59]9 }
[cab02ad]10 public class GetUserDataDto
11 {
[3592476]12 public string? JWT { get; set; }
[cab02ad]13 }
[c7d4a59]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;
[f8af32b]20 public string EMBG { get; set; } = string.Empty;
[c7d4a59]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; }
[b38c39c]26 public float gpa { get; set; }
[3592476]27 public Type tip { get; set; }
[b38c39c]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; }
[3592476]34 public Quota quotaType { get; set; }
[a92a2a4]35 public int majorType { get; set; }
[b38c39c]36
[c7d4a59]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
[5b42c8d]58 }
[3592476]59 public enum Type
[b38c39c]60 {
61 strucen, gimnazija
62 }
[3592476]63 public enum Quota
[b38c39c]64 {
65 drzavna, privatna, stipendija
66 }
[3592476]67 public enum Major
[b38c39c]68 {
69 SIIS, PIT, KN, KI, IMB, IE, SSP, SEIS
70 }
[5b42c8d]71}
Note: See TracBrowser for help on using the repository browser.