40 lines
1.5 KiB
Go
Executable file
40 lines
1.5 KiB
Go
Executable file
package models
|
|
|
|
import "time"
|
|
|
|
// Application represents a job application (from user or guest)
|
|
type Application struct {
|
|
ID int `json:"id" db:"id"`
|
|
JobID int `json:"jobId" db:"job_id"`
|
|
UserID *int `json:"userId,omitempty" db:"user_id"` // NULL for guest applications
|
|
|
|
// Applicant Info (for guest applications)
|
|
Name *string `json:"name,omitempty" db:"name"`
|
|
Phone *string `json:"phone,omitempty" db:"phone"`
|
|
LineID *string `json:"lineId,omitempty" db:"line_id"`
|
|
WhatsApp *string `json:"whatsapp,omitempty" db:"whatsapp"`
|
|
Email *string `json:"email,omitempty" db:"email"`
|
|
|
|
// Application Content
|
|
Message *string `json:"message,omitempty" db:"message"`
|
|
ResumeURL *string `json:"resumeUrl,omitempty" db:"resume_url"`
|
|
Documents JSONMap `json:"documents,omitempty" db:"documents"` // Array of {type, url}
|
|
|
|
// Status & Notes
|
|
Status string `json:"status" db:"status"` // pending, reviewed, shortlisted, rejected, hired
|
|
Notes *string `json:"notes,omitempty" db:"notes"`
|
|
|
|
// Metadata
|
|
CreatedAt time.Time `json:"createdAt" db:"created_at"`
|
|
UpdatedAt time.Time `json:"updatedAt" db:"updated_at"`
|
|
}
|
|
|
|
// ApplicationWithDetails includes job and user information
|
|
type ApplicationWithDetails struct {
|
|
Application
|
|
JobTitle string `json:"jobTitle"`
|
|
CompanyID int `json:"companyId"`
|
|
CompanyName string `json:"companyName"`
|
|
ApplicantName string `json:"applicantName"` // From user or guest name
|
|
ApplicantPhone *string `json:"applicantPhone,omitempty"`
|
|
}
|