// Package usecase implements application business logic. package usecase import ( "context" "go-crm/pkg/domain" ) // LeadService coordinates lead-related business rules. type LeadService struct { Repo domain.LeadRepository } // NewLeadService constructs a LeadService with the given repository. func NewLeadService(repo domain.LeadRepository) *LeadService { return &LeadService{Repo: repo} } // ListAllLeads returns paginated leads for a client. func (s *LeadService) ListAllLeads(ctx context.Context, clientID int64, limit, offset int) ([]domain.Lead, error) { return s.Repo.ListAll(ctx, clientID, limit, offset) } // UpdateLead applies updates to a lead. func (s *LeadService) UpdateLead(ctx context.Context, lead domain.Lead) error { return s.Repo.Update(ctx, lead) }