rename dtos to requests

This commit is contained in:
Artemy
2025-06-24 21:43:35 +07:00
parent 76094af15b
commit 06cee5caae
5 changed files with 20 additions and 17 deletions
+16
View File
@@ -0,0 +1,16 @@
using System.ComponentModel.DataAnnotations;
using Govor.Core.Infrastructure.Validators;
namespace Govor.Core.Requests;
public class LoginRequest
{
[Required]
[StringLength(UserValidator.MAX_LENGHT_OF_NAME,
MinimumLength = UserValidator.MIN_LENGHT_OF_NAME,
ErrorMessage = "Username must be between 4 and 50 characters.")]
public string Name { get; init; }
[Required]
[MinLength(8)]
public string Password { get; init; }
}
@@ -0,0 +1,19 @@
using System.ComponentModel.DataAnnotations;
using Govor.Core.Infrastructure.Validators;
using Govor.Core.Models;
namespace Govor.Core.Requests;
public record RegistrationRequest
{
[Required]
[StringLength(UserValidator.MAX_LENGHT_OF_NAME,
MinimumLength = UserValidator.MIN_LENGHT_OF_NAME,
ErrorMessage = "Username must be between 4 and 50 characters.")]
public string Name { get; init; }
[Required]
[MinLength(8)]
public string Password { get; init; }
[MinLength(InvitationValidator.MIN_INVITATION_LENGTH)]
public string InviteLink { get; init; }
}