using System.ComponentModel.DataAnnotations; namespace Backend.Controllers; // Validation attributes must target the primary constructor parameters, not the // generated properties; MVC rejects record types with property-level metadata. public sealed record CreateUserRequest( [Required][EmailAddress] string Email, [Required][StringLength(100, MinimumLength = 1)] string DisplayName); public sealed record UpdateUserRequest( [Required][EmailAddress] string Email, [Required][StringLength(100, MinimumLength = 1)] string DisplayName);