Sube carpetas API, API.Tests, Application y Domain del Backend

This commit is contained in:
FrancoRu
2026-09-18 13:35:59 -03:00
parent bbb09554bb
commit 2eb4eeef03
572 changed files with 56405 additions and 0 deletions
@@ -0,0 +1,20 @@
using Application.Utils.Constants.Validation;
using System.ComponentModel.DataAnnotations;
namespace Application.DTOs.User.Request;
/// <summary>
/// Request to change a user's password; self-service changes require CurrentPassword.
/// </summary>
public sealed class ChangePasswordRequest
{
[Required]
[MinLength(UserFieldLengths.PasswordMinLength)]
public string NewPassword { get; set; } = string.Empty;
/// <summary>
/// Required only for self-service password changes.
/// </summary>
public string? CurrentPassword { get; set; }
}
@@ -0,0 +1,6 @@
namespace Application.DTOs.User.Request;
public sealed class SetUserActiveRequest
{
public bool IsActive { get; set; }
}
@@ -0,0 +1,25 @@
using Application.Utils.Constants.Validation;
using Domain.Enums;
using System.ComponentModel.DataAnnotations;
namespace Application.DTOs.User.Request;
public sealed class UpdateUserRequest
{
[StringLength(UserFieldLengths.UsernameMaxLength, MinimumLength = UserFieldLengths.UsernameMinLength)]
public string? Username { get; set; }
[EmailAddress]
public string? Email { get; set; }
[ArgentinePhoneNumber]
[MaxLength(UserFieldLengths.PhoneMaxLength, ErrorMessage = "Phone number must not exceed 15 characters.")]
public string? Phone { get; set; }
/// <summary>
/// When provided, replaces the target user's role; null updates profile fields without touching it.
/// </summary>
public UserRoleType? Role { get; set; }
}
@@ -0,0 +1,13 @@
using Application.DTOs.Abstract.Request;
using Domain.Enums;
namespace Application.DTOs.User.Request;
public class UserFilteredRequest : PaginatedFilterRequest
{
public string? UserName { get; set; }
public string? Email { get; set; }
public UserRoleType? Role { get; set; }
public string? PhoneNumber { get; set; }
}