gormkit

package
v0.0.0-...-8337cb8 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPaginateData

func GetPaginateData(db *gorm.DB, label *PageLabel, m interface{}, result interface{}) (err error)

GetPaginateData 获取分页数据。filter 为分页标签, m 为查询的表的model,result 传递指针获取结果列表

Types

type PageLabel

type PageLabel struct {
	PageNum    int64 `json:"page_num"`
	PageSize   int64 `json:"page_size"`
	TotalPage  int64 `json:"total_page"`
	TotalCount int64 `json:"total_count"`
}

Jump to

Keyboard shortcuts

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