source: iknow-api/DTOs/UserDTO.cs@ 4e061d8

Last change on this file since 4e061d8 was 4e061d8, 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
RevLine 
[271178d]1namespace iknow_api.DTOs
[fc7b4b4]2{
[cb8e531]3 // Login DTO
4 public class LoginDto
[fc7b4b4]5 {
[cb8e531]6 public string Email { get; set; } = string.Empty;
7 public string Password { get; set; } = string.Empty;
[4e061d8]8 public bool GenerateRefreshToken { get; set; }
[cb8e531]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
[fc7b4b4]42 }
43}
Note: See TracBrowser for help on using the repository browser.