model

package
v0.0.0-...-12e4130 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = sqlx.ErrNotFound
View Source
var (
	ErrPasswordEmpty = errors.New("password can't empty")
)

Functions

This section is empty.

Types

type NoteUser

type NoteUser struct {
	Id       int64  `db:"id"`
	Name     string `db:"name"`
	Password string `db:"password"`
	Nickname string `db:"nickname"`
	Identity string `db:"identity"`
}

type NoteUserModel

type NoteUserModel interface {
	Insert(data *NoteUser) (sql.Result, error)
	CheckPassword(name, password string) (*NoteUser, error)
	FindOne(id int64) (*NoteUser, error)
	Update(data *NoteUser) error
	Delete(id int64) error
}

func NewNoteUserModel

func NewNoteUserModel(conn sqlx.SqlConn, c cache.CacheConf) NoteUserModel

Jump to

Keyboard shortcuts

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