Add initial implementation of API, database, and user management components.

This commit is contained in:
2026-03-15 23:17:51 +01:00
commit 0543120f3b
53 changed files with 2241 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
using System.ComponentModel.DataAnnotations;
namespace MikrocopApi.Dtos;
public sealed class UpdateUserDto
{
[Required]
[StringLength(100, MinimumLength = 3)]
public string UserName { get; set; } = string.Empty;
[Required]
[StringLength(200, MinimumLength = 2)]
public string FullName { get; set; } = string.Empty;
[Required]
[EmailAddress]
[StringLength(200)]
public string Email { get; set; } = string.Empty;
[Required]
[StringLength(30, MinimumLength = 7)]
[RegularExpression(@"^\+?[0-9\- ]+$", ErrorMessage = "Mobile number contains invalid characters.")]
public string MobileNumber { get; set; } = string.Empty;
[Required]
[StringLength(10, MinimumLength = 2)]
[RegularExpression(@"^[a-zA-Z]{2,10}$", ErrorMessage = "Language must contain only letters.")]
public string Language { get; set; } = string.Empty;
[Required]
[StringLength(20, MinimumLength = 2)]
[RegularExpression(@"^[a-zA-Z]{2,10}(-[a-zA-Z]{2,10})?$", ErrorMessage = "Culture format is invalid.")]
public string Culture { get; set; } = string.Empty;
[StringLength(128, MinimumLength = 8)]
public string? Password { get; set; }
}