Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrDuplicate = errors.New("sql: duplicate key")
var ErrNotFound = sqlx.ErrNotFound
Functions ¶
This section is empty.
Types ¶
type MenuInfo ¶
type MenuInfo struct {
Id int64 `db:"id"` // 编号
ParentID int64 `db:"parentID"` // 父菜单ID,一级菜单为1
Type int64 `db:"type"` // 类型 1:目录 2:菜单 3:按钮
Order int64 `db:"order"` // 左侧table排序序号
Name string `db:"name"` // 菜单名称
Path string `db:"path"` // 系统的path
Component string `db:"component"` // 页面
Icon string `db:"icon"` // 图标
Redirect string `db:"redirect"` // 路由重定向
BackgroundUrl string `db:"backgroundUrl"` // 后台地址
HideInMenu int64 `db:"hideInMenu"` // 是否隐藏菜单 1-是 2-否
CreatedTime time.Time `db:"createdTime"` // 创建时间
UpdatedTime time.Time `db:"updatedTime"` // 更新时间
DeletedTime sql.NullTime `db:"deletedTime"`
}
type MenuInfoModel ¶
type MenuInfoModel interface {
// contains filtered or unexported methods
}
MenuInfoModel is an interface to be customized, add more methods here, and implement the added methods in customMenuInfoModel.
func NewMenuInfoModel ¶
func NewMenuInfoModel(conn sqlx.SqlConn) MenuInfoModel
NewMenuInfoModel returns a model for the database table.
type MenuModel ¶
type RoleInfo ¶
type RoleInfo struct {
Id int64 `db:"id"` // id编号
Name string `db:"name"` // 角色名称
Remark string `db:"remark"` // 备注
CreatedTime time.Time `db:"createdTime"` // 创建时间
UpdatedTime time.Time `db:"updatedTime"` // 更新时间
DeletedTime sql.NullTime `db:"deletedTime"`
Status int64 `db:"status"` // 状态 1:启用,2:禁用
}
type RoleInfoModel ¶
type RoleInfoModel interface {
// contains filtered or unexported methods
}
RoleInfoModel is an interface to be customized, add more methods here, and implement the added methods in customRoleInfoModel.
func NewRoleInfoModel ¶
func NewRoleInfoModel(conn sqlx.SqlConn) RoleInfoModel
NewRoleInfoModel returns a model for the database table.
type RoleMenuModel ¶
type RoleMenuModel interface {
// contains filtered or unexported methods
}
RoleMenuModel is an interface to be customized, add more methods here, and implement the added methods in customRoleMenuModel.
func NewRoleMenuModel ¶
func NewRoleMenuModel(conn sqlx.SqlConn) RoleMenuModel
NewRoleMenuModel returns a model for the database table.
type RoleModel ¶
type UserInfo ¶
type UserInfo struct {
Uid int64 `db:"uid"` // 用户id
UserName sql.NullString `db:"userName"` // 登录用户名
Password string `db:"password"` // 登录密码
Email sql.NullString `db:"email"` // 邮箱
Phone sql.NullString `db:"phone"` // 手机号
Wechat sql.NullString `db:"wechat"` // 微信union id
LastIP string `db:"lastIP"` // 最后登录ip
RegIP string `db:"regIP"` // 注册ip
NickName string `db:"nickName"` // 用户的昵称
Sex int64 `db:"sex"` // 用户的性别,值为1时是男性,值为2时是女性,其他值为未知
City string `db:"city"` // 用户所在城市
Country string `db:"country"` // 用户所在国家
Province string `db:"province"` // 用户所在省份
Language string `db:"language"` // 用户的语言,简体中文为zh_CN
HeadImgUrl string `db:"headImgUrl"` // 用户头像
Role int64 `db:"role"` // 用户角色
CreatedTime time.Time `db:"createdTime"` // 创建时间
UpdatedTime time.Time `db:"updatedTime"` // 更新时间
DeletedTime sql.NullTime `db:"deletedTime"` // 删除时间,默认为空,表示未删除,非空表示已删除
}
type UserInfoModel ¶
type UserInfoModel interface {
// contains filtered or unexported methods
}
UserInfoModel is an interface to be customized, add more methods here, and implement the added methods in customUserInfoModel.
func NewUserInfoModel ¶
func NewUserInfoModel(conn sqlx.SqlConn) UserInfoModel
NewUserInfoModel returns a model for the database table.