employee

package
v0.1.115 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 17, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Employee = employee{
	PermissionType: PermissionType,
	State:          State,
}
View Source
var (
	PermissionType = func(modules co_interface.IModules) *permissionType[co_interface.IModules] {
		result := permissionTypeMap.GetOrSet(modules.GetConfig().KeyIndex, &permissionType[co_interface.IModules]{
			modules:       modules,
			enumMap:       kmap.New[string, PermissionEnum](),
			ViewDetail:    permission.NewInIdentifier("ViewDetail", "详情", "查看员工详情"),
			MoreDetail:    permission.NewInIdentifier("MoreDetail", "更多详情", "查看员工更多详情含手机号等"),
			List:          permission.NewInIdentifier("List", "列表", "查看员工列表"),
			Create:        permission.NewInIdentifier("Create", "新增", "新增员工信息"),
			Update:        permission.NewInIdentifier("Update", "更新", "更新员工信息"),
			Delete:        permission.NewInIdentifier("Delete", "删除", "删除员工信息"),
			SetMobile:     permission.NewInIdentifier("SetMobile", "设置手机号", "修改员工手机号"),
			SetAvatar:     permission.NewInIdentifier("SetAvatar", "设置头像", "设置员工头像"),
			SetState:      permission.NewInIdentifier("SetState", "设置状态", "设置员工任职状态"),
			ViewLicense:   permission.NewInIdentifier("ViewLicense", "查看认证信息", "查看员工认证信息"),
			AuditLicense:  permission.NewInIdentifier("AuditLicense", "审核认证信息", "审核员工认证信息"),
			UpdateLicense: permission.NewInIdentifier("UpdateLicense", "更新认证信息", "更新员工认证信息"),
		})

		for k, v := range gconv.Map(result) {
			result.enumMap.Set(k, v.(PermissionEnum))
		}
		return result
	}
)
View Source
var State = state{
	Canceled:  enum.New[StateEnum](-2, "已注销"),
	Quit:      enum.New[StateEnum](-1, "已离职"),
	WaitAudit: enum.New[StateEnum](0, "待认证"),
	Normal:    enum.New[StateEnum](1, "已入职"),
}

Functions

This section is empty.

Types

type PermissionEnum

type PermissionEnum = *permission.SysPermissionTree

type StateEnum

type StateEnum enum.IEnumCode[int]

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL