staff_assess_task.go 1.9 KB
package domain

import "time"

//评估任务重复执行的方式
type AssessTaskRepeatWay string

const (
	AssessTaskRepeatDay         AssessTaskRepeatWay = "day"          //按天重复
	AssessTaskRepeatWeek        AssessTaskRepeatWay = "week"         //按周重复
	AssessTaskRepeatMonth       AssessTaskRepeatWay = "month"        //按月
	AssessTaskRepeatMonthDouble AssessTaskRepeatWay = "month_double" //按双月
	AssessTaskRepeatQuarter     AssessTaskRepeatWay = "quarter"      //按季度
	AssessTaskRepeatYearHalf    AssessTaskRepeatWay = "year_half"    //按半年
	AssessTaskRepeatYear        AssessTaskRepeatWay = "year"         //按年
)

// 执行评估的任务列表
type StaffAssessTask struct {
	Id                    int       `json:"id"`
	CompanyId             int       `json:"companyId"`             //公司id
	EvaluationProjectId   int       `json:"evaluationProjectId"`   //项目id
	EvaluationProjectName string    `json:"evaluationProjectName"` //项目名称
	CycleId               int64     `json:"cycleId"`               //对应的周期id
	CycleName             string    `json:"cycleName"`             //对应周期的名称
	BeginTime             time.Time `json:"beginTime"`             //绩效考核开始时间
	EndTime               time.Time `json:"endTime"`               //绩效考核截止时间
	CreatedAt             time.Time `json:"createdAt"`             //数据创建时间
	UpdatedAt             time.Time `json:"updatedAt"`             //数据更新时间
	DeletedAt             time.Time `json:"deletedAt"`             //数据删除时间
}

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