db

package
v0.0.0-...-27964f3 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TablePassportName = "passport"

	FieldPassportId              = "id"
	FieldPassportAccount         = "account"
	FieldPassportCode            = "code"
	FieldPassportSalt            = "salt"
	FieldPassportSaltPassword    = "salt_password"
	FieldPassportEmail           = "email"
	FieldPassportPhone           = "phone"
	FieldPassportStatus          = "status"
	FieldPassportCreateTimestamp = "create_timestamp"
	FieldPassportModifyTimestamp = "modify_timestamp"
)

Variables

Functions

func PassportWithDeleteOne

func PassportWithDeleteOne(ctx context.Context, exec mysql.Exec, id string) (int64, error)

func PassportWithInsertOne

func PassportWithInsertOne(ctx context.Context, exec mysql.Exec, passport *Passport) (int64, error)

func PassportWithUpdatePassword

func PassportWithUpdatePassword(ctx context.Context, exec mysql.Exec, salt, saltPassword string, id string) (int64, error)

func PassportWithUpdateStatus

func PassportWithUpdateStatus(ctx context.Context, exec mysql.Exec, status int8, id string) (int64, error)

Types

type Passport

type Passport struct {
	Id              string         `json:"id"`
	Account         string         `json:"account"`
	Code            sql.NullString `json:"code"`
	Salt            string         `json:"salt"`
	SaltPassword    string         `json:"salt_password"`
	Email           sql.NullString `json:"email"`
	Phone           sql.NullString `json:"phone"`
	Status          int32          `json:"status"`
	CreateTimestamp time.Time      `json:"create_timestamp"`
	ModifyTimestamp sql.NullTime   `json:"modify_timestamp"`
}

func PassportWithSelectOneByAccount

func PassportWithSelectOneByAccount(ctx context.Context, exec mysql.Exec, account string) (*Passport, error)

func PassportWithSelectOneById

func PassportWithSelectOneById(ctx context.Context, exec mysql.Exec, id string) (*Passport, error)

func PassportWithSelectRange

func PassportWithSelectRange(ctx context.Context, exec mysql.Exec, offset, limit int64) ([]*Passport, error)

Jump to

Keyboard shortcuts

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