permission.go
958 字节
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°综评分数"`
CreatedAt time.Time `json:"createdAt" comment:"创建时间"`
UpdatedAt time.Time `json:"updatedAt" comment:"更新时间"`
DeletedAt *time.Time `json:"deletedAt" 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)
}