model

package
v1.1.16 Latest Latest
Warning

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

Go to latest
Published: May 23, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

author gmfan date 2023/6/27

Index

Constants

View Source
const (
	// ASC 升序
	ASC = "asc"
	// DESC 降序
	DESC = "desc"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type FailResp

type FailResp struct {
	Code uint32 `json:"code"`
	Msg  string `json:"msg"`
}

func NewFailResp

func NewFailResp(code uint32, msg string) *FailResp

type Page

type Page struct {
	Num   int64  `json:"num"`
	Size  int64  `json:"size"`
	Sorts []Sort `json:"sorts"`
}

Page 分页模型,推荐 Num 从第一页开始

type PageResult

type PageResult struct {
	Rows  any   `json:"rows"`
	Total int64 `json:"total"`
}

func NewPageResult added in v1.0.10

func NewPageResult(rows any, total int64) *PageResult

type Sort

type Sort struct {
	Condition string `json:"condition"`
	Order     string `json:"order"`
}

type SuccessResp

type SuccessResp struct {
	Code uint32 `json:"code"`
	Msg  string `json:"msg"`
	Data any    `json:"data"`
}

func NewSuccessResp

func NewSuccessResp(code uint32, msg string, data any) *SuccessResp

Jump to

Keyboard shortcuts

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