model

package
v0.0.0-...-bfcc399 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type User

type User struct {
	Id          int32  `map:"username"`
	Username    string `map:"username"`
	Password    string
	Avatar      string    `map:"avatar"`
	RoleID      uint8     `map:"roleID"`
	RecentTime  time.Time `map:"recentTime"`
	CreatedTime time.Time `map:"createdTime"`
	UpdatedTime time.Time `map:"updatedTime"`
}

func (*User) Pwd2Md5

func (u *User) Pwd2Md5(pwd, salt string) (hash string)

md5加密

func (*User) Salt

func (u *User) Salt() (salt string)

加盐

func (*User) VerifyPassword

func (u *User) VerifyPassword(pwd string) bool

验证密码

Jump to

Keyboard shortcuts

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