Files
2026-07-06 11:05:50 -04:00

67 lines
1.5 KiB
Go

package intake
import "time"
// Phase represents the current phase of the intake interview
type Phase int
const (
PhaseIdentity Phase = iota
PhaseEducation
PhaseRoles
PhaseCertifications
PhaseSkills
PhaseProjects
PhasePreferences
PhaseVoice
PhaseComplete
)
var phaseNames = map[Phase]string{
PhaseIdentity: "Identity",
PhaseEducation: "Education",
PhaseRoles: "Roles & Experience",
PhaseCertifications: "Certifications",
PhaseSkills: "Skills",
PhaseProjects: "Projects & Publications",
PhasePreferences: "Preferences",
PhaseVoice: "Voice & Communication",
PhaseComplete: "Complete",
}
func (p Phase) String() string {
if name, ok := phaseNames[p]; ok {
return name
}
return "Unknown"
}
// FormAnswer represents user answers for a phase
type FormAnswer struct {
Phase Phase
Fields map[string]string // field name → value
NestedItems []map[string]string // for multi-item phases (education, roles, certs, etc.)
SubmittedAt time.Time
}
// IntakeSession represents the user's ongoing or completed intake
type IntakeSession struct {
ID int64
CurrentPhase Phase
IsComplete bool
Answers []FormAnswer // history of all submitted phases
CreatedAt time.Time
UpdatedAt time.Time
}
// VoiceSample represents an audio sample + transcription
type VoiceSample struct {
ID int64
SourceFile string
Filename string
Content []byte // audio bytes
Transcript string
ProofPoints []string // JSON parsed
CreatedAt time.Time
}