43 lines
751 B
Go
43 lines
751 B
Go
package model
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
type Job struct {
|
|
ID int64
|
|
RecruitCount int64
|
|
City string
|
|
JobType int64
|
|
JobArea int64
|
|
JobUnit int64
|
|
CreateTime int64
|
|
UpdateTime int64
|
|
}
|
|
|
|
func (r *Job) Format() map[string]any {
|
|
res := make(map[string]any)
|
|
|
|
return res
|
|
}
|
|
|
|
type JobPage struct {
|
|
Job
|
|
JobTranslations
|
|
}
|
|
|
|
func (r *JobPage) Format() map[string]any {
|
|
res := make(map[string]any)
|
|
res["id"] = r.ID
|
|
res["city"] = r.City
|
|
res["recruit_count"] = r.RecruitCount
|
|
res["create_time"] = time.Unix(r.CreateTime, 0).Format("2006-01-02 15:04:05")
|
|
res["lang"] = r.Lang
|
|
res["title"] = r.Name
|
|
res["description"] = r.Description
|
|
res["requirement"] = r.Requirement
|
|
res["contract_info"] = r.ContractInfo
|
|
|
|
return res
|
|
}
|