model

package
v0.0.0-...-39337ee Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultAvatarUrl = "https://s1.ax1x.com/2022/05/25/XFaDqP.png"

Variables

View Source
var ErrNotFound = sqlx.ErrNotFound

Functions

This section is empty.

Types

type User

type User struct {
	Id         int64          `db:"id"`
	Email      string         `db:"email"`
	Password   string         `db:"password"`
	NickName   string         `db:"nick_name"`
	Gender     int64          `db:"gender"`
	AvatarUrl  sql.NullString `db:"avatar_url"`
	CreateTime time.Time      `db:"create_time"`
}

type UserModel

type UserModel interface {
	// 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) 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