// Package domain defines core business entities and interfaces. package domain import "context" // Lead represents a customer lead with service interest, status, and payment info. type Lead struct { LeadID int64 `json:"lead_id"` ClientID int64 `json:"client_id"` Name string `json:"name"` PhoneRaw string `json:"phone_raw"` PhoneNormalized string `json:"phone_normalized"` ServiceInterest string `json:"service_interest"` Status string `json:"status"` NeedsReview bool `json:"needs_review"` AppointmentDate string `json:"appointment_date,omitempty"` AppointmentTime string `json:"appointment_time,omitempty"` PaymentStatus string `json:"payment_status"` PaymentAmount float64 `json:"payment_amount,omitempty"` PaymentDate string `json:"payment_date,omitempty"` CreatedAt int64 `json:"created_at"` LastContactAt int64 `json:"last_contact_at"` } // LeadRepository defines persistence operations for leads. type LeadRepository interface { // ListAll retrieves all leads for a client, with pagination. ListAll(ctx context.Context, clientID int64, limit, offset int) ([]Lead, error) // Update saves changes to an existing lead. Update(ctx context.Context, lead Lead) error }