sys_enum_user

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Event = event{
	BeforeCreate:   enum.New[EventEnum](2, "创建前"),
	AfterCreate:    enum.New[EventEnum](4, "创建后"),
	ChangePassword: enum.New[EventEnum](8, "修改密码"),
	ResetPassword:  enum.New[EventEnum](16, "重置密码"),
	ResetEmail:     enum.New[EventEnum](16, "重置邮箱"),
}
View Source
var PermissionType = permissionType{
	ViewDetail:     permission.New(5947175853095365, "ViewDetail", "查看详情", "查看某个用户登录信息"),
	ViewMoreDetail: permission.New(5947175853095366, "ViewMoreDetail", "查看更多详情", "含完整手机号"),
	List:           permission.New(5947176286288325, "List", "用户列表", "查看所有用户"),
	SetState:       permission.New(5947176737372613, "SetState", "设置状态", "设置某个用户的状态"),
	ResetPassword:  permission.New(5947177123969477, "ResetPassword", "重置密码", "重置某个用户的登录密码"),
	ChangePassword: permission.New(5947177469213125, "ChangePassword", "修改密码", "修改自己的登录密码"),
	Create:         permission.New(5949854362632261, "Create", "创建用户", "创建一个新用户"),
	SetUsername:    permission.New(5949854362632262, "Update", "修改用户名称", "修改用户登录账户名称信息"),
	SetUserRole:    permission.New(5949854362632264, "SetUserRole", "设置用户角色", "设置某一个用户的角色"),
	SetPermission:  permission.New(5949854362632265, "SetPermission", "设置用户权限", "设置某一个用户的权限"),
}
View Source
var State = state{
	Unactivated: enum.New[StateEnum](0, "未激活"),
	Normal:      enum.New[StateEnum](1, "正常"),
	Suspended:   enum.New[StateEnum](-1, "封号"),
	Abnormality: enum.New[StateEnum](-2, "异常"),
	Canceled:    enum.New[StateEnum](-3, "已注销"),
}
View Source
var Type = userType{
	Admin:      enum.New[TypeEnum](64, "后台"),
	SuperAdmin: enum.New[TypeEnum](-1, "超级管理员"),
}
View Source
var User = user{
	Event:          Event,
	Type:           Type,
	State:          State,
	PermissionType: PermissionType,
}

Functions

This section is empty.

Types

type EventEnum

type EventEnum enum.IEnumCode[int]

type PermissionTypeEnum

type PermissionTypeEnum = base_permission.IPermission

type StateEnum

type StateEnum enum.IEnumCode[int]

type TypeEnum

type TypeEnum enum.IEnumCode[int]

Jump to

Keyboard shortcuts

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