models

package
v0.0.0-...-c747ff1 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2020 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 User

type User struct {
	Id      int    `json:"id" form:"id" xorm:"pk autoincr"`
	Name    string `json:"name" form:"name" xorm:"name"`
	Address string `json:"address" form:"address" xorm:"address"`
	Age     int    `json:"age" form:"age"`
}

func (*User) UserAdd

func (model *User) UserAdd(db *xorm.Engine) (id int64, err error)

UserAdd create

func (*User) UserDelete

func (model *User) UserDelete(db *xorm.Engine, id int) (afr int64, err error)

UserDelete delete

func (*User) UserGet

func (model *User) UserGet(db *xorm.Engine, id int) (user User, err error)

get one

func (*User) UserGetList

func (model *User) UserGetList(db *xorm.Engine, page int, pageSize int) (users []User, err error)

UserGetList get list

func (*User) UserUpdate

func (model *User) UserUpdate(db *xorm.Engine, id int) (afr int64, err error)

UserUpdate update

Jump to

Keyboard shortcuts

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