| 1 | namespace 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 EMBG { get; set; } = string.Empty;
|
|---|
| 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; }
|
|---|
| 26 | public float gpa { get; set; }
|
|---|
| 27 | public Type tip { get; set; }
|
|---|
| 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; }
|
|---|
| 34 | public Quota quotaType { get; set; }
|
|---|
| 35 | public int majorType { get; set; }
|
|---|
| 36 |
|
|---|
| 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
|
|---|
| 58 | }
|
|---|
| 59 | public enum Type
|
|---|
| 60 | {
|
|---|
| 61 | strucen, gimnazija
|
|---|
| 62 | }
|
|---|
| 63 | public enum Quota
|
|---|
| 64 | {
|
|---|
| 65 | drzavna, privatna, stipendija
|
|---|
| 66 | }
|
|---|
| 67 | public enum Major
|
|---|
| 68 | {
|
|---|
| 69 | SIIS, PIT, KN, KI, IMB, IE, SSP, SEIS
|
|---|
| 70 | }
|
|---|
| 71 | } |
|---|