models

package
v0.0.0-...-07ef03e Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2019 License: MIT Imports: 2 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Admin         = []string{"admin"}
	BasicUser     = []string{"user"}
	All           = []string{"admin", "user"}
	PasswordCosts = 12
)

Functions

This section is empty.

Types

type App

type App struct {
	gorm.Model
	AppId              string
	AppSecret          string
	Icon               string
	AppDescription     string
	ForceInputPassword bool
	ForceConfirmation  bool
	DebugMode          bool
	ApplicationDomain  string
	ViewOpenId         bool
	ViewPhoneNumber    bool
	ChangePhoneNumber  bool
	ChangeBasicInfo    bool
	ChangePassword     bool
	ChangeGrantInfo    bool
	CreatorID          uint
}

type User

type User struct {
	gorm.Model
	PhoneNumber string
	Password    string
	NickName    string
	Bio         string
	Role        string
	Avatar      string
}

func (*User) CheckPassword

func (user *User) CheckPassword(password string) bool

func (*User) SetPassword

func (user *User) SetPassword(password string) error

Jump to

Keyboard shortcuts

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