model

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2022 License: LGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Ad struct {
	Id          int    `json:"id" xorm:"not null pk autoincr comment('主键ID') INT(10)"`
	Title       string `json:"title" xorm:"not null comment('广告标题') index VARCHAR(100)"`
	AdSortId    int    `json:"adSortId" xorm:"not null default 0 comment('广告位ID') index INT(11)"`
	Cover       string `json:"cover" xorm:"default 'NULL' comment('广告图片') VARCHAR(255)"`
	Type        int    `json:"type" xorm:"not null default 0 comment('广告格式:1图片 2文字 3视频 4推荐') TINYINT(1)"`
	Description string `json:"description" xorm:"default 'NULL' comment('广告描述') VARCHAR(150)"`
	Content     string `json:"content" xorm:"default 'NULL' comment('广告内容') TEXT"`
	Url         string `json:"url" xorm:"default 'NULL' comment('广告链接') TEXT"`
	Width       int    `json:"width" xorm:"not null default 0 comment('广告宽度') INT(10)"`
	Height      int    `json:"height" xorm:"not null default 0 comment('广告高度') INT(10)"`
	StartTime   int64  `json:"startTime" xorm:"default 'NULL' comment('开始时间') DATETIME"`
	EndTime     int64  `json:"endTime" xorm:"default 'NULL' comment('结束时间') DATETIME"`
	ViewNum     int    `json:"viewNum" xorm:"not null default 0 comment('点击率') INT(10)"`
	Status      int    `json:"status" xorm:"not null default 1 comment('状态:1在用 2停用') TINYINT(1)"`
	Sort        int    `json:"sort" xorm:"not null default 125 comment('排序') SMALLINT(5)"`
	Note        string `json:"note" xorm:"default 'NULL' comment('备注') VARCHAR(255)"`
	CreateUser  int    `json:"create_user" xorm:"not null default 0 comment('添加人') INT(10)"`
	CreateTime  int64  `json:"create_time" xorm:"not null comment('添加时间') DATETIME"`
	UpdateUser  int    `json:"update_user" xorm:"default 0 comment('更新人') INT(10)"`
	UpdateTime  int64  `json:"update_time" xorm:"default 'NULL' comment('更新时间') DATETIME"`
	Mark        int    `json:"mark" xorm:"not null default 1 comment('有效标识(1正常 0删除)') TINYINT(1)"`
}

func (*Ad) BatchDelete

func (r *Ad) BatchDelete(ids ...int64) (int64, error)

批量删除

func (*Ad) Delete

func (r *Ad) Delete() (int64, error)

删除

func (*Ad) Get

func (r *Ad) Get() (bool, error)

根据条件查询单条数据

func (*Ad) Insert

func (r *Ad) Insert() (int64, error)

插入数据

func (*Ad) Update

func (r *Ad) Update() (int64, error)

更新数据

type AdSort

type AdSort struct {
	Id          int    `json:"id" xorm:"not null pk autoincr comment('主键ID') INT(10)"`
	Description string `json:"description" xorm:"not null comment('广告位描述') VARCHAR(255)"`
	ItemId      int    `json:"itemId" xorm:"not null default 0 comment('站点ID') INT(10)"`
	CateId      int    `json:"cateId" xorm:"not null default 0 comment('栏目ID') SMALLINT(5)"`
	LocId       int    `json:"locId" xorm:"not null default 0 comment('广告页面位置') SMALLINT(5)"`
	Platform    int    `` /* 133-byte string literal not displayed */
	Sort        int    `json:"sort" xorm:"not null default 125 comment('广告位排序') SMALLINT(5)"`
	CreateUser  int    `json:"create_user" xorm:"default 0 comment('添加人') INT(10)"`
	CreateTime  int64  `json:"create_time" xorm:"default 'NULL' comment('添加时间') DATETIME"`
	UpdateUser  int    `json:"update_user" xorm:"default 0 comment('更新人') INT(10)"`
	UpdateTime  int64  `json:"update_time" xorm:"default 'NULL' comment('更新时间') DATETIME"`
	Mark        int    `json:"mark" xorm:"not null default 1 comment('有效标识(1正常 0删除)') TINYINT(1)"`
}

func (*AdSort) BatchDelete

func (r *AdSort) BatchDelete(ids ...int64) (int64, error)

批量删除

func (*AdSort) Delete

func (r *AdSort) Delete() (int64, error)

删除

func (*AdSort) Get

func (r *AdSort) Get() (bool, error)

根据条件查询单条数据

func (*AdSort) Insert

func (r *AdSort) Insert() (int64, error)

插入数据

func (*AdSort) Update

func (r *AdSort) Update() (int64, error)

更新数据

type City

type City struct {
	Id         int    `json:"id" xorm:"not null pk autoincr comment('编号') INT(11)"`
	Pid        int    `json:"pid" xorm:"not null default 0 comment('父级编号') INT(11)"`
	Level      int    `json:"level" xorm:"not null default 0 comment('城市级别:1省 2市 3区') TINYINT(1)"`
	Name       string `json:"name" xorm:"not null comment('城市名称') index VARCHAR(50)"`
	Citycode   string `json:"citycode" xorm:"not null comment('城市编号(区号)') VARCHAR(10)"`
	PAdcode    string `json:"PAdcode" xorm:"default 'NULL' comment('父级地理编号') VARCHAR(10)"`
	Adcode     string `json:"adcode" xorm:"default 'NULL' comment('地理编号') VARCHAR(10)"`
	Lng        string `` /* 129-byte string literal not displayed */
	Lat        string `json:"lat" xorm:"default 'NULL' comment('城市坐标中心点纬度(* 1e6)') VARCHAR(10)""`
	Sort       int    `json:"sort" xorm:"not null default 125 comment('排序号') TINYINT(3)"`
	CreateUser int    `json:"create_user" xorm:"not null default 0 comment('添加人') INT(11)"`
	CreateTime int64  `json:"create_time" xorm:"default 'NULL' comment('添加时间') DATETIME"`
	UpdateUser int    `json:"update_user" xorm:"not null default 0 comment('更新人') INT(11)"`
	UpdateTime int64  `json:"update_time" xorm:"default 'NULL' comment('更新时间') DATETIME"`
	Mark       int    `json:"mark" xorm:"not null default 1 comment('有效标记') TINYINT(1)"`
}

func (*City) BatchDelete

func (r *City) BatchDelete(ids ...int64) (int64, error)

批量删除

func (*City) Delete

func (r *City) Delete() (int64, error)

删除

func (*City) Get

func (r *City) Get() (bool, error)

根据条件查询单条数据

func (*City) Insert

func (r *City) Insert() (int64, error)

插入数据

func (*City) Update

func (r *City) Update() (int64, error)

更新数据

type Config

type Config struct {
	Id         int    `json:"id" xorm:"not null pk autoincr comment('主键ID') INT(11)"`
	Name       string `json:"name" xorm:"not null comment('分组名称') index VARCHAR(30)"`
	Sort       int    `json:"sort" xorm:"not null comment('排序') TINYINT(2)"`
	CreateUser int    `json:"create_user" xorm:"not null default 0 comment('添加人') INT(11)"`
	CreateTime int64  `json:"create_time" xorm:"default 'NULL' comment('添加时间') DATETIME"`
	UpdateUser int    `json:"update_user" xorm:"not null default 0 comment('更新人') INT(11)"`
	UpdateTime int64  `json:"update_time" xorm:"default 'NULL' comment('更新时间') DATETIME"`
	Mark       int    `json:"mark" xorm:"not null default 1 comment('有效标识') TINYINT(1)"`
}

func (*Config) BatchDelete

func (r *Config) BatchDelete(ids ...int64) (int64, error)

批量删除

func (*Config) Delete

func (r *Config) Delete() (int64, error)

删除

func (*Config) Get

func (r *Config) Get() (bool, error)

根据条件查询单条数据

func (*Config) Insert

func (r *Config) Insert() (int64, error)

插入数据

func (*Config) Update

func (r *Config) Update() (int64, error)

更新数据

type ConfigData

type ConfigData struct {
	Id         int    `json:"id" xorm:"not null pk autoincr comment('主键ID') INT(11)"`
	Title      string `json:"title" xorm:"not null comment('配置标题') index VARCHAR(50)"`
	Code       string `json:"code" xorm:"not null comment('配置编码') index VARCHAR(100)"`
	Value      string `json:"value" xorm:"default 'NULL' comment('配置值') TEXT"`
	Options    string `json:"options" xorm:"default 'NULL' comment('配置项') VARCHAR(255)"`
	ConfigId   int    `json:"configId" xorm:"not null default 0 comment('配置ID') INT(11)"`
	Type       string `json:"type" xorm:"not null comment('配置类型') VARCHAR(16)"`
	Status     int    `json:"status" xorm:"not null default 1 comment('状态:1正常 2停用') TINYINT(1)"`
	Sort       int    `json:"sort" xorm:"not null default 0 comment('排序') SMALLINT(3)"`
	Note       string `json:"note" xorm:"default 'NULL' comment('配置说明') VARCHAR(500)"`
	CreateUser int    `json:"create_user" xorm:"not null default 0 comment('添加人') INT(11)"`
	CreateTime int64  `json:"create_time" xorm:"default 'NULL' comment('添加时间') DATETIME"`
	UpdateUser int    `json:"update_user" xorm:"not null default 0 comment('更新人') INT(11)"`
	UpdateTime int64  `json:"update_time" xorm:"default 'NULL' comment('更新时间') DATETIME"`
	Mark       int    `json:"mark" xorm:"not null default 1 comment('有效标识:1正常 0删除') TINYINT(1)"`
}

func (*ConfigData) BatchDelete

func (r *ConfigData) BatchDelete(ids ...int64) (int64, error)

批量删除

func (*ConfigData) Delete

func (r *ConfigData) Delete() (int64, error)

删除

func (*ConfigData) Get

func (r *ConfigData) Get() (bool, error)

根据条件查询单条数据

func (*ConfigData) Insert

func (r *ConfigData) Insert() (int64, error)

插入数据

func (*ConfigData) Update

func (r *ConfigData) Update() (int64, error)

更新数据

type Dept

type Dept struct {
	Id         int    `json:"id" xorm:"not null pk autoincr comment('主键ID') INT(11)"`
	Name       string `json:"name" xorm:"not null comment('部门名称') index VARCHAR(50)"`
	Code       string `json:"code" xorm:"default 'NULL' comment('部门编码') VARCHAR(150)"`
	Fullname   string `json:"fullname" xorm:"default 'NULL' comment('部门全称') VARCHAR(150)"`
	Type       int    `json:"type" xorm:"not null default 0 comment('类型:1公司 2子公司 3部门 4小组') TINYINT(1)"`
	Pid        int    `json:"pid" xorm:"not null default 0 comment('上级ID') index INT(11)"`
	Sort       int    `json:"sort" xorm:"not null default 125 comment('排序') SMALLINT(5)"`
	Note       string `json:"note" xorm:"default 'NULL' comment('备注说明') VARCHAR(255)"`
	CreateUser int    `json:"create_user" xorm:"not null default 0 comment('添加人') INT(11)"`
	CreateTime int64  `json:"create_time" xorm:"default 'NULL' comment('创建时间') DATETIME"`
	UpdateUser int    `json:"update_user" xorm:"default 0 comment('更新人') INT(11)"`
	UpdateTime int64  `json:"update_time" xorm:"default 'NULL' comment('更新时间') DATETIME"`
	Mark       int    `json:"mark" xorm:"not null default 1 comment('有效标识') TINYINT(1)"`
}

func (*Dept) BatchDelete

func (r *Dept) BatchDelete(ids ...int64) (int64, error)

批量删除

func (*Dept) Delete

func (r *Dept) Delete() (int64, error)

删除

func (*Dept) Get

func (r *Dept) Get() (bool, error)

根据条件查询单条数据

func (*Dept) Insert

func (r *Dept) Insert() (int64, error)

插入数据

func (*Dept) Update

func (r *Dept) Update() (int64, error)

更新数据

type Dict

type Dict struct {
	Id         int    `json:"id" xorm:"not null pk autoincr comment('主键ID') INT(11)"`
	Name       string `json:"name" xorm:"not null comment('字典名称') index VARCHAR(30)"`
	Code       string `json:"code" xorm:"not null comment('字典值') VARCHAR(50)"`
	Sort       int    `json:"sort" xorm:"not null default 125 comment('显示顺序') SMALLINT(5)"`
	Note       string `json:"note" xorm:"default 'NULL' comment('字典备注') VARCHAR(255)"`
	CreateUser int    `json:"create_user" xorm:"default 0 comment('添加人') INT(11)"`
	CreateTime int64  `json:"create_time" xorm:"default 'NULL' comment('添加时间') DATETIME"`
	UpdateUser int    `json:"update_user" xorm:"default 0 comment('更新人') INT(11)"`
	UpdateTime int64  `json:"update_time" xorm:"default 'NULL' comment('更新时间') DATETIME"`
	Mark       int    `json:"mark" xorm:"not null default 1 comment('有效标识') TINYINT(1)"`
}

func (*Dict) BatchDelete

func (r *Dict) BatchDelete(ids ...int64) (int64, error)

批量删除

func (*Dict) Delete

func (r *Dict) Delete() (int64, error)

删除

func (*Dict) Get

func (r *Dict) Get() (bool, error)

根据条件查询单条数据

func (*Dict) Insert

func (r *Dict) Insert() (int64, error)

插入数据

func (*Dict) Update

func (r *Dict) Update() (int64, error)

更新数据

type DictData

type DictData struct {
	Id         int    `json:"id" xorm:"not null pk autoincr comment('主键ID') INT(11)"`
	Name       string `json:"name" xorm:"not null comment('字典项名称') unique VARCHAR(50)"`
	Code       string `json:"code" xorm:"not null comment('字典项值') VARCHAR(50)"`
	DictId     int    `json:"dictId" xorm:"not null default 0 comment('字典类型ID') INT(11)"`
	Status     int    `json:"status" xorm:"not null default 1 comment('状态:1在用 2停用') TINYINT(1)"`
	Note       string `json:"note" xorm:"default 'NULL' comment('备注') VARCHAR(300)"`
	Sort       int    `json:"sort" xorm:"not null default 125 comment('显示顺序') SMALLINT(5)"`
	CreateUser int    `json:"create_user" xorm:"not null default 0 comment('添加人') INT(11)"`
	CreateTime int64  `json:"create_time" xorm:"default 'NULL' comment('添加时间') DATETIME"`
	UpdateUser int    `json:"update_user" xorm:"not null default 0 comment('更新人') INT(11)"`
	UpdateTime int64  `json:"update_time" xorm:"default 'NULL' comment('更新时间') DATETIME"`
	Mark       int    `json:"mark" xorm:"not null default 1 comment('有效标记') TINYINT(1)"`
}

func (*DictData) BatchDelete

func (r *DictData) BatchDelete(ids ...int64) (int64, error)

批量删除

func (*DictData) Delete

func (r *DictData) Delete() (int64, error)

删除

func (*DictData) Get

func (r *DictData) Get() (bool, error)

根据条件查询单条数据

func (*DictData) Insert

func (r *DictData) Insert() (int64, error)

插入数据

func (*DictData) Update

func (r *DictData) Update() (int64, error)

更新数据

type Example

type Example struct {
	Id         int    `json:"id" xorm:"not null pk autoincr comment('唯一性标识') INT(11)"`
	Name       string `json:"name" xorm:"default 'NULL' comment('测试名称') index VARCHAR(30)"`
	Avatar     string `json:"avatar" xorm:"default 'NULL' comment('头像') VARCHAR(255)"`
	Content    string `json:"content" xorm:"default 'NULL' comment('内容') VARCHAR(255)"`
	Status     int    `json:"status" xorm:"default 1 comment('状态:1正常 2停用') TINYINT(1)"`
	Type       int    `json:"type" xorm:"default 1 comment('类型:1京东 2淘宝 3拼多多 4唯品会') INT(11)"`
	IsVip      int    `json:"isVip" xorm:"default 2 comment('是否VIP:1是 2否') TINYINT(1)"`
	Sort       int    `json:"sort" xorm:"default 0 comment('排序号') INT(11)"`
	CreateUser int    `json:"create_user" xorm:"default 0 comment('添加人') INT(11)"`
	CreateTime int64  `json:"create_time" xorm:"default 'NULL' comment('添加时间') DATETIME"`
	UpdateUser int    `json:"update_user" xorm:"default 0 comment('更新人') INT(11)"`
	UpdateTime int64  `json:"update_time" xorm:"default 'NULL' comment('更新时间') DATETIME"`
	Mark       int    `json:"mark" xorm:"default 1 comment('有效标识') TINYINT(1)"`
}

func (*Example) BatchDelete

func (r *Example) BatchDelete(ids ...int64) (int64, error)

批量删除

func (*Example) Delete

func (r *Example) Delete() (int64, error)

删除

func (*Example) Get

func (r *Example) Get() (bool, error)

根据条件查询单条数据

func (*Example) Insert

func (r *Example) Insert() (int64, error)

插入数据

func (*Example) Update

func (r *Example) Update() (int64, error)

更新数据

type Example2

type Example2 struct {
	Id         int    `json:"id" xorm:"not null pk autoincr comment('唯一性标识') INT(11)"`
	Name       string `json:"name" xorm:"default 'NULL' comment('演示名称') index VARCHAR(30)"`
	Status     int    `json:"status" xorm:"default 1 comment('状态:1正常 2停用') TINYINT(1)"`
	Sort       int    `json:"sort" xorm:"default 0 comment('排序号') INT(11)"`
	CreateUser int    `json:"create_user" xorm:"default 0 comment('添加人') INT(11)"`
	CreateTime int64  `json:"create_time" xorm:"default 'NULL' comment('添加时间') DATETIME"`
	UpdateUser int    `json:"update_user" xorm:"default 0 comment('更新人') INT(11)"`
	UpdateTime int64  `json:"update_time" xorm:"default 'NULL' comment('更新时间') DATETIME"`
	Mark       int    `json:"mark" xorm:"default 1 comment('有效标识') TINYINT(1)"`
}

func (*Example2) BatchDelete

func (r *Example2) BatchDelete(ids ...int64) (int64, error)

批量删除

func (*Example2) Delete

func (r *Example2) Delete() (int64, error)

删除

func (*Example2) Get

func (r *Example2) Get() (bool, error)

根据条件查询单条数据

func (*Example2) Insert

func (r *Example2) Insert() (int64, error)

插入数据

func (*Example2) Update

func (r *Example2) Update() (int64, error)

更新数据

type Item

type Item struct {
	Id         int    `json:"id" xorm:"not null pk autoincr comment('唯一性标识') INT(10)"`
	Name       string `json:"name" xorm:"not null comment('站点名称') index VARCHAR(15)"`
	Type       int    `json:"type" xorm:"not null default 1 comment('站点类型:1普通站点 2其他') TINYINT(3)"`
	Url        string `json:"url" xorm:"not null comment('站点地址') VARCHAR(60)"`
	Image      string `json:"image" xorm:"not null comment('站点图片') VARCHAR(100)"`
	Status     int    `json:"status" xorm:"not null default 1 comment('状态:1在用 2停用') TINYINT(1)"`
	Note       string `json:"note" xorm:"not null comment('站点备注') VARCHAR(255)"`
	Sort       int    `json:"sort" xorm:"not null default 125 comment('显示顺序') SMALLINT(5)"`
	CreateUser int    `json:"create_user" xorm:"not null default 0 comment('添加人') INT(10)"`
	CreateTime int64  `json:"create_time" xorm:"not null comment('添加时间') DATETIME"`
	UpdateUser int    `json:"update_user" xorm:"default 0 comment('更新人') INT(10)"`
	UpdateTime int64  `json:"update_time" xorm:"default 'NULL' comment('更新时间') DATETIME"`
	Mark       int    `json:"mark" xorm:"not null default 1 comment('有效标识(1正常 0删除)') TINYINT(1)"`
}

func (*Item) BatchDelete

func (r *Item) BatchDelete(ids ...int64) (int64, error)

批量删除

func (*Item) Delete

func (r *Item) Delete() (int64, error)

删除

func (*Item) Get

func (r *Item) Get() (bool, error)

根据条件查询单条数据

func (*Item) Insert

func (r *Item) Insert() (int64, error)

插入数据

func (*Item) Update

func (r *Item) Update() (int64, error)

更新数据

type ItemCate

type ItemCate struct {
	Id         int    `json:"id" xorm:"not null pk autoincr comment('ID') INT(11)"`
	Name       string `json:"name" xorm:"default 'NULL' comment('栏目名称') VARCHAR(30)"`
	Pid        int    `json:"pid" xorm:"default 0 comment('父级ID') index INT(11)"`
	ItemId     int    `json:"itemId" xorm:"default 0 comment('站点ID') index INT(11)"`
	Pinyin     string `json:"pinyin" xorm:"default 'NULL' comment('拼音(全)') VARCHAR(50)"`
	Code       string `json:"code" xorm:"default 'NULL' comment('拼音(简)') VARCHAR(10)"`
	IsCover    int    `json:"isCover" xorm:"not null comment('是否有封面:1是 2否') TINYINT(1)"`
	Cover      string `json:"cover" xorm:"default 'NULL' comment('封面') VARCHAR(50)"`
	Status     int    `json:"status" xorm:"default 1 comment('状态:1启用 2停用') TINYINT(1)"`
	Note       string `json:"note" xorm:"default 'NULL' comment('备注') VARCHAR(200)"`
	Sort       int    `json:"sort" xorm:"default 125 comment('排序') INT(11)"`
	CreateUser int    `json:"create_user" xorm:"not null default 0 comment('添加人') INT(10)"`
	CreateTime int64  `json:"create_time" xorm:"not null comment('添加时间') DATETIME"`
	UpdateUser int    `json:"update_user" xorm:"default 0 comment('更新人') INT(10)"`
	UpdateTime int64  `json:"update_time" xorm:"default 'NULL' comment('更新时间') DATETIME"`
	Mark       int    `json:"mark" xorm:"not null default 1 comment('有效标识(1正常 0删除)') TINYINT(1)"`
}

func (*ItemCate) BatchDelete

func (r *ItemCate) BatchDelete(ids ...int64) (int64, error)

批量删除

func (*ItemCate) Delete

func (r *ItemCate) Delete() (int64, error)

删除

func (*ItemCate) Get

func (r *ItemCate) Get() (bool, error)

根据条件查询单条数据

func (*ItemCate) Insert

func (r *ItemCate) Insert() (int64, error)

插入数据

func (*ItemCate) Update

func (r *ItemCate) Update() (int64, error)

更新数据

type Layout

type Layout struct {
	Id           int    `json:"id" xorm:"not null pk autoincr comment('主键ID') INT(10)"`
	LayoutDescId int    `json:"layout_desc_id" xorm:"not null default 0 comment('布局描述ID') INT(10)"`
	Type         int    `json:"type" xorm:"not null default 0 comment('类型:1资讯文章') TINYINT(1)"`
	TypeId       int    `json:"type_id" xorm:"not null default 0 comment('对应的类型编号') INT(10)"`
	Image        string `json:"image" xorm:"not null comment('图片路径') VARCHAR(150)"`
	Sort         int    `json:"sort" xorm:"not null default 125 comment('显示顺序') INT(11)"`
	CreateUser   int    `json:"create_user" xorm:"not null default 0 comment('添加人') INT(10)"`
	CreateTime   int64  `json:"create_time" xorm:"default 'NULL' comment('添加时间') DATETIME"`
	UpdateUser   int    `json:"update_user" xorm:"not null default 0 comment('更新人') INT(10)"`
	UpdateTime   int64  `json:"update_time" xorm:"default 'NULL' comment('更新时间') DATETIME"`
	Mark         int    `json:"mark" xorm:"not null default 1 comment('有效标识(1正常 0删除)') TINYINT(1)"`
}

func (*Layout) BatchDelete

func (r *Layout) BatchDelete(ids ...int64) (int64, error)

批量删除

func (*Layout) Delete

func (r *Layout) Delete() (int64, error)

删除

func (*Layout) Get

func (r *Layout) Get() (bool, error)

根据条件查询单条数据

func (*Layout) Insert

func (r *Layout) Insert() (int64, error)

插入数据

func (*Layout) Update

func (r *Layout) Update() (int64, error)

更新数据

type LayoutDesc

type LayoutDesc struct {
	Id         int    `json:"id" xorm:"not null pk autoincr comment('主键ID') INT(10)"`
	LocDesc    string `json:"loc_desc" xorm:"not null comment('页面位置描述') VARCHAR(255)"`
	LocId      int    `json:"loc_id" xorm:"not null default 0 comment('位置编号') INT(11)"`
	ItemId     int    `json:"item_id" xorm:"not null default 0 comment('站点ID') INT(10)"`
	Sort       int    `json:"sort" xorm:"not null default 125 comment('排序号') INT(11)"`
	CreateUser int    `json:"create_user" xorm:"not null default 0 comment('添加人') INT(10)"`
	CreateTime int64  `json:"create_time" xorm:"default 'NULL' comment('添加时间') DATETIME"`
	UpdateUser int    `json:"update_user" xorm:"not null default 0 comment('更新人') INT(10)"`
	UpdateTime int64  `json:"update_time" xorm:"default 'NULL' comment('更新时间') DATETIME"`
	Mark       int    `json:"mark" xorm:"not null default 1 comment('有效标识(1正常 0删除)') TINYINT(1)"`
}

func (*LayoutDesc) BatchDelete

func (r *LayoutDesc) BatchDelete(ids ...int64) (int64, error)

批量删除

func (*LayoutDesc) Delete

func (r *LayoutDesc) Delete() (int64, error)

删除

func (*LayoutDesc) Get

func (r *LayoutDesc) Get() (bool, error)

根据条件查询单条数据

func (*LayoutDesc) Insert

func (r *LayoutDesc) Insert() (int64, error)

插入数据

func (*LayoutDesc) Update

func (r *LayoutDesc) Update() (int64, error)

更新数据

type Level

type Level struct {
	Id         int    `json:"id" xorm:"not null pk autoincr comment('主键ID') INT(11)"`
	Name       string `json:"name" xorm:"not null comment('职级名称') index VARCHAR(30)"`
	Status     int    `json:"status" xorm:"not null default 1 comment('状态:1正常 2停用') TINYINT(1)"`
	Sort       int    `json:"sort" xorm:"not null default 125 comment('显示顺序') INT(11)"`
	CreateUser int    `json:"create_user" xorm:"default 0 comment('添加人') INT(11)"`
	CreateTime int64  `json:"create_time" xorm:"default 0 comment('创建时间') INT(11)"`
	UpdateUser int    `json:"update_user" xorm:"default 0 comment('更新人') INT(11)"`
	UpdateTime int64  `json:"update_time" xorm:"default 0 comment('更新时间') INT(11)"`
	Mark       int    `json:"mark" xorm:"not null default 1 comment('有效标识') TINYINT(1)"`
}

func (*Level) BatchDelete

func (r *Level) BatchDelete(ids ...int64) (int64, error)

批量删除

func (*Level) Delete

func (r *Level) Delete() (int64, error)

删除

func (*Level) Get

func (r *Level) Get() (bool, error)

根据条件查询单条数据

func (*Level) Insert

func (r *Level) Insert() (int64, error)

插入数据

func (*Level) Update

func (r *Level) Update() (int64, error)

更新数据

type Link struct {
	Id         int    `json:"id" xorm:"not null pk autoincr comment('唯一性标识') INT(10)"`
	Name       string `json:"name" xorm:"default 'NULL' comment('友链名称') VARCHAR(50)"`
	Type       int    `json:"type" xorm:"not null default 1 comment('类型:1友情链接 2合作伙伴') TINYINT(1)"`
	Url        string `json:"url" xorm:"default 'NULL' comment('友链地址') VARCHAR(150)"`
	ItemId     int    `json:"itemId" xorm:"not null default 0 comment('站点ID') INT(10)"`
	CateId     int    `json:"cateId" xorm:"not null default 0 comment('栏目ID') INT(10)"`
	Platform   int    `json:"platform" xorm:"not null default 1 comment('平台:1PC站 2WAP站 3微信小程序 4APP应用') TINYINT(1)"`
	Form       int    `json:"form" xorm:"not null default 1 comment('友链形式:1文字链接 2图片链接') TINYINT(1)"`
	Image      string `json:"image" xorm:"default 'NULL' comment('友链图片') VARCHAR(50)"`
	Status     int    `json:"status" xorm:"not null default 1 comment('状态:1在用 2停用') TINYINT(1)"`
	Sort       int    `json:"sort" xorm:"not null default 125 comment('显示顺序') SMALLINT(5)"`
	Note       string `json:"note" xorm:"default 'NULL' comment('备注') VARCHAR(255)"`
	CreateUser int    `json:"create_user" xorm:"default 0 comment('添加人') INT(10)"`
	CreateTime int64  `json:"create_time" xorm:"default 'NULL' comment('添加时间') DATETIME"`
	UpdateUser int    `json:"update_user" xorm:"default 0 comment('更新人') INT(10)"`
	UpdateTime int64  `json:"update_time" xorm:"default 'NULL' comment('更新时间') DATETIME"`
	Mark       int    `json:"mark" xorm:"not null default 1 comment('有效标识(1正常 0删除)') index TINYINT(1)"`
}

func (*Link) BatchDelete

func (r *Link) BatchDelete(ids ...int64) (int64, error)

批量删除

func (*Link) Delete

func (r *Link) Delete() (int64, error)

删除

func (*Link) Get

func (r *Link) Get() (bool, error)

根据条件查询单条数据

func (*Link) Insert

func (r *Link) Insert() (int64, error)

插入数据

func (*Link) Update

func (r *Link) Update() (int64, error)

更新数据

type LocalTime

type LocalTime time.Time

func (*LocalTime) FromDB

func (l *LocalTime) FromDB(b []byte) error

func (LocalTime) MarshalJSON

func (l LocalTime) MarshalJSON() ([]byte, error)

func (LocalTime) MarshalText

func (j LocalTime) MarshalText() ([]byte, error)

func (LocalTime) Now

func (l LocalTime) Now() LocalTime

func (LocalTime) ParseTime

func (l LocalTime) ParseTime(t time.Time) LocalTime

func (LocalTime) String

func (l LocalTime) String() string

func (*LocalTime) ToDB

func (l *LocalTime) ToDB() ([]byte, error)

func (*LocalTime) UnmarshalJSON

func (l *LocalTime) UnmarshalJSON(b []byte) error

func (*LocalTime) Value

func (l *LocalTime) Value() (driver.Value, error)

type LoginLog

type LoginLog struct {
	Id           int64  `json:"id" xorm:"pk autoincr comment('主键ID') BIGINT(20)"`
	Username     string `json:"username" xorm:"default 'NULL' comment('操作账号') VARCHAR(255)"`
	Method       string `json:"method" xorm:"default 'NULL' comment('操作方法') VARCHAR(30)"`
	OperUrl      string `json:"operUrl" xorm:"default 'NULL' comment('请求URL') VARCHAR(255)"`
	OperIp       string `json:"operIp" xorm:"default '''' comment('主机地址') VARCHAR(50)"`
	OperLocation string `json:"operLocation" xorm:"default '''' comment('操作地点') VARCHAR(255)"`
	Os           string `json:"os" xorm:"default 'NULL' comment('操作系统') VARCHAR(255)"`
	RequestParam string `json:"requestParam" xorm:"default '''' comment('请求参数') VARCHAR(2000)"`
	Browser      string `json:"browser" xorm:"default 'NULL' comment('浏览器') VARCHAR(255)"`
	Result       string `json:"result" xorm:"default '''' comment('返回参数') VARCHAR(2000)"`
	Status       int    `json:"status" xorm:"default 1 comment('操作状态:0操作成功 1操作失败') TINYINT(1)"`
	Type         int    `json:"type" xorm:"default 0 comment('操作类型:1登录成功 2登录失败 3注销成功 2注销失败') TINYINT(1)"`
	UserAgent    string `json:"user_agent" xorm:"default 'NULL' comment('代理信息') TEXT"`
	Note         string `json:"note" xorm:"default 'NULL' comment('备注') VARCHAR(2000)"`
	CreateUser   int    `json:"create_user" xorm:"not null default 0 comment('添加人') INT(11)"`
	CreateTime   int64  `json:"create_time" xorm:"default 'NULL' comment('操作时间') DATETIME"`
	UpdateUser   int    `json:"update_user" xorm:"not null default 0 comment('更新人') INT(11)"`
	UpdateTime   int64  `json:"update_time" xorm:"default 'NULL' comment('更新时间') DATETIME"`
	Mark         int    `json:"mark" xorm:"not null default 1 comment('有效标识') TINYINT(1)"`
}

func (*LoginLog) BatchDelete

func (r *LoginLog) BatchDelete(ids ...int64) (int64, error)

批量删除

func (*LoginLog) Delete

func (r *LoginLog) Delete() (int64, error)

删除

func (*LoginLog) Get

func (r *LoginLog) Get() (bool, error)

根据条件查询单条数据

func (*LoginLog) Insert

func (r *LoginLog) Insert() (int64, error)

插入数据

func (*LoginLog) Update

func (r *LoginLog) Update() (int64, error)

更新数据

type Member

type Member struct {
	Id           int    `json:"id" xorm:"not null pk autoincr INT(11)"`
	Openid       string `json:"openid" xorm:"default 'NULL' comment('用户唯一标识') VARCHAR(50)"`
	Username     string `json:"username" xorm:"not null comment('用户名') index unique VARCHAR(30)"`
	Password     string `json:"password" xorm:"default 'NULL' comment('密码') CHAR(32)"`
	MemberLevel  int    `json:"memberLevel" xorm:"not null default 0 comment('会员等级') SMALLINT(3)"`
	Realname     string `json:"realname" xorm:"default 'NULL' comment('真实姓名') VARCHAR(50)"`
	Nickname     string `json:"nickname" xorm:"default 'NULL' comment('用户昵称') VARCHAR(50)"`
	Gender       int    `json:"gender" xorm:"not null default 3 comment('性别(1男 2女 3未知)') TINYINT(1)"`
	Avatar       string `json:"avatar" xorm:"default '''' comment('用户头像') VARCHAR(180)"`
	Birthday     int64  `json:"birthday" xorm:"default 'NULL' comment('出生日期') DATE"`
	ProvinceCode string `json:"province_code" xorm:"default 'NULL' comment('户籍省份编号') VARCHAR(30)"`
	CityCode     string `json:"city_code" xorm:"default 'NULL' comment('户籍城市编号') VARCHAR(30)"`
	DistrictCode string `json:"district_code" xorm:"default 'NULL' comment('户籍区/县编号') VARCHAR(30)"`
	Address      string `json:"address" xorm:"default 'NULL' comment('详细地址') VARCHAR(255)"`
	Intro        string `json:"intro" xorm:"default 'NULL' comment('个人简介') TEXT"`
	Signature    string `json:"signature" xorm:"default 'NULL' comment('个性签名') VARCHAR(30)"`
	Device       int    `json:"device" xorm:"not null default 0 comment('设备类型:1苹果 2安卓 3WAP站 4PC站 5后台添加') TINYINT(1)"`
	DeviceCode   string `json:"device_code" xorm:"default 'NULL' comment('推送的别名') VARCHAR(40)"`
	PushAlias    string `json:"push_alias" xorm:"default '''' comment('推送的别名') VARCHAR(40)"`
	Source       int    `json:"source" xorm:"not null default 1 comment('来源:1、APP注册;2、后台添加;') TINYINT(1)"`
	Status       int    `json:"status" xorm:"not null default 1 comment('是否启用 1、启用  2、停用') TINYINT(1)"`
	AppVersion   string `json:"appVersion" xorm:"default '''' comment('客户端版本号') VARCHAR(30)"`
	Code         string `json:"code" xorm:"default 'NULL' comment('我的推广码') VARCHAR(10)"`
	LoginIp      string `json:"loginIp" xorm:"default 'NULL' comment('最近登录IP') VARCHAR(30)"`
	LoginTime    int64  `json:"loginTime" xorm:"default 'NULL' comment('登录时间') DATETIME"`
	LoginRegion  string `json:"loginRegion" xorm:"default 'NULL' comment('上次登录地点') VARCHAR(20)"`
	LoginCount   int    `json:"loginCount" xorm:"not null default 0 comment('登录总次数') INT(10)"`
	CreateUser   int    `json:"create_user" xorm:"not null default 0 comment('添加人') INT(11)"`
	CreateTime   int64  `json:"create_time" xorm:"default 'NULL' comment('创建时间') DATETIME"`
	UpdateUser   int    `json:"update_user" xorm:"not null default 0 comment('修改人') INT(11)"`
	UpdateTime   int64  `json:"update_time" xorm:"default 'NULL' comment('更新时间') DATETIME"`
	Mark         int    `json:"mark" xorm:"not null default 1 comment('有效标识:1正常 0删除') TINYINT(1)"`
}

func (*Member) BatchDelete

func (r *Member) BatchDelete(ids ...int64) (int64, error)

批量删除

func (*Member) Delete

func (r *Member) Delete() (int64, error)

删除

func (*Member) Get

func (r *Member) Get() (bool, error)

根据条件查询单条数据

func (*Member) Insert

func (r *Member) Insert() (int64, error)

插入数据

func (*Member) Update

func (r *Member) Update() (int64, error)

更新数据

type MemberLevel

type MemberLevel struct {
	Id         int    `json:"id" xorm:"not null pk autoincr comment('主键ID') INT(11)"`
	Name       string `json:"name" xorm:"not null comment('级别名称') index VARCHAR(30)"`
	Sort       int    `json:"sort" xorm:"not null default 125 comment('排序号') INT(11)"`
	CreateUser int    `json:"create_user" xorm:"not null default 0 comment('添加人') INT(11)"`
	CreateTime int64  `json:"create_time" xorm:"default 'NULL' comment('创建时间') DATETIME"`
	UpdateUser int    `json:"update_user" xorm:"not null default 0 comment('更新人') INT(11)"`
	UpdateTime int64  `json:"update_time" xorm:"default 'NULL' comment('更新时间') DATETIME"`
	Mark       int    `json:"mark" xorm:"not null default 1 comment('有效标识') TINYINT(1)"`
}

func (*MemberLevel) BatchDelete

func (r *MemberLevel) BatchDelete(ids ...int64) (int64, error)

批量删除

func (*MemberLevel) Delete

func (r *MemberLevel) Delete() (int64, error)

删除

func (*MemberLevel) Get

func (r *MemberLevel) Get() (bool, error)

根据条件查询单条数据

func (*MemberLevel) Insert

func (r *MemberLevel) Insert() (int64, error)

插入数据

func (*MemberLevel) Update

func (r *MemberLevel) Update() (int64, error)

更新数据

type Menu struct {
	Id         int    `json:"id" xorm:"not null pk autoincr comment('唯一性标识') INT(10)"`
	Name       string `json:"name" xorm:"not null comment('菜单名称') index VARCHAR(30)"`
	Icon       string `json:"icon" xorm:"comment('图标') VARCHAR(50)"`
	Url        string `json:"url" xorm:"comment('URL地址') VARCHAR(150)"`
	Param      string `json:"param" xorm:"comment('参数') VARCHAR(150)"`
	Pid        int    `json:"pid" xorm:"not null default 0 comment('上级ID') index INT(10)"`
	Type       int    `json:"type" xorm:"not null default 0 comment('类型:1模块 2导航 3菜单 4节点') TINYINT(1)"`
	Permission string `json:"permission" xorm:"comment('权限标识') VARCHAR(150)"`
	Status     int    `json:"status" xorm:"not null default 1 comment('是否显示:1显示 2不显示') TINYINT(1)"`
	Target     int    `json:"target" xorm:"not null default 1 comment('打开方式:1内部打开 2外部打开') TINYINT(1)"`
	Note       string `json:"note" xorm:"comment('菜单备注') VARCHAR(255)"`
	Sort       int    `json:"sort" xorm:"default 125 comment('显示顺序') SMALLINT(5)"`
	CreateUser int    `json:"create_user" xorm:"default 0 comment('添加人') INT(11)"`
	CreateTime int64  `json:"create_time" xorm:"default 0 comment('创建时间') INT(11)"`
	UpdateUser int    `json:"update_user" xorm:"default 0 comment('更新人') INT(11)"`
	UpdateTime int64  `json:"update_time" xorm:"default 0 comment('更新时间') INT(11)"`
	Mark       int    `json:"mark" xorm:"not null default 1 comment('有效标识') TINYINT(1)"`
}
func (m *Menu) BatchDelete(ids ...int64) (int64, error)

批量删除

func (m *Menu) Delete() (int64, error)

删除

func (m *Menu) Get() (bool, error)

根据条件查询单条数据

func (m *Menu) Insert() (int64, error)

插入数据

func (m *Menu) Update() (int64, error)

更新数据

type Notice

type Notice struct {
	Id         int    `json:"id" xorm:"not null pk autoincr comment('通知ID') INT(11)"`
	Title      string `json:"title" xorm:"not null comment('通知标题') index VARCHAR(150)"`
	Content    string `json:"content" xorm:"not null comment('通知内容') TEXT"`
	Source     int    `json:"source" xorm:"not null comment('来源:1内部通知 2外部通知') TINYINT(1)"`
	IsTop      int    `json:"isTop" xorm:"not null default 2 comment('是否置顶:1是 2否') TINYINT(1)"`
	Browse     int    `json:"browse" xorm:"not null default 0 comment('阅读量') INT(10)"`
	Status     int    `json:"status" xorm:"not null default 2 comment('状态:1已发布 2待发布') TINYINT(1)"`
	CreateUser int    `json:"create_user" xorm:"not null default 0 comment('添加人') INT(10)"`
	CreateTime int64  `json:"create_time" xorm:"default 'NULL' comment('添加时间') DATETIME"`
	UpdateUser int    `json:"update_user" xorm:"default 0 comment('更新人') INT(10)"`
	UpdateTime int64  `json:"update_time" xorm:"default 'NULL' comment('更新时间') DATETIME"`
	Mark       int    `json:"mark" xorm:"not null default 1 comment('有效标识') TINYINT(1)"`
}

func (*Notice) BatchDelete

func (r *Notice) BatchDelete(ids ...int64) (int64, error)

批量删除

func (*Notice) Delete

func (r *Notice) Delete() (int64, error)

删除

func (*Notice) Get

func (r *Notice) Get() (bool, error)

根据条件查询单条数据

func (*Notice) Insert

func (r *Notice) Insert() (int64, error)

插入数据

func (*Notice) Update

func (r *Notice) Update() (int64, error)

更新数据

type OperLog

type OperLog struct {
	Id           int64  `json:"id" xorm:"pk autoincr comment('主键ID') BIGINT(20)"`
	Model        string `json:"model" xorm:"not null comment('操作模块') VARCHAR(150)"`
	OperType     int    `` /* 172-byte string literal not displayed */
	OperMethod   string `json:"operMethod" xorm:"default 'NULL' comment('操作方法') VARCHAR(30)"`
	Username     string `json:"username" xorm:"default 'NULL' comment('操作账号') VARCHAR(255)"`
	OperName     string `json:"operName" xorm:"default 'NULL' comment('操作用户') VARCHAR(50)"`
	OperUrl      string `json:"operUrl" xorm:"default 'NULL' comment('请求URL') VARCHAR(255)"`
	OperIp       string `json:"operIp" xorm:"default '''' comment('主机地址') VARCHAR(50)"`
	OperLocation string `json:"operLocation" xorm:"default '''' comment('操作地点') VARCHAR(255)"`
	RequestParam string `json:"requestParam" xorm:"default '''' comment('请求参数') VARCHAR(2000)"`
	Result       string `json:"result" xorm:"default '''' comment('返回参数') VARCHAR(2000)"`
	Status       int    `json:"status" xorm:"default 0 comment('日志状态:0正常日志 1错误日志') TINYINT(1)"`
	UserAgent    string `json:"user_agent" xorm:"default 'NULL' comment('代理信息') TEXT"`
	Note         string `json:"note" xorm:"default 'NULL' comment('备注') VARCHAR(2000)"`
	CreateUser   int    `json:"create_user" xorm:"not null default 0 comment('添加人') INT(11)"`
	CreateTime   int64  `json:"create_time" xorm:"default 'NULL' comment('操作时间') DATETIME"`
	UpdateUser   int    `json:"update_user" xorm:"not null default 0 comment('更新人') INT(11)"`
	UpdateTime   int64  `json:"update_time" xorm:"default 'NULL' comment('更新时间') DATETIME"`
	Mark         int    `json:"mark" xorm:"not null default 1 comment('有效标识') TINYINT(1)"`
}

func (*OperLog) BatchDelete

func (r *OperLog) BatchDelete(ids ...int64) (int64, error)

批量删除

func (*OperLog) Delete

func (r *OperLog) Delete() (int64, error)

删除

func (*OperLog) Get

func (r *OperLog) Get() (bool, error)

根据条件查询单条数据

func (*OperLog) Insert

func (r *OperLog) Insert() (int64, error)

插入数据

func (*OperLog) Update

func (r *OperLog) Update() (int64, error)

更新数据

type Position

type Position struct {
	Id         int    `json:"id" xorm:"not null pk autoincr comment('主键ID') INT(11)"`
	Name       string `json:"name" xorm:"default 'NULL' comment('岗位名称') index VARCHAR(30)"`
	Status     int    `json:"status" xorm:"default 1 comment('状态:1正常 2停用') TINYINT(1)"`
	Sort       int    `json:"sort" xorm:"default 125 comment('显示顺序') INT(11)"`
	CreateUser int    `json:"create_user" xorm:"default 0 comment('添加人') INT(11)"`
	CreateTime int64  `json:"create_time" xorm:"default 'NULL' comment('添加时间') DATETIME"`
	UpdateUser int    `json:"update_user" xorm:"default 0 comment('更新人') INT(11)"`
	UpdateTime int64  `json:"update_time" xorm:"default 'NULL' comment('更新时间') DATETIME"`
	Mark       int    `json:"mark" xorm:"default 1 comment('有效标识') TINYINT(1)"`
}

func (*Position) BatchDelete

func (r *Position) BatchDelete(ids ...int64) (int64, error)

批量删除

func (*Position) Delete

func (r *Position) Delete() (int64, error)

删除

func (*Position) Get

func (r *Position) Get() (bool, error)

根据条件查询单条数据

func (*Position) Insert

func (r *Position) Insert() (int64, error)

插入数据

func (*Position) Update

func (r *Position) Update() (int64, error)

更新数据

type Role

type Role struct {
	Id         int    `json:"id" xorm:"not null pk autoincr comment('主键ID') INT(10)"`
	Name       string `json:"name" xorm:"not null comment('角色名称') index VARCHAR(30)"`
	Code       string `json:"code" xorm:"not null comment('角色标签') VARCHAR(100)"`
	Note       string `json:"note" xorm:"default 'NULL' comment('备注') VARCHAR(255)"`
	Sort       int    `json:"sort" xorm:"not null default 125 comment('排序') SMALLINT(5)"`
	Status     int    `json:"status" xorm:"not null default 1 comment('状态:1正常 2停用') TINYINT(1)"`
	CreateUser int    `json:"create_user" xorm:"not null default 0 comment('添加人') INT(10)"`
	CreateTime int64  `json:"create_time" xorm:"default 'NULL' comment('添加时间') DATETIME"`
	UpdateUser int    `json:"update_user" xorm:"default 0 comment('更新人') INT(10)"`
	UpdateTime int64  `json:"update_time" xorm:"default 'NULL' comment('更新时间') DATETIME"`
	Mark       int    `json:"mark" xorm:"not null default 1 comment('有效标识(1正常 0删除)') TINYINT(1)"`
}

func (*Role) BatchDelete

func (r *Role) BatchDelete(ids ...int64) (int64, error)

批量删除

func (*Role) Delete

func (r *Role) Delete() (int64, error)

删除

func (*Role) Get

func (r *Role) Get() (bool, error)

根据条件查询单条数据

func (*Role) Insert

func (r *Role) Insert() (int64, error)

插入数据

func (*Role) Update

func (r *Role) Update() (int64, error)

更新数据

type RoleMenu

type RoleMenu struct {
	RoleId int `json:"role_id" xorm:"not null default 0 comment('角色ID') SMALLINT(5)"`
	MenuId int `json:"menu_id" xorm:"not null default 0 comment('菜单ID') index SMALLINT(5)"`
}

func (*RoleMenu) BatchDelete

func (r *RoleMenu) BatchDelete(ids ...int64) (int64, error)

批量删除

func (*RoleMenu) Get

func (r *RoleMenu) Get() (bool, error)

根据条件查询单条数据

func (*RoleMenu) Insert

func (r *RoleMenu) Insert() (int64, error)

插入数据

type User

type User struct {
	Id           int    `json:"id" xorm:"not null pk autoincr comment('主键ID') INT(11)"`
	Realname     string `json:"realname" xorm:"default 'NULL' comment('真实姓名') index VARCHAR(150)"`
	Nickname     string `json:"nickname" xorm:"default 'NULL' comment('昵称') VARCHAR(150)"`
	Gender       int    `json:"gender" xorm:"default 3 comment('性别:1男 2女 3保密') TINYINT(1)"`
	Avatar       string `json:"avatar" xorm:"default 'NULL' comment('头像') VARCHAR(150)"`
	Mobile       string `json:"mobile" xorm:"default 'NULL' comment('手机号码') CHAR(11)"`
	Email        string `json:"email" xorm:"default 'NULL' comment('邮箱地址') VARCHAR(30)"`
	Birthday     int64  `json:"birthday" xorm:"default 'NULL' comment('出生日期') DATE"`
	DeptId       int    `json:"deptId" xorm:"default 0 comment('部门ID') INT(11)"`
	LevelId      int    `json:"levelId" xorm:"default 0 comment('职级ID') INT(11)"`
	PositionId   int    `json:"positionId" xorm:"default 0 comment('岗位ID') SMALLINT(3)"`
	ProvinceCode string `json:"province_code" xorm:"default 'NULL' comment('省份编号') VARCHAR(50)"`
	CityCode     string `json:"city_code" xorm:"default 'NULL' comment('市区编号') VARCHAR(50)"`
	DistrictCode string `json:"district_code" xorm:"default 'NULL' comment('区县编号') VARCHAR(50)"`
	Address      string `json:"address" xorm:"default 'NULL' comment('详细地址') VARCHAR(255)"`
	CityName     string `json:"city_name" xorm:"default 'NULL' comment('所属城市') VARCHAR(150)"`
	Username     string `json:"username" xorm:"default 'NULL' comment('登录用户名') VARCHAR(50)"`
	Password     string `json:"password" xorm:"default 'NULL' comment('登录密码') VARCHAR(150)"`
	Salt         string `json:"salt" xorm:"default 'NULL' comment('盐加密') VARCHAR(30)"`
	Intro        string `json:"intro" xorm:"default 'NULL' comment('个人简介') VARCHAR(500)"`
	Status       int    `json:"status" xorm:"default 1 comment('状态:1正常 2禁用') TINYINT(1)"`
	Note         string `json:"note" xorm:"default 'NULL' comment('备注') VARCHAR(500)"`
	Sort         int    `json:"sort" xorm:"default 125 comment('排序号') INT(11)"`
	LoginNum     int    `json:"login_num" xorm:"default 0 comment('登录次数') INT(11)"`
	LoginIp      string `json:"login_ip" xorm:"default 'NULL' comment('最近登录IP') VARCHAR(20)"`
	LoginTime    int64  `json:"login_time" xorm:"default 'NULL' comment('最近登录时间') DATETIME"`
	CreateUser   int    `json:"create_user" xorm:"default 0 comment('添加人') INT(10)"`
	CreateTime   int64  `json:"create_time" xorm:"default 'NULL' comment('创建时间') DATETIME"`
	UpdateUser   int    `json:"update_user" xorm:"default 0 comment('更新人') INT(10)"`
	UpdateTime   int64  `json:"update_time" xorm:"default 'NULL' comment('更新时间') DATETIME"`
	Mark         int    `json:"mark" xorm:"not null default 1 comment('有效标识(1正常 0删除)') TINYINT(1)"`
}

func (*User) BatchDelete

func (r *User) BatchDelete(ids ...int64) (int64, error)

批量删除

func (*User) Delete

func (r *User) Delete() (int64, error)

删除

func (*User) Get

func (r *User) Get() (bool, error)

根据条件查询单条数据

func (*User) Insert

func (r *User) Insert() (int64, error)

插入数据

func (*User) Update

func (r *User) Update() (int64, error)

更新数据

type UserRole

type UserRole struct {
	UserId int `json:"user_id" xorm:"not null default 0 comment('人员ID') index INT(10)"`
	RoleId int `json:"role_id" xorm:"not null default 0 comment('角色ID') INT(10)"`
}

func (*UserRole) BatchDelete

func (r *UserRole) BatchDelete(ids ...int64) (int64, error)

批量删除

func (*UserRole) Get

func (r *UserRole) Get() (bool, error)

根据条件查询单条数据

func (*UserRole) Insert

func (r *UserRole) Insert() (int64, error)

插入数据

type XTime

type XTime struct {
	time.Time
}

XTime 1. 创建 time.Time 类型的副本 XTime;

func TimeToXTime

func TimeToXTime(expires string) *XTime

func (XTime) MarshalJSON

func (t XTime) MarshalJSON() ([]byte, error)

MarshalJSON 2. 为 Xtime 重写 MarshaJSON 方法,在此方法中实现自定义格式的转换;

func (*XTime) Scan

func (t *XTime) Scan(v interface{}) error

Scan 4. 为 Xtime 实现 Scan 方法,读取数据库时会调用该方法将时间数据转换成自定义时间类型;

func (XTime) Value

func (t XTime) Value() (driver.Value, error)

Value 3. 为 Xtime 实现 Value 方法,写入数据库时会调用该方法将自定义时间类型转换并写入数据库;

Jump to

Keyboard shortcuts

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