package db import "database/sql" type Profile struct { ID int64 `json:"id"` FirstName string `json:"first_name"` LastName string `json:"last_name"` Email string `json:"email"` Phone string `json:"phone"` Location string `json:"location"` Website string `json:"website"` Summary string `json:"summary"` UpdatedAt string `json:"updated_at"` } type Experience struct { ID int64 `json:"id"` Company string `json:"company"` Title string `json:"title"` StartDate string `json:"start_date"` EndDate string `json:"end_date"` Location string `json:"location"` Description string `json:"description"` SortOrder int `json:"sort_order"` CreatedAt string `json:"created_at"` } type Education struct { ID int64 `json:"id"` Institution string `json:"institution"` Degree string `json:"degree"` FieldOfStudy string `json:"field_of_study"` StartDate string `json:"start_date"` EndDate string `json:"end_date"` Location string `json:"location"` GPA string `json:"gpa"` Description string `json:"description"` SortOrder int `json:"sort_order"` CreatedAt string `json:"created_at"` } type Skill struct { ID int64 `json:"id"` Category string `json:"category"` Name string `json:"name"` Level string `json:"level"` Description string `json:"description"` SortOrder int `json:"sort_order"` CreatedAt string `json:"created_at"` } type WorkSample struct { ID int64 `json:"id"` Title string `json:"title"` Description string `json:"description"` URL string `json:"url"` Content string `json:"content"` CreatedAt string `json:"created_at"` } type CsTemplate struct { ID int64 `json:"id"` Name string `json:"name"` HTMLTemplate string `json:"html_template"` IsActive bool `json:"is_active"` CreatedAt string `json:"created_at"` } // ResumeYAML is the schema for LLM-generated resume content type ResumeYAML struct { Name string `yaml:"name" json:"name"` Email string `yaml:"email" json:"email"` Phone string `yaml:"phone" json:"phone"` Location string `yaml:"location" json:"location"` Website string `yaml:"website" json:"website"` Summary string `yaml:"summary" json:"summary"` Experience []ExpEntry `yaml:"experience" json:"experience"` Education []EduEntry `yaml:"education" json:"education"` Skills []SkillGroup `yaml:"skills" json:"skills"` WorkSamples []WorkSampleEntry `yaml:"work_samples" json:"work_samples"` } type ExpEntry struct { Company string `yaml:"company" json:"company"` Title string `yaml:"title" json:"title"` StartDate string `yaml:"start_date" json:"start_date"` EndDate string `yaml:"end_date" json:"end_date"` Location string `yaml:"location" json:"location"` Bullets []string `yaml:"bullets" json:"bullets"` } type EduEntry struct { Institution string `yaml:"institution" json:"institution"` Degree string `yaml:"degree" json:"degree"` FieldOfStudy string `yaml:"field_of_study" json:"field_of_study"` StartDate string `yaml:"start_date" json:"start_date"` EndDate string `yaml:"end_date" json:"end_date"` Location string `yaml:"location" json:"location"` GPA string `yaml:"gpa" json:"gpa"` } type SkillGroup struct { Category string `yaml:"category" json:"category"` Items []string `yaml:"items" json:"items"` } type WorkSampleEntry struct { Title string `yaml:"title" json:"title"` Description string `yaml:"description" json:"description"` URL string `yaml:"url" json:"url"` } type Application struct { ID int64 `json:"id"` Company string `json:"company"` Position string `json:"position"` JobURL string `json:"job_url"` JobPosting string `json:"job_posting"` Status string `json:"status"` Notes string `json:"notes"` CreatedAt string `json:"created_at"` UpdatedAt string `json:"updated_at"` } type QuestionAnswer struct { ID int64 `json:"id"` ApplicationID int64 `json:"application_id"` Question string `json:"question"` Answer string `json:"answer"` CreatedAt string `json:"created_at"` } type SavedResume struct { ID int64 `json:"id"` ApplicationID int64 `json:"application_id"` YAMLContent string `json:"yaml_content"` CreatedAt string `json:"created_at"` UpdatedAt string `json:"updated_at"` } type ResumeData struct { Profile Profile `json:"profile"` Experiences []Experience `json:"experiences"` Educations []Education `json:"educations"` Skills []Skill `json:"skills"` WorkSamples []WorkSample `json:"work_samples"` } func scanProfile(row *sql.Row) (*Profile, error) { p := &Profile{} err := row.Scan(&p.ID, &p.FirstName, &p.LastName, &p.Email, &p.Phone, &p.Location, &p.Website, &p.Summary, &p.UpdatedAt) return p, err }