package db import ( "time" ) type SearchTarget struct { ID int64 `json:"id"` Name string `json:"name"` TargetURL string `json:"target_url"` Platform string `json:"platform"` // 'linkedin', 'google_jobs', 'greenhouse', 'lever' IsActive bool `json:"is_active"` LastCrawledAt *time.Time `json:"last_crawled_at"` } type RawJob struct { ID int64 `json:"id"` CanonicalID string `json:"canonical_id"` // SHA256(company + title + applyURL) TargetID *int64 `json:"target_id"` Title string `json:"title"` Company string `json:"company"` Location string `json:"location"` ApplyURL string `json:"apply_url"` RawContent string `json:"raw_content"` Status string `json:"status"` // 'PENDING', 'PROCESSED', 'FAILED', 'DUPLICATE' CrawledAt time.Time `json:"crawled_at"` } type JobAnalysis struct { ID int64 `json:"id"` RawJobID int64 `json:"raw_job_id"` Score float64 `json:"score"` IsQualified bool `json:"is_qualified"` MatchedHighlights string `json:"matched_highlights"` // JSON array string MissingHighlights string `json:"missing_highlights"` // JSON array string TailoringSuggestions string `json:"tailoring_suggestions"` // JSON array string Status string `json:"status"` // 'PENDING', 'PARSED', 'FILTERED_OUT', 'FAILED' AnalyzedAt *time.Time `json:"analyzed_at"` } type JobApplication struct { ID int64 `json:"id"` RawJobID int64 `json:"raw_job_id"` Status string `json:"status"` // 'SAVED', 'APPLIED', 'INTERVIEW', 'REJECTED', 'OFFER' Notes string `json:"notes"` AppliedAt *time.Time `json:"applied_at"` UpdatedAt time.Time `json:"updated_at"` } // JobWithAnalysis combines RawJob and JobAnalysis for UI rendering type JobWithAnalysis struct { RawJob Analysis *JobAnalysis `json:"analysis"` App *JobApplication `json:"application"` }