package opportunities // TrackedOppInput creates a tracked opportunity. The intake form's minimum is source_type, title, // agency_name, solicitation_number, response_deadline, prime_or_sub, capture owner, and status; the // intelligence fields below are optional. status defaults to identified so a terse manual entry still // produces a valid row, and a manual opportunity has the same shape as a synced one. type TrackedOppInput struct { SourceType string `json:"source_type"` Title string `json:"title"` AgencyName string `json:"agency_name"` OfficeName string `json:"office_name"` SolicitationNumber string `json:"solicitation_number"` NoticeType string `json:"notice_type"` ResponseDeadline string `json:"response_deadline"` // RFC3339 or YYYY-MM-DD or "" PrimeOrSub string `json:"prime_or_sub"` // "", prime, sub Status string `json:"status"` // defaults to identified CaptureOwnerUserID string `json:"capture_owner_user_id"` // uuid or "" NaicsCode string `json:"naics_code"` PscCode string `json:"psc_code"` SetAsideCode string `json:"set_aside_code"` PlaceOfPerformance string `json:"place_of_performance"` IncumbentName string `json:"incumbent_name"` SourceURL string `json:"source_url"` } // TrackedOppPatch updates a subset of a tracked opportunity. A nil pointer leaves the column unchanged, so // a caller sends only what it means to change. type TrackedOppPatch struct { Title *string `json:"title"` AgencyName *string `json:"agency_name"` OfficeName *string `json:"office_name"` SolicitationNumber *string `json:"solicitation_number"` NoticeType *string `json:"notice_type"` ResponseDeadline *string `json:"response_deadline"` PrimeOrSub *string `json:"prime_or_sub"` Status *string `json:"status"` CaptureOwnerUserID *string `json:"capture_owner_user_id"` NaicsCode *string `json:"naics_code"` PscCode *string `json:"psc_code"` SetAsideCode *string `json:"set_aside_code"` PlaceOfPerformance *string `json:"place_of_performance"` IncumbentName *string `json:"incumbent_name"` SourceURL *string `json:"source_url"` } // TrackedOpportunity is the app facing view of a tenant tracked opportunity. type TrackedOpportunity struct { ID string `json:"id"` SourceType string `json:"source_type"` Title string `json:"title"` AgencyName string `json:"agency_name"` OfficeName string `json:"office_name"` SolicitationNumber string `json:"solicitation_number"` NoticeType string `json:"notice_type"` ResponseDeadline string `json:"response_deadline"` // RFC3339 or "" PrimeOrSub string `json:"prime_or_sub"` Status string `json:"status"` CaptureOwnerUserID string `json:"capture_owner_user_id"` NaicsCode string `json:"naics_code"` PscCode string `json:"psc_code"` SetAsideCode string `json:"set_aside_code"` PlaceOfPerformance string `json:"place_of_performance"` IncumbentName string `json:"incumbent_name"` SourceURL string `json:"source_url"` CreatedAt string `json:"created_at"` UpdatedAt string `json:"updated_at"` }