Changeset c7d4a59 for iknow-api/DTOs
- Timestamp:
- 10/22/25 23:34:14 (11 months ago)
- Branches:
- master
- Children:
- 9538edc
- Parents:
- 277bd72
- File:
-
- 1 edited
-
iknow-api/DTOs/UserDTO.cs (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
iknow-api/DTOs/UserDTO.cs
r277bd72 rc7d4a59 1 1 namespace iknow_api.DTOs 2 2 { 3 public class UserDto 3 // Login DTO 4 public class LoginDto 4 5 { 5 public string Username { get; set; } = null!; 6 public string Password { get; set; } = null!; 6 public string Email { get; set; } = string.Empty; 7 public string Password { get; set; } = string.Empty; 8 } 9 10 // Registration DTO 11 public class RegisterDto 12 { 13 public string Name { get; set; } = string.Empty; 14 public string Surname { get; set; } = string.Empty; 15 public string? Index { get; set; } 16 public string Email { get; set; } = string.Empty; 17 public string Password { get; set; } = string.Empty; 18 public DateTime Bday { get; set; } 19 public UserRole Role { get; set; } 20 } 21 22 // User response DTO (for returning user data without password) 23 public class UserResponseDto 24 { 25 public int Id { get; set; } 26 public string? Name { get; set; } 27 public string? Surname { get; set; } 28 public string? Index { get; set; } 29 public string? Email { get; set; } 30 public DateTime Bday { get; set; } 31 public DateTime CreatedAt { get; set; } 32 public UserRole Role { get; set; } 33 } 34 35 // User role enum 36 public enum UserRole 37 { 38 Admin, 39 Professor, 40 Student 7 41 } 8 42 }
Note:
See TracChangeset
for help on using the changeset viewer.
