user

package
v0.0.0-...-cee649a Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2021 License: MIT Imports: 2 Imported by: 1

Documentation

Index

Constants

View Source
const (
	RoleProjectChief   = 1
	RoleApprover       = 2
	RoleApprover2      = 4
	RoleObserver       = 1 << 20
	RoleController     = 1 << 21
	RoleSystemArchiver = 1 << 30
	RoleSystem         = 1 << 31
)
View Source
const (
	RoleStrProjectChief   = "项目长"
	RoleStrApprover       = "审批人"
	RoleStrApprover2      = "云资源运营中心"
	RoleStrObserver       = "观察员"
	RoleStrController     = "调度员"
	RoleStrSystemArchiver = "SystemArchiver"
	RoleStrSystem         = "System"
)
View Source
const (
	StatusNormal  = 1
	StatusDisable = 2
	StatusDelete  = 4
)

Variables

View Source
var SchemaUser = `` /* 374-byte string literal not displayed */

Functions

func CheckDepartmentCode

func CheckDepartmentCode(dc string) bool

func CheckUserName

func CheckUserName(name string) bool

func ToJsonString

func ToJsonString(uis []UserInfo) string

Types

type UserInfo

type UserInfo struct {
	//系统内ID,主键
	UserID int `db:"user_id" json:"user_id"`

	//登录名,含所属单位前缀,唯一
	UserName         string `db:"user_name" json:"user_name"`
	UserCryptoSalt   string `db:"user_crypto_salt" json:"user_crypto_salt"`
	UserCryptoPasswd string `db:"user_crypto_passwd" json:"user_crypto_passwd"`

	ChineseName string `db:"chinese_name" json:"chinese_name"`

	Department     string `db:"department" json:"department"`
	DepartmentCode string `db:"department_code" json:"department_code"`
	Section        string `db:"section" json:"section"`

	Mobile string `db:"mobile" db:"mobile"`

	Role int `db:"role" json:"role"`

	Status int `db:"status" json:"status"`

	Remarks string `db:"remarks" json:"remarks"`
}

func (*UserInfo) ToJsonString

func (ui *UserInfo) ToJsonString() string

Jump to

Keyboard shortcuts

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