feat: Add Register DTOs and SP for public registration (Refs #2)
This commit is contained in:
22
Backend/PruebaGentle.Core/DTOs/RegisterDto.cs
Normal file
22
Backend/PruebaGentle.Core/DTOs/RegisterDto.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace PruebaGentle.Core.DTOs;
|
||||
|
||||
public class RegisterDto
|
||||
{
|
||||
[Required]
|
||||
[StringLength(50, MinimumLength = 3)]
|
||||
public string Username { get; set; } = string.Empty;
|
||||
|
||||
[Required]
|
||||
[StringLength(100, MinimumLength = 6)]
|
||||
public string Password { get; set; } = string.Empty;
|
||||
|
||||
[Required]
|
||||
[EmailAddress]
|
||||
public string Email { get; set; } = string.Empty;
|
||||
|
||||
[Required]
|
||||
[StringLength(100)]
|
||||
public string NombreCompleto { get; set; } = string.Empty;
|
||||
}
|
||||
8
Backend/PruebaGentle.Core/DTOs/RegisterResponseDto.cs
Normal file
8
Backend/PruebaGentle.Core/DTOs/RegisterResponseDto.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
namespace PruebaGentle.Core.DTOs;
|
||||
|
||||
public class RegisterResponseDto
|
||||
{
|
||||
public string Token { get; set; } = string.Empty;
|
||||
public DateTime ExpiresAt { get; set; }
|
||||
public int UserId { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user