26 lines
1.0 KiB
C#
26 lines
1.0 KiB
C#
// src/Webshop.Application/DTOs/Customers/UpdateCustomerProfileDto.cs
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
namespace Webshop.Application.DTOs.Customers
|
|
{
|
|
public class UpdateCustomerDto
|
|
{
|
|
[Required(ErrorMessage = "Vorname ist erforderlich.")]
|
|
[StringLength(100)]
|
|
public string FirstName { get; set; } = string.Empty;
|
|
|
|
[Required(ErrorMessage = "Nachname ist erforderlich.")]
|
|
[StringLength(100)]
|
|
public string LastName { get; set; } = string.Empty;
|
|
|
|
[Phone(ErrorMessage = "Ungültiges Telefonnummernformat.")]
|
|
public string? PhoneNumber { get; set; } // Telefonnummer des Benutzers
|
|
|
|
[EmailAddress(ErrorMessage = "Ungültiges E-Mail-Format.")]
|
|
public string? Email { get; set; } // E-Mail des Benutzers
|
|
|
|
// Optional, aber gute Sicherheitspraxis: Aktuelles Passwort zur Bestätigung sensibler Änderungen
|
|
[Required(ErrorMessage = "Aktuelles Passwort ist zur Bestätigung erforderlich.")]
|
|
public string CurrentPassword { get; set; } = string.Empty;
|
|
}
|
|
} |