Documentation ¶
Index ¶
- type Ad
- type AdSort
- type City
- type Config
- type ConfigData
- type Dept
- type Dict
- type DictData
- type Example
- type Example2
- type Item
- type ItemCate
- type Layout
- type LayoutDesc
- type Level
- type Link
- type LocalTime
- func (l *LocalTime) FromDB(b []byte) error
- func (l LocalTime) MarshalJSON() ([]byte, error)
- func (j LocalTime) MarshalText() ([]byte, error)
- func (l LocalTime) Now() LocalTime
- func (l LocalTime) ParseTime(t time.Time) LocalTime
- func (l LocalTime) String() string
- func (l *LocalTime) ToDB() ([]byte, error)
- func (l *LocalTime) UnmarshalJSON(b []byte) error
- func (l *LocalTime) Value() (driver.Value, error)
- type LoginLog
- type Member
- type MemberLevel
- type Menu
- type Notice
- type OperLog
- type Position
- type Role
- type RoleMenu
- type User
- type UserImage
- type UserRole
- type XTime
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Ad ¶
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)"` }
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)"` }
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)"` }
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)"` }
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)"` }
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)"` }
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)"` }
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)"` }
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)"` }
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)"` }
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)"` }
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)"` }
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)"` }
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)"` }
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)"` }
type Link ¶
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)"` }
type LocalTime ¶
func (LocalTime) MarshalJSON ¶
func (LocalTime) MarshalText ¶
func (*LocalTime) UnmarshalJSON ¶
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)"` }
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)"` }
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)
批量删除
type Menu ¶
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)"` }
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)"` }
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)"` }
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)"` }
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)"` }
type RoleMenu ¶
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)"` }
type UserImage ¶ added in v1.0.6
type UserImage struct { Image []byte Model string MId string FileType string Attr string Created time.Time // contains filtered or unexported fields }
func ExportUserImage ¶ added in v1.0.7
type UserRole ¶
type XTime ¶
XTime 1. 创建 time.Time 类型的副本 XTime;
func TimeToXTime ¶
func (XTime) MarshalJSON ¶
MarshalJSON 2. 为 Xtime 重写 MarshaJSON 方法,在此方法中实现自定义格式的转换;
Source Files ¶
- ad.go
- ad_sort.go
- city.go
- config.go
- config_data.go
- dept.go
- dict.go
- dict_data.go
- example.go
- example2.go
- item.go
- item_cate.go
- layout.go
- layout_desc.go
- level.go
- link.go
- localtime.go
- login_log.go
- member.go
- member_level.go
- menu.go
- notice.go
- oper_log.go
- position.go
- role.go
- role_menu.go
- user.go
- user_image.go
- user_role.go
Click to show internal directories.
Click to hide internal directories.