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

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

Implement refresh token functionality with associated services and repositories

  • Property mode set to 100644
File size: 1.2 KB
Line 
1namespace 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
11 // Registration DTO
12 public class RegisterDto
13 {
14 public string Name { get; set; } = string.Empty;
15 public string Surname { get; set; } = string.Empty;
16 public string? Index { get; set; }
17 public string Email { get; set; } = string.Empty;
18 public string Password { get; set; } = string.Empty;
19 public DateTime Bday { get; set; }
20 public UserRole Role { get; set; }
21 }
22
23 // User response DTO (for returning user data without password)
24 public class UserResponseDto
25 {
26 public int Id { get; set; }
27 public string? Name { get; set; }
28 public string? Surname { get; set; }
29 public string? Index { get; set; }
30 public string? Email { get; set; }
31 public DateTime Bday { get; set; }
32 public DateTime CreatedAt { get; set; }
33 public UserRole Role { get; set; }
34 }
35
36 // User role enum
37 public enum UserRole
38 {
39 Admin,
40 Professor,
41 Student
42 }
43}
Note: See TracBrowser for help on using the repository browser.