using System.ComponentModel.DataAnnotations; using PowderCoating.Core.Enums; namespace PowderCoating.Application.DTOs.Kiosk; // ── Staff-facing ────────────────────────────────────────────────────────────── /// Input for sending a remote intake link to a customer by email. public class SendRemoteLinkDto { [Required, EmailAddress] public string Email { get; set; } = string.Empty; /// Optional — used to personalise the email greeting. public string? CustomerName { get; set; } } // ── Customer-facing step DTOs ───────────────────────────────────────────────── /// Step 1 — Contact information submitted by the customer. public class SubmitKioskContactDto { [Required, MaxLength(100)] public string FirstName { get; set; } = string.Empty; [Required, MaxLength(100)] public string LastName { get; set; } = string.Empty; [Required, Phone] public string Phone { get; set; } = string.Empty; [Required, EmailAddress] public string Email { get; set; } = string.Empty; public bool IsReturningCustomer { get; set; } } /// Step 2 — Job description submitted by the customer. public class SubmitKioskJobDto { [Required, MaxLength(2000)] public string JobDescription { get; set; } = string.Empty; public string? HowDidYouHearAboutUs { get; set; } } /// Step 3 — Terms agreement (+ optional drawn signature for in-person sessions). public class SubmitKioskTermsDto { [Required] [Range(typeof(bool), "true", "true", ErrorMessage = "You must agree to the terms to continue.")] public bool AgreedToTerms { get; set; } public bool SmsOptIn { get; set; } /// Base-64 PNG from signature_pad; required for InPerson sessions, null for Remote. public string? SignatureDataBase64 { get; set; } } // ── Staff review list ───────────────────────────────────────────────────────── /// One row in the Kiosk Intakes staff review list. public class KioskSessionListDto { public int Id { get; set; } public Guid SessionToken { get; set; } public KioskSessionType SessionType { get; set; } public KioskSessionStatus Status { get; set; } public string CustomerFirstName { get; set; } = string.Empty; public string CustomerLastName { get; set; } = string.Empty; public string CustomerEmail { get; set; } = string.Empty; public string CustomerPhone { get; set; } = string.Empty; public string JobDescription { get; set; } = string.Empty; public bool SmsOptIn { get; set; } public DateTime? SubmittedAt { get; set; } public DateTime ExpiresAt { get; set; } public int? LinkedCustomerId { get; set; } public int? LinkedJobId { get; set; } public int? LinkedQuoteId { get; set; } public string? RemoteLinkEmail { get; set; } public string CustomerFullName => $"{CustomerFirstName} {CustomerLastName}".Trim(); public string JobDescriptionSnippet => JobDescription.Length > 80 ? JobDescription[..80] + "…" : JobDescription; public bool IsConverted => LinkedJobId.HasValue || LinkedQuoteId.HasValue; public bool IsExpired => Status == KioskSessionStatus.Expired || (Status == KioskSessionStatus.Active && DateTime.UtcNow > ExpiresAt); }