summary_evaluation.go 2.2 KB
package domain

import "time"

// 周综合评估
type SummaryEvaluation struct {
	Id                    int
	CompanyId             int                   //公司id
	EvaluationProjectId   int                   //对应的项目id
	EvaluationProjectName string                //对应的项目名称
	CycleId               int64                 //对应的周期id
	CycleName             string                //对应的周期名称
	TargetUser            StaffDesc             //被评估的目标用户,被执行的
	TargetDepartment      []StaffDepartment     //被评估的目标用户所在的部门
	Executor              StaffDesc             //填写评估的用户,执行人
	Types                 EvaluationType        //评估类型
	Status                EvaluationStatus      //评估的填写状态
	CheckResult           EvaluationCheckResult //被执行的人确认评估结果
	BeginTime             time.Time             //开始时间
	EndTime               time.Time             //截止时间
	TotalScore            string                //最终上级评估得分.
	CreatedAt             time.Time             //数据创建时间
	UpdatedAt             time.Time             //数据更新时间
	DeletedAt             *time.Time            //数据删除时间
}

type EvaluationType int //综合评估类型

const (
	EvaluationSelf  EvaluationType = 1 //自评
	Evaluation360   EvaluationType = 2 //360评估
	EvaluationSuper EvaluationType = 3 //上级评估
	EvaluationHrbp  EvaluationType = 4 //人资评估
)

// 评估的填写状态
type EvaluationStatus string

const (
	EvaluationUncompleted EvaluationStatus = "uncompleted" //未提交填写的内容
	EvaluationCompleted   EvaluationStatus = "completed"   //已提交填写的内容
)

// 被执行的人确认评估结果
type EvaluationCheckResult string

const (
	EvaluationCheckUncompleted EvaluationCheckResult = "uncompleted" //未确认结果
	EvaluationCheckCompleted   EvaluationCheckResult = "completed"   //已确认结果
)

type SummaryEvaluationRepository interface {
	Save(param *SummaryEvaluation) error
	Remove(id int) error
	FindOne(queryOptions map[string]interface{}) (*SummaryEvaluation, error)
	Find(queryOptions map[string]interface{}) (int, []*SummaryEvaluation, error)
}