| [c2f79d7] | 1 | using System.Text.Json.Serialization;
|
|---|
| 2 |
|
|---|
| 3 | namespace iknow_api.DTOs
|
|---|
| [5b42c8d] | 4 | {
|
|---|
| [c7d4a59] | 5 | // Login DTO
|
|---|
| 6 | public class LoginDto
|
|---|
| [5b42c8d] | 7 | {
|
|---|
| [c7d4a59] | 8 | public string Email { get; set; } = string.Empty;
|
|---|
| 9 | public string Password { get; set; } = string.Empty;
|
|---|
| [3347c1b] | 10 | public bool GenerateRefreshToken { get; set; }
|
|---|
| [c7d4a59] | 11 | }
|
|---|
| [cab02ad] | 12 | public class GetUserDataDto
|
|---|
| 13 | {
|
|---|
| [3592476] | 14 | public string? JWT { get; set; }
|
|---|
| [cab02ad] | 15 | }
|
|---|
| [c7d4a59] | 16 |
|
|---|
| 17 | // Registration DTO
|
|---|
| 18 | public class RegisterDto
|
|---|
| 19 | {
|
|---|
| 20 | public string Name { get; set; } = string.Empty;
|
|---|
| 21 | public string Surname { get; set; } = string.Empty;
|
|---|
| [f8af32b] | 22 | public string EMBG { get; set; } = string.Empty;
|
|---|
| [c7d4a59] | 23 | public string? Index { get; set; }
|
|---|
| 24 | public string Email { get; set; } = string.Empty;
|
|---|
| 25 | public string Password { get; set; } = string.Empty;
|
|---|
| 26 | public DateTime Bday { get; set; }
|
|---|
| 27 | public UserRole Role { get; set; }
|
|---|
| [b38c39c] | 28 | public float gpa { get; set; }
|
|---|
| [c2f79d7] | 29 | public HighSchoolType tip { get; set; }
|
|---|
| [b38c39c] | 30 | public string city { get; set; } = string.Empty;
|
|---|
| 31 | public string address { get; set; } = string.Empty;
|
|---|
| 32 | public string municipality { get; set; } = string.Empty;
|
|---|
| 33 | public string phoneNumber { get; set; } = string.Empty;
|
|---|
| 34 | public string microsoftEmail { get; set; } = string.Empty;
|
|---|
| 35 | public int enrollmentYear { get; set; }
|
|---|
| [3592476] | 36 | public Quota quotaType { get; set; }
|
|---|
| [a92a2a4] | 37 | public int majorType { get; set; }
|
|---|
| [b38c39c] | 38 |
|
|---|
| [c7d4a59] | 39 | }
|
|---|
| 40 |
|
|---|
| 41 | // User response DTO (for returning user data without password)
|
|---|
| 42 | public class UserResponseDto
|
|---|
| 43 | {
|
|---|
| 44 | public int Id { get; set; }
|
|---|
| 45 | public string? Name { get; set; }
|
|---|
| 46 | public string? Surname { get; set; }
|
|---|
| 47 | public string? Index { get; set; }
|
|---|
| 48 | public string? Email { get; set; }
|
|---|
| 49 | public DateTime Bday { get; set; }
|
|---|
| 50 | public DateTime CreatedAt { get; set; }
|
|---|
| 51 | public UserRole Role { get; set; }
|
|---|
| 52 | }
|
|---|
| 53 |
|
|---|
| 54 | // User role enum
|
|---|
| 55 | public enum UserRole
|
|---|
| 56 | {
|
|---|
| 57 | Admin,
|
|---|
| 58 | Professor,
|
|---|
| 59 | Student
|
|---|
| [5b42c8d] | 60 | }
|
|---|
| [c2f79d7] | 61 | public enum HighSchoolType
|
|---|
| [b38c39c] | 62 | {
|
|---|
| 63 | strucen, gimnazija
|
|---|
| 64 | }
|
|---|
| [3592476] | 65 | public enum Quota
|
|---|
| [b38c39c] | 66 | {
|
|---|
| 67 | drzavna, privatna, stipendija
|
|---|
| 68 | }
|
|---|
| [5b42c8d] | 69 | } |
|---|