db

package
v0.5.7 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UploadKindDefault = iota
	UploadKindImage
)

Variables

This section is empty.

Functions

This section is empty.

Types

type UploadData

type UploadData struct {
	Id uint64 `json:"id"`
}

type UploadModel

type UploadModel struct {
	model.DbModel
}

func NewUploadModel

func NewUploadModel() *UploadModel

type UserData

type UserData struct {
	UID      uint64         `json:"uid"`
	Email    sql.NullString `json:"email"`
	Mobile   sql.NullString `json:"mobile"`
	Password string         `json:"password"`
	Avator   string         `json:"avator"`
	CTime    uint64         `json:"ctime"`
	MTime    uint64         `json:"mtime"`
}

type UserModel

type UserModel struct {
	model.DbModel
}

func NewUserModel

func NewUserModel() *UserModel

func (*UserModel) Create

func (mdl *UserModel) Create(data map[string]any) (int64, error)

func (*UserModel) Exists

func (mdl *UserModel) Exists(cond map[string]any) (bool, error)

func (*UserModel) FetchByUid

func (mdl *UserModel) FetchByUid(fields []any, uid uint64) (*UserData, int, error)

func (*UserModel) FetchRow

func (mdl *UserModel) FetchRow(fields []any, cond map[string]any) (*UserData, int, error)

func (*UserModel) UpdateByUid

func (mdl *UserModel) UpdateByUid(uid int64, data map[string]any) (int64, error)

Jump to

Keyboard shortcuts

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