package model type Category struct { ID int64 Pid int64 Name string NameEn string Path string Type string CreateTime int64 UpdateTime int64 } func (r *Category) Format() map[string]any { res := make(map[string]any) res["id"] = r.ID res["pid"] = r.Pid res["name"] = r.Name res["name_en"] = r.NameEn return res } func (r *Category) FormatEn() map[string]any { res := make(map[string]any) res["id"] = r.ID res["pid"] = r.Pid res["name"] = r.NameEn return res } const ( CateTypeProcess = "process" // 历程 CateTypeNews = "news" // 新闻 CateTypeLogic = "logic" // CateTypeFile = "file" // 文件 CateTypeJob = "job" // 工作 CateTypeJobType = "job_type" // 职业类别 CateTypeJobArea = "job_area" // 业务领域 CateTypeJobUnit = "job_unit" //所属板块 ) var CategoryTypes = []string{ CateTypeProcess, CateTypeNews, CateTypeJob, CateTypeLogic, CateTypeFile, CateTypeJobType, CateTypeJobArea, CateTypeJobUnit, } var CateJobTypes = []string{ CateTypeJobType, CateTypeJob, CateTypeJobArea, }