achievement.go 3.9 KB
package protocol

//ProviderData 成果提供者
type AchievementProvider struct {
	UserCompanyId  int64   `json:"user_company_id"` //用户的id
	UserName       string  `json:"user_name"`
	DepartmentId   int64   `json:"department_id"` //部门id
	DepartmentName string  `json:"department_name"`
	UserGraspScore float64 `json:"user_grasp_score"` //把握人得分
}

//AchievementChance 成果的机会列表
type AchievementChance struct {
	Id   int64  `json:"id"`
	Code string `json:"code"`
}

//RequestAddAchievement 添加成果
type RequestAddAchievement struct {
	ChanceData     []AchievementChance   `json:"chance_data"`
	TypeIdA        int                   `json:"type_id_a"`        //机会一级分类 chance_type
	TypeIdB        int                   `json:"type_id_b"`        //机会二级分类
	DepartmentId   int64                 `json:"department_id"`    //把握人的部门
	UserCompanyId  int64                 `json:"user_company_id"`  //把握人的id
	GraspScore     float64               `json:"grasp_score"`      //把握分
	UserGraspScore float64               `json:"user_grasp_score"` //把握人总得分
	Provider       []AchievementProvider `json:"provider"`         //机会提供者
	SourceContent  string                `json:"source_content"`   //成果描述文本
	Images         []string              `json:"image"`            //图片
}

//RequestAddAchievement 添加成果
type RequestEditAchievement struct {
	AchievementId  int64                 `json:"achievement_id"`
	ChanceData     []AchievementChance   `json:"chance_data"`
	TypeIdA        int                   `json:"type_id_a"`        //机会一级分类 chance_type
	TypeIdB        int                   `json:"type_id_b"`        //机会二级分类
	DepartmentId   int64                 `json:"department_id"`    //把握人的部门
	UserCompanyId  int64                 `json:"user_company_id"`  //把握人的id
	GraspScore     float64               `json:"grasp_score"`      //把握分
	UserGraspScore float64               `json:"user_grasp_score"` //把握人总得分
	Provider       []AchievementProvider `json:"provider"`         //机会提供者
	SourceContent  string                `json:"source_content"`   //成果描述文本
	Images         []string              `json:"image"`            //图片
}

// ResponseRankSeasonList 赛季列表
type AchievementList struct {
	ResponsePageInfo
	List []AchievementListItem `json:"lists"`
}

//AchievementListItem  成果列表
type AchievementListItem struct {
	Id         int64  `json:"id"`
	CreateTime string `json:"create_time"`
	TypeA      string `json:"type_a"`
	TypeB      string `json:"type_b"`
	GraspScore string `json:"grasp_score"`
	Status     int    `json:"status"`
	UserGrasp  string `json:"user_grasp"`
}

//ResponseAchievementInfo 成果详情
type ResponseAchievementInfo struct {
	AchievementId  int64                 `json:"achievement_id"`
	ChanceData     []AchievementChance   `json:"chance_data"`
	TypeIdA        int                   `json:"type_id_a"` //机会一级分类 chance_type
	TypeNameA      string                `json:"type_name_a"`
	TypeIdB        int                   `json:"type_id_b"` //机会二级分类
	TypeNameB      string                `json:"type_name_b"`
	DepartmentId   int64                 `json:"department_id"` //把握人的部门
	DeparmentName  string                `json:"department_name"`
	UserCompanyId  int64                 `json:"user_company_id"` //把握人的id
	UserName       string                `json:"user_name"`
	GraspScore     float64               `json:"grasp_score"`      //把握分
	UserGraspScore float64               `json:"user_grasp_score"` //把握人总得分
	Provider       []AchievementProvider `json:"provider"`         //机会提供者
	SourceContent  string                `json:"source_content"`   //成果描述文本
	Images         []string              `json:"image"`            //图片
}