Source identity
| Field | Recorded value |
|---|---|
| Source type | GitHub source |
| Original record | Janady13/missionmatch / internal/modules/recruiting/placement_dto.go |
| Date | Not specified in source |
| Repository | Janady13/missionmatch |
| Revision | 720d47fae476b0d38477ae4401697d372b1ea2bc |
| Branch | feature/opportunity-to-outcome |
| Path or archive member | internal/modules/recruiting/placement_dto.go |
| Original SHA-256 | 4c94dbba1ba64ff05376de9c3105e5d31924f45fdc78b82eb6942acdb7440a4a |
| Git blob SHA | 421ec31e4f686b1acd15246c77af57813ccded22 |
| Reading-copy SHA-256 | 4c94dbba1ba64ff05376de9c3105e5d31924f45fdc78b82eb6942acdb7440a4a |
Recovered source transcript
Download complete source text ↓146 lines · 6.3 KB
package recruiting
import "github.com/shopspring/decimal"
// Interview is one scheduled or completed conversation against an application. Anchored to the
// application rather than the candidate, so a person interviewing for two roles has two interviews and
// neither role's timeline can borrow the other's.
type Interview struct {
ID string `json:"id"`
ApplicationID string `json:"application_id"`
CandidateName string `json:"candidate_name,omitempty"`
Round int `json:"round"`
Kind string `json:"kind"`
ScheduledAt string `json:"scheduled_at,omitempty"`
CompletedAt string `json:"completed_at,omitempty"`
Outcome string `json:"outcome"`
Interviewer string `json:"interviewer,omitempty"`
Notes string `json:"notes,omitempty"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
}
// Offer carries the agreed terms. Money is decimal rendered as a JSON string, never a number, because a
// rate that round tripped through a float64 would not reconcile with an invoice.
type Offer struct {
ID string `json:"id"`
ApplicationID string `json:"application_id"`
CandidateName string `json:"candidate_name,omitempty"`
Status string `json:"status"`
EmploymentType string `json:"employment_type"`
BillRate *decimal.Decimal `json:"bill_rate,omitempty"`
PayRate *decimal.Decimal `json:"pay_rate,omitempty"`
Salary *decimal.Decimal `json:"salary,omitempty"`
FeePct *decimal.Decimal `json:"fee_pct,omitempty"`
Economics Economics `json:"economics"`
ExtendedAt string `json:"extended_at"`
RespondedAt string `json:"responded_at,omitempty"`
ExpiresAt string `json:"expires_at,omitempty"`
DeclineReason string `json:"decline_reason,omitempty"`
// NextStatuses are the moves the database will accept from here, so the interface offers only those.
NextStatuses []string `json:"next_statuses"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
}
// Placement is a started assignment. The revenue bearing record.
type Placement struct {
ID string `json:"id"`
ApplicationID string `json:"application_id"`
OfferID string `json:"offer_id,omitempty"`
CandidateID string `json:"candidate_id,omitempty"`
CandidateName string `json:"candidate_name,omitempty"`
RequisitionID string `json:"requisition_id,omitempty"`
RequisitionTitle string `json:"requisition_title,omitempty"`
ClientName string `json:"client_name,omitempty"`
Status string `json:"status"`
EmploymentType string `json:"employment_type"`
StartDate string `json:"start_date"`
EndDate string `json:"end_date,omitempty"`
BillRate *decimal.Decimal `json:"bill_rate,omitempty"`
PayRate *decimal.Decimal `json:"pay_rate,omitempty"`
Salary *decimal.Decimal `json:"salary,omitempty"`
FeeAmount *decimal.Decimal `json:"fee_amount,omitempty"`
Economics Economics `json:"economics"`
Guarantee Guarantee `json:"guarantee"`
// Live is true while the assignment is pending or running. Exactly the states that require the
// application to sit at stage placed.
Live bool `json:"live"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
}
// Assignment is everything hanging off one application: the interviews, the offers and the placement.
// One read, because a recruiter opening a candidate wants the whole picture rather than three tabs.
type Assignment struct {
ApplicationID string `json:"application_id"`
CandidateName string `json:"candidate_name"`
Stage string `json:"stage"`
StageLabel string `json:"stage_label"`
Interviews []Interview `json:"interviews"`
Offers []Offer `json:"offers"`
Placements []Placement `json:"placements"`
}
type CreateInterviewInput struct {
Round int `json:"round"`
Kind string `json:"kind"`
ScheduledAt string `json:"scheduled_at"`
Interviewer string `json:"interviewer"`
Notes string `json:"notes"`
}
type UpdateInterviewInput struct {
ExpectedUpdatedAt string `json:"expected_updated_at"`
Kind *string `json:"kind,omitempty"`
ScheduledAt *string `json:"scheduled_at,omitempty"`
CompletedAt *string `json:"completed_at,omitempty"`
Outcome *string `json:"outcome,omitempty"`
Interviewer *string `json:"interviewer,omitempty"`
Notes *string `json:"notes,omitempty"`
}
type CreateOfferInput struct {
EmploymentType string `json:"employment_type"`
BillRate string `json:"bill_rate"`
PayRate string `json:"pay_rate"`
Salary string `json:"salary"`
FeePct string `json:"fee_pct"`
ExpiresAt string `json:"expires_at"`
}
type OfferStatusInput struct {
ExpectedStatus string `json:"expected_status"`
Status string `json:"status"`
DeclineReason string `json:"decline_reason"`
}
// CreatePlacementInput starts an assignment. Creating it moves the application to stage placed in the
// same transaction, because a live placement and that stage are the same fact.
type CreatePlacementInput struct {
OfferID string `json:"offer_id"`
EmploymentType string `json:"employment_type"`
StartDate string `json:"start_date"`
BillRate string `json:"bill_rate"`
PayRate string `json:"pay_rate"`
Salary string `json:"salary"`
FeeAmount string `json:"fee_amount"`
GuaranteeDays *int `json:"guarantee_days"`
}
// EndPlacementInput closes an assignment. The disposition is applied to the application at the same
// time, because an assignment ending and a candidate leaving the pipeline are one event.
type EndPlacementInput struct {
Status string `json:"status"`
EndDate string `json:"end_date"`
DispositionCode string `json:"disposition_code"`
Reason string `json:"reason"`
}
type PlacementList struct {
Placements []Placement `json:"placements"`
Limit int `json:"limit"`
Offset int `json:"offset"`
Total int `json:"total"`
}