staff_assess_cache.go 1.9 KB
package domain

import "time"

type TaskStageCheck int

const (
	TaskStageUncompleted TaskStageCheck = 0 // 里程碑未完成
	TaskStageCompleted   TaskStageCheck = 1 // 里程碑完成
)

// StaffAssessCache 填写评估数据(缓存暂未提交)
type StaffAssessCache struct {
	Id               int64             `json:"id,string" comment:"ID"`
	AssessId         int64             `json:"assessId,string" comment:"评估项ID"`
	AssessContent    []AssessContent   `json:"assessContent" comment:"评估项提交数据"`
	AssessTaskStages []AssessTaskStage `json:"assessTaskStages" comment:"里程碑内容"`
	CreatedAt        time.Time         `json:"createdAt" comment:"创建时间"`
	UpdatedAt        time.Time         `json:"updatedAt" comment:"更新时间"`
	DeletedAt        *time.Time        `json:"deletedAt" comment:"删除时间"`
}

type AssessContent struct {
	Category string       `json:"category"`
	Name     string       `json:"name"`
	Value    string       `json:"value"`
	Remark   []RemarkText `json:"remark"`
}

type RemarkText struct {
	Title      string `json:"title"`
	RemarkText string `json:"remarkText"`
}

type AssessTaskStage struct {
	Category      string         `json:"category"`
	Name          string         `json:"name"`
	TaskRecordId  int            `json:"taskRecordId" comment:"任务记录ID"`
	TaskStageId   int            `json:"taskStageId" comment:"里程碑ID"`
	Check         TaskStageCheck `json:"check" comment:"里程碑完成情况"`
	AssistLevel   int            `json:"assistLevel" comment:"上级辅导情况"`
	AssistContent string         `json:"assistContent" comment:"上级辅导内容"`
}

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