model

package
v0.0.0-...-2431c21 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FieldUserID              = "id"
	FieldUserUUID            = "uuid"
	FieldUserNickName        = "nick_name"
	FieldUserEmail           = "email"
	FieldUserPhone           = "phone"
	FieldUserCreateTimestamp = "create_timestamp"
	FieldUserModifyTimestamp = "modify_timestamp"
)

Variables

Functions

func UserWithDeleteByUUID

func UserWithDeleteByUUID(exec mysql.Exec, uuid string, timeout time.Duration) (int64, error)

func UserWithInsertOne

func UserWithInsertOne(exec mysql.Exec, user *User, timeout time.Duration) (int64, error)

Types

type User

type User struct {
	ID              int64          `json:"id"`
	UUID            string         `json:"uuid"`
	NickName        sql.NullString `json:"nick_name"`
	Email           string         `json:"email"`
	Phone           string         `json:"phone"`
	CreateTimestamp time.Time      `json:"create_timestamp"`
	ModifyTimestamp sql.NullTime   `json:"modify_timestamp"`
}

func UserWithSelectOneByEmail

func UserWithSelectOneByEmail(exec mysql.Exec, email string, timeout time.Duration) (*User, error)

func UserWithSelectOneByPhone

func UserWithSelectOneByPhone(exec mysql.Exec, phone string, timeout time.Duration) (*User, error)

func UserWithSelectOneByUUID

func UserWithSelectOneByUUID(exec mysql.Exec, uuid string, timeout time.Duration) (*User, error)

func UserWithSelectRange

func UserWithSelectRange(exec mysql.Exec, offset, limit int64, timeout time.Duration) ([]*User, error)

func (*User) String

func (q *User) String() string

Jump to

Keyboard shortcuts

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