using System.ComponentModel.DataAnnotations; namespace PowderCoating.Application.DTOs.Customer; public class CustomerContactDto { public int Id { get; set; } public int CustomerId { get; set; } public string FirstName { get; set; } = string.Empty; public string? LastName { get; set; } public string? Title { get; set; } public string? ContactRole { get; set; } public string? Email { get; set; } public string? Phone { get; set; } public string? MobilePhone { get; set; } public string? Notes { get; set; } public string DisplayName => string.IsNullOrWhiteSpace(LastName) ? FirstName : $"{FirstName} {LastName}"; } public class CreateCustomerContactDto { [Required(ErrorMessage = "First name is required.")] [StringLength(100)] [Display(Name = "First Name")] public string FirstName { get; set; } = string.Empty; [StringLength(100)] [Display(Name = "Last Name")] public string? LastName { get; set; } [StringLength(100)] [Display(Name = "Job Title")] public string? Title { get; set; } [StringLength(50)] [Display(Name = "Role")] public string? ContactRole { get; set; } [EmailAddress] [StringLength(200)] [Display(Name = "Email")] public string? Email { get; set; } [Phone] [StringLength(20)] [Display(Name = "Phone")] public string? Phone { get; set; } [Phone] [StringLength(20)] [Display(Name = "Mobile Phone")] public string? MobilePhone { get; set; } [StringLength(500)] [Display(Name = "Notes")] public string? Notes { get; set; } } public class UpdateCustomerContactDto : CreateCustomerContactDto { public int Id { get; set; } public int CustomerId { get; set; } }