// Package opportunities serves the cached SAM.gov Contract Opportunities catalog as the screenMATCH // requirement feed. It reads the GLOBAL sam_opportunities table (public federal data, no tenant // scoping, outside RLS) straight off the pool, the frontend never calls SAM live, so the demo is // fast and survives SAM downtime or quota exhaustion. Writes are owned by the daily sync // (cmd/sam-sync); this module is read-only. package opportunities import "encoding/json" // Opportunity is the normalized, app-facing view of a cached SAM notice (snake_case JSON to match the // other module DTOs). type Opportunity struct { NoticeID string `json:"notice_id"` Title string `json:"title"` SolicitationNumber string `json:"solicitation_number"` Department string `json:"department"` SubAgency string `json:"sub_agency"` FullAgencyPath string `json:"full_agency_path"` NaicsCode string `json:"naics_code"` PscCode string `json:"psc_code"` SetAsideCode string `json:"set_aside_code"` SetAside string `json:"set_aside"` Type string `json:"type"` PostedDate string `json:"posted_date"` // YYYY-MM-DD or "" ResponseDeadline string `json:"response_deadline"` // RFC3339 or "" Active bool `json:"active"` PlaceOfPerformance Place `json:"place_of_performance"` UILink string `json:"ui_link"` DescriptionURL string `json:"description_url"` ResourceLinks json.RawMessage `json:"resource_links"` PointOfContact json.RawMessage `json:"point_of_contact"` Source string `json:"source"` SyncedAt string `json:"synced_at"` // RFC3339; drives the "synced {relative}" badge } // Place is the place of performance. type Place struct { City string `json:"city"` State string `json:"state"` Zip string `json:"zip"` }