package dto

import "time"

// CandidateStats represents aggregate stats for candidates.
type CandidateStats struct {
	TotalCandidates    int     `json:"totalCandidates"`
	NewCandidates      int     `json:"newCandidates"`
	ActiveApplications int     `json:"activeApplications"`
	HiringRate         float64 `json:"hiringRate"`
}

// CandidateApplication represents an application entry for the candidate profile.
type CandidateApplication struct {
	ID        string    `json:"id"`
	JobTitle  string    `json:"jobTitle"`
	Company   string    `json:"company"`
	Status    string    `json:"status"`
	AppliedAt time.Time `json:"appliedAt"`
}

// Candidate represents candidate profile data for backoffice.
type Candidate struct {
	ID           string                 `json:"id"`
	Name         string                 `json:"name"`
	Email        *string                `json:"email,omitempty"`
	Phone        *string                `json:"phone,omitempty"`
	Location     *string                `json:"location,omitempty"`
	Title        *string                `json:"title,omitempty"`
	Experience   *string                `json:"experience,omitempty"`
	AvatarURL    *string                `json:"avatarUrl,omitempty"`
	Bio          *string                `json:"bio,omitempty"`
	Skills       []string               `json:"skills"`
	Applications []CandidateApplication `json:"applications"`
	CreatedAt    time.Time              `json:"createdAt"`
}

// CandidateListResponse wraps candidate listing with summary statistics.
type CandidateListResponse struct {
	Stats      CandidateStats `json:"stats"`
	Candidates []Candidate    `json:"candidates"`
}
