model

package
v0.0.0-...-04961f1 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2024 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = sqlx.ErrNotFound

Functions

This section is empty.

Types

type User

type User struct {
	Id       uint64    `db:"id"`       // 主键ID
	Username string    `db:"username"` // 用户名
	Avatar   string    `db:"avatar"`   // 头像
	Mobile   string    `db:"mobile"`   // 手机号
	Ctime    time.Time `db:"ctime"`    // 创建时间
	Mtime    time.Time `db:"mtime"`    // 最后修改时间
}

type UserModel

type UserModel interface {
	FindByMobile(ctx context.Context, mobile string) (*User, error)
	// contains filtered or unexported methods
}

UserModel is an interface to be customized, add more methods here, and implement the added methods in customUserModel.

func NewUserModel

func NewUserModel(conn sqlx.SqlConn, c cache.CacheConf, opts ...cache.Option) UserModel

NewUserModel returns a model for the database table.

Jump to

Keyboard shortcuts

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