2024-08-12 09:58:27 +01:00
|
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
|
|
|
|
namespace API.Models;
|
|
|
|
|
2024-08-13 12:29:01 +01:00
|
|
|
public class User : BaseModel
|
2024-08-12 09:58:27 +01:00
|
|
|
{
|
|
|
|
public string? Email { get; set; }
|
|
|
|
public string? Username { get; set; }
|
2024-08-13 12:29:01 +01:00
|
|
|
public string HashedPassword { get; set; }
|
2024-08-29 11:16:01 +01:00
|
|
|
public string RefreshToken { get; set; }
|
2024-09-04 13:32:53 +01:00
|
|
|
public string ProfilePicture { get; set; }
|
2024-08-29 11:16:01 +01:00
|
|
|
public DateTime RefreshTokenExpiresAt { get; set; }
|
2024-08-13 12:29:01 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
public class UserDTO
|
|
|
|
{
|
|
|
|
public string Id { get; set; }
|
|
|
|
public string Email { get; set; }
|
|
|
|
public string Username { get; set; }
|
2024-09-09 14:36:32 +01:00
|
|
|
public string ProfilePicture { get; set; }
|
2024-09-04 13:32:53 +01:00
|
|
|
|
2024-08-13 12:29:01 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
public class LoginDTO
|
|
|
|
{
|
|
|
|
public string Email { get; set; }
|
|
|
|
public string Password { get; set; }
|
|
|
|
}
|
|
|
|
|
|
|
|
public class SignUpDTO
|
|
|
|
{
|
|
|
|
public string Email { get; set; }
|
|
|
|
public string Username { get; set; }
|
|
|
|
public string Password { get; set; }
|
2024-08-16 11:53:39 +01:00
|
|
|
}
|
2024-08-13 12:29:01 +01:00
|
|
|
|
2024-08-26 14:49:06 +01:00
|
|
|
public class UpdateUserDTO
|
2024-08-16 11:53:39 +01:00
|
|
|
{
|
|
|
|
public string Id { get; set; }
|
2024-09-05 10:38:47 +01:00
|
|
|
public string? Email { get; set; }
|
|
|
|
public string? Username { get; set; }
|
|
|
|
public string? Password { get; set; }
|
|
|
|
public IFormFile? ProfilePicture { get; set; }
|
2024-09-04 13:32:53 +01:00
|
|
|
|
2024-08-13 12:29:01 +01:00
|
|
|
}
|
2024-08-16 11:53:39 +01:00
|
|
|
|
2024-09-02 12:14:13 +01:00
|
|
|
public class RefreshTokenDTO
|
2024-08-29 12:25:02 +01:00
|
|
|
{
|
|
|
|
public string RefreshToken { get; set; }
|
|
|
|
}
|
|
|
|
|