permission.go
1.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
package domain
import "time"
const (
PermissionOff int = 1 // 权限开关-关闭
PermissionOn int = 2 // 权限开关-开启
)
type Permission struct {
Id int64 `json:"id,string"`
CompanyId int64 `json:"companyId" comment:"公司ID" `
OptHrScore int `json:"optHrScore" comment:"上级是否可以修改人资综评分数"`
OptEvalScore int `json:"optEvalScore" comment:"上级是否可以修改360°综评分数"`
OptConfirmPerf int `json:"optConfirmPerf " comment:"是否需要员工确认绩效"`
CycleDeadLine *CycleDeadline `json:"cycleDeadline" comment:"周期评估各业务截止时间"`
CreatedAt time.Time `json:"createdAt" comment:"创建时间"`
UpdatedAt time.Time `json:"updatedAt" comment:"更新时间"`
DeletedAt *time.Time `json:"deletedAt" comment:"删除时间"`
}
// CycleDeadline 周期评估截止时间
type CycleDeadline struct {
AssessmentSelf DeadlineTime `json:"assessmentSelf" comment:"综合自评"`
AssessmentAll DeadlineTime `json:"assessmentAll" comment:"360评估"`
AssessmentHr DeadlineTime `json:"assessmentHr" comment:"人资评估"`
AssessmentSuperior DeadlineTime `json:"assessmentSuperior" comment:"上级评估"`
ViewMyPerf DeadlineTime `json:"viewMyPerf" comment:"查看我的绩效"`
}
type DeadlineTime struct {
Hour int `json:"hour" comment:"时"`
Minute int `json:"minute" comment:"分"`
}
type PermissionRepository interface {
Insert(permission *Permission) (*Permission, error)
FindOne(queryOptions map[string]interface{}) (*Permission, error)
Find(queryOptions map[string]interface{}) (int64, []*Permission, error)
//FindByCompanyId(companyId int64) (*Permission, error)
}