entity

package
v0.3.6 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Page

type Page struct {
	Current int         `json:"current""` //当前页
	Size    int         `json:"size"`     //每页条数
	Total   int64       `json:"total"`    //总条数
	Pages   int64       `json:"pages"`    //总页数
	Records interface{} `json:"records"`  //结果集
}

func (*Page) MakePage

func (p *Page) MakePage(records interface{}, current, size int, total int64) Page

func (*Page) SetPageSize

func (p *Page) SetPageSize(current, size int, total int64)

func (*Page) SetTotal

func (p *Page) SetTotal(total int64)

type QueryWrapper

type QueryWrapper struct {
	Where   string
	Args    []interface{}
	Cols    string
	Orderby string
	Current int
	Size    int
}

func (QueryWrapper) Set

func (this QueryWrapper) Set(db *gorm.DB) *gorm.DB

type R

type R struct {
	Code      int         `json:"code"`
	Timestamp int64       `json:"timestamp"`
	Msg       string      `json:"msg"`
	Data      interface{} `json:"data"`
}

func (*R) Fail

func (r *R) Fail(msg string) R

func (*R) Make

func (r *R) Make(code int, data interface{}, msg string) R

func (*R) Success

func (r *R) Success(data interface{}) R

Jump to

Keyboard shortcuts

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