model

package
v0.0.0-...-3fc60fe Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2019 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 Admin

type Admin struct {
	//如果field名称为Id,而且类型为int64,并没有定义tag,则会被xorm视为主键,并且拥有自增属性
	AdminId    int64     `xorm:"pk autoincr" json:"id"` //主键 自增
	AdminName  string    `xorm:"varchar(32)" json:"admin_name"`
	CreateTime time.Time `xorm:"DateTime" json:"create_time"`
	Status     int64     `xorm:"default 0" json:"status"`
	Avatar     string    `xorm:"varchar(255)" json:"avatar"`
	Pwd        string    `xorm:"varchar(255)" json:"pwd"`      //管理员密码
	CityName   string    `xorm:"varchar(12)" json:"city_name"` //管理员所在城市名称
	CityId     int64     `xorm:"index" json:"city_id"`
}

定义管理员结构体

func (*Admin) AdminToRespDesc

func (this *Admin) AdminToRespDesc() interface{}

*

  • 从Admin数据库实体转换为前端请求的resp的json格式

Jump to

Keyboard shortcuts

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