models

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2024 License: Apache-2.0 Imports: 9 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        string         `db:"id"`
	Avatar    string         `db:"avatar"`
	Nickname  string         `db:"nickname"`
	Phone     string         `db:"phone"`
	Password  sql.NullString `db:"password"`
	Status    sql.NullInt64  `db:"status"`
	Sex       sql.NullInt64  `db:"sex"`
	CreatedAt sql.NullTime   `db:"created_at"`
	UpdatedAt sql.NullTime   `db:"updated_at"`
}

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, 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