Add application workflow and lead analytics
This commit is contained in:
+40
-12
@@ -97,18 +97,46 @@ type ProcessedEmail struct {
|
||||
// postings are usually taken down long before the interview. It is large, so
|
||||
// list queries should not select it.
|
||||
type JobApplication struct {
|
||||
ID uint `gorm:"primarykey" json:"id"`
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
UpdatedAt time.Time `json:"updatedAt"`
|
||||
DeletedAt gorm.DeletedAt `gorm:"index" json:"deletedAt"`
|
||||
JobTitle string `gorm:"not null" json:"jobTitle"`
|
||||
Company string `gorm:"not null" json:"company"`
|
||||
Location *string `json:"location"`
|
||||
URL *string `json:"url"`
|
||||
Status string `gorm:"not null" json:"status"`
|
||||
Notes *string `json:"notes"`
|
||||
AppliedAt *time.Time `json:"appliedAt"`
|
||||
Description *string `gorm:"type:text" json:"description"`
|
||||
ID uint `gorm:"primarykey" json:"id"`
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
UpdatedAt time.Time `json:"updatedAt"`
|
||||
DeletedAt gorm.DeletedAt `gorm:"index" json:"deletedAt"`
|
||||
JobTitle string `gorm:"not null" json:"jobTitle"`
|
||||
Company string `gorm:"not null" json:"company"`
|
||||
Location *string `json:"location"`
|
||||
URL *string `json:"url"`
|
||||
Status string `gorm:"not null" json:"status"`
|
||||
Notes *string `json:"notes"`
|
||||
AppliedAt *time.Time `json:"appliedAt"`
|
||||
Description *string `gorm:"type:text" json:"description"`
|
||||
NextAction *string `json:"nextAction"`
|
||||
NextActionAt *time.Time `json:"nextActionAt"`
|
||||
ContactName *string `json:"contactName"`
|
||||
ContactEmail *string `json:"contactEmail"`
|
||||
ContactRole *string `json:"contactRole"`
|
||||
SalaryRange *string `json:"salaryRange"`
|
||||
WorkArrangement *string `json:"workArrangement"`
|
||||
ApplicationSource *string `json:"applicationSource"`
|
||||
ResumeVersion *string `json:"resumeVersion"`
|
||||
RequisitionID *string `json:"requisitionId"`
|
||||
LastContactedAt *time.Time `json:"lastContactedAt"`
|
||||
Events []*JobApplicationEvent `gorm:"foreignKey:JobApplicationID" json:"events,omitempty"`
|
||||
}
|
||||
|
||||
// JobApplicationEvent is an append-only audit entry for a tracked application.
|
||||
// Contact fields are copied onto the event so a later contact edit does not
|
||||
// rewrite the history of who was involved at the time.
|
||||
type JobApplicationEvent struct {
|
||||
ID uint `gorm:"primarykey" json:"id"`
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
JobApplicationID uint `gorm:"index;not null" json:"jobApplicationId"`
|
||||
Kind string `gorm:"not null;index" json:"kind"`
|
||||
OccurredAt time.Time `gorm:"not null;index" json:"occurredAt"`
|
||||
Note *string `gorm:"type:text" json:"note"`
|
||||
Source string `gorm:"not null;default:manual" json:"source"`
|
||||
ContactName *string `json:"contactName"`
|
||||
ContactEmail *string `json:"contactEmail"`
|
||||
ContactRole *string `json:"contactRole"`
|
||||
}
|
||||
|
||||
// JobSource is one place the lead fetcher (services/job_leads.go) polls for
|
||||
|
||||
Reference in New Issue
Block a user