feat:完善项目信息
This commit is contained in:
@ -1,5 +1,7 @@
|
||||
package config
|
||||
|
||||
import "SciencesServer/utils"
|
||||
|
||||
// Area 区域
|
||||
type Area struct {
|
||||
Province string `json:"province" form:"province"`
|
||||
@ -19,8 +21,8 @@ type (
|
||||
}
|
||||
// IdentityForExpert 专家附加信息
|
||||
IdentityForExpert struct {
|
||||
ResearchID uint64 `json:"research_id" form:"research_id" binding:"required"` // 科研机构ID
|
||||
LaboratoryID uint64 `json:"laboratory_id" form:"laboratory_id"` // 实验室ID
|
||||
ResearchID string `json:"research_id" form:"research_id" binding:"required"` // 科研机构ID
|
||||
LaboratoryID string `json:"laboratory_id" form:"laboratory_id"` // 实验室ID
|
||||
School string `json:"school" form:"school"` // 毕业院校
|
||||
Major string `json:"major" form:"major"` // 专业
|
||||
Job string `json:"job" form:"job"` // 职务
|
||||
@ -37,7 +39,7 @@ type (
|
||||
}
|
||||
// IdentityForLaboratory 实验室
|
||||
IdentityForLaboratory struct {
|
||||
ResearchID uint64 `json:"research_id" form:"research_id" binding:"required"` // 科研机构ID
|
||||
ResearchID string `json:"research_id" form:"research_id" binding:"required"` // 科研机构ID
|
||||
Url string `json:"url" form:"url"` // 实验室网站
|
||||
Longitude float64 `json:"longitude" form:"longitude"` // 经度
|
||||
Latitude float64 `json:"latitude" form:"latitude"` // 纬度
|
||||
@ -45,7 +47,7 @@ type (
|
||||
}
|
||||
// IdentityForAgent 经纪人
|
||||
IdentityForAgent struct {
|
||||
ResearchID uint64 `json:"research_id" form:"research_id" binding:"required"` // 科研机构ID
|
||||
ResearchID string `json:"research_id" form:"research_id" binding:"required"` // 科研机构ID
|
||||
IDCard string `json:"id_card" form:"id_card" binding:"required"` // 身份证号
|
||||
WorkExperience string `json:"work_experience" form:"work_experience" binding:"required"` // 工作经历
|
||||
WorkPlace string `json:"work_place" form:"work_place" binding:"required"` // 工作地点
|
||||
@ -61,6 +63,34 @@ type (
|
||||
}
|
||||
)
|
||||
|
||||
func (this *IdentityForExpert) ConvertResearch() uint64 {
|
||||
if this.ResearchID == "" {
|
||||
return 0
|
||||
}
|
||||
return uint64(utils.HASHIDDecode(this.ResearchID))
|
||||
}
|
||||
|
||||
func (this *IdentityForExpert) ConvertLaboratory() uint64 {
|
||||
if this.LaboratoryID == "" {
|
||||
return 0
|
||||
}
|
||||
return uint64(utils.HASHIDDecode(this.LaboratoryID))
|
||||
}
|
||||
|
||||
func (this *IdentityForLaboratory) ConvertResearch() uint64 {
|
||||
if this.ResearchID == "" {
|
||||
return 0
|
||||
}
|
||||
return uint64(utils.HASHIDDecode(this.ResearchID))
|
||||
}
|
||||
|
||||
func (this *IdentityForAgent) ConvertResearch() uint64 {
|
||||
if this.ResearchID == "" {
|
||||
return 0
|
||||
}
|
||||
return uint64(utils.HASHIDDecode(this.ResearchID))
|
||||
}
|
||||
|
||||
// TechnologyMaturity 科技成熟度
|
||||
type TechnologyMaturity int
|
||||
|
||||
|
Reference in New Issue
Block a user