models

package
v2.0.17 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultUser = &User{}
	UserMapping *basis.Mapping
)

Functions

This section is empty.

Types

type User

type User struct {
	Id        int64   `json:"id" field:"id" size:"0" label:""`
	UserName  string  `json:"userName" field:"user_name" size:"64" label:""`
	HeadImg   string  `json:"headImg" field:"head_img" size:"0" label:""`
	CreatedAt uint64  `json:"createdAt" field:"created_at" size:"0" label:""`
	Status    int8    `json:"status" field:"status" size:"0" label:""`
	Amount    float64 `json:"amount" field:"amount" size:"0" label:""`
	Remark    string  `json:"remark" field:"remark" size:"0" label:""`
}

func (*User) Add

func (u *User) Add(ctx context.Context, executor basis.Executor, user User) (lastInsertId int64, err error)

func (*User) Deleter

func (u *User) Deleter() basis.Delete

func (*User) FindByQuery

func (u *User) FindByQuery(ctx context.Context, executor basis.Executor, query basis.Query) ([]User, error)

func (*User) FindOne

func (u *User) FindOne(ctx context.Context, executor basis.Executor, user User) (User, error)

func (*User) FindSome

func (u *User) FindSome(ctx context.Context, executor basis.Executor, idList ...any) ([]User, error)

func (*User) GetDefault

func (u *User) GetDefault(name string) string

func (*User) GetEnums

func (u *User) GetEnums(name string) []string

func (*User) GetLabel

func (u *User) GetLabel(name string) string

func (*User) GetSize

func (u *User) GetSize(name string) int

func (*User) Inserter

func (u *User) Inserter() basis.Insert

func (*User) PrimaryField

func (u *User) PrimaryField() string

func (*User) PrimaryValue

func (u *User) PrimaryValue() any

func (*User) Query

func (u *User) Query() *sqlite.Query

func (*User) TableName

func (u *User) TableName() string

func (*User) Updater

func (u *User) Updater() basis.Update

Jump to

Keyboard shortcuts

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