model

package
v0.0.0-...-fdc4385 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type User

type User struct {
	ID       int    `json:"id" example:"20"`
	Name     string `json:"name" example:"zhangsan"`
	Email    string `json:"email" example:"def@qq.com"`
	Password string `json:"password" example:"secret"`
}

User is data model for user

func (User) Validate

func (u User) Validate() error

Validate check param validation

type UserList

type UserList struct {
	PageIndex  int     `json:"pageIndex"`
	PageSize   int     `json:"pageSize"`
	TotalPages int     `json:"totalPages"`
	Data       []*User `json:"data"`
}

UserList is a list of user info

Jump to

Keyboard shortcuts

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