Documentation
¶
Index ¶
- func DataScopes(tableName string, userID int) func(db *gorm.DB) *gorm.DB
- func GetColumnsDB(db *gorm.DB) *gorm.DB
- func GetConfigDB(db *gorm.DB) *gorm.DB
- func GetDeptDB(db *gorm.DB) *gorm.DB
- func GetDictDataDB(db *gorm.DB) *gorm.DB
- func GetDictTypeDB(db *gorm.DB) *gorm.DB
- func GetFileDirDB(db *gorm.DB) *gorm.DB
- func GetFileInfoDB(db *gorm.DB) *gorm.DB
- func GetLoginLogDB(db *gorm.DB) *gorm.DB
- func GetMenuDB(db *gorm.DB) *gorm.DB
- func GetOperLogDB(db *gorm.DB) *gorm.DB
- func GetPostDB(db *gorm.DB) *gorm.DB
- func GetRoleDB(db *gorm.DB) *gorm.DB
- func GetRoleDeptDB(db *gorm.DB) *gorm.DB
- func GetRoleMenuDB(db *gorm.DB) *gorm.DB
- func GetSettingDB(db *gorm.DB) *gorm.DB
- func GetTablesDB(db *gorm.DB) *gorm.DB
- func GetUserDB(db *gorm.DB) *gorm.DB
- type Columns
- type Config
- func (m *Config) BatchDelete(db *gorm.DB, ids []int) error
- func (m *Config) Create(db *gorm.DB, item Config) error
- func (m *Config) Delete(db *gorm.DB, id int) error
- func (m *Config) Exists(db *gorm.DB, item Config) (bool, error)
- func (m *Config) Get(db *gorm.DB) (*Config, error)
- func (m *Config) Query(db *gorm.DB, params param.ConfigParam) (*pagination.Result, error)
- func (m *Config) Update(db *gorm.DB, item Config) error
- type DBColumns
- type DBTables
- type DataPermission
- type Dept
- func (m *Dept) Create(db *gorm.DB, item *Dept) error
- func (m *Dept) Delete(db *gorm.DB, id int) error
- func (m *Dept) Exists(db *gorm.DB, item Dept) (bool, error)
- func (m *Dept) Get(db *gorm.DB) (*Dept, error)
- func (m *Dept) Query(db *gorm.DB, params param.DeptParam) (*pagination.Result, error)
- func (m *Dept) Update(db *gorm.DB, item Dept) error
- type DeptID
- type DeptIDList
- type DeptLabel
- type DictData
- func (m *DictData) BatchDelete(db *gorm.DB, dictCodes []int) error
- func (m *DictData) Create(db *gorm.DB, item DictData) error
- func (m *DictData) Delete(db *gorm.DB, dictCode int) error
- func (m *DictData) Exists(db *gorm.DB, item DictData) (bool, error)
- func (m *DictData) Get(db *gorm.DB) (*DictData, error)
- func (m *DictData) Query(db *gorm.DB, params param.DictDataParam) (*pagination.Result, error)
- func (m *DictData) Update(db *gorm.DB, item DictData) error
- type DictType
- func (m *DictType) BatchDelete(db *gorm.DB, dictIDs []int) error
- func (m *DictType) Create(db *gorm.DB, item DictType) error
- func (m *DictType) Delete(db *gorm.DB, dictID int) error
- func (m *DictType) Exists(db *gorm.DB, item DictType) (bool, error)
- func (m *DictType) Get(db *gorm.DB) (*DictType, error)
- func (m *DictType) Query(db *gorm.DB, params param.DictTypeParam) (*pagination.Result, error)
- func (m *DictType) Update(db *gorm.DB, item DictType) error
- type FileDir
- func (m *FileDir) BatchDelete(db *gorm.DB, ids []int) error
- func (m *FileDir) Create(db *gorm.DB, item *FileDir) error
- func (m *FileDir) Delete(db *gorm.DB, id int) error
- func (m *FileDir) Get(db *gorm.DB) (*FileDir, error)
- func (m *FileDir) Query(db *gorm.DB, params param.FileDirParam) (*pagination.Result, error)
- func (m *FileDir) Update(db *gorm.DB, item FileDir) error
- type FileInfo
- func (m *FileInfo) BatchDelete(db *gorm.DB, ids []int) error
- func (m *FileInfo) Create(db *gorm.DB, item FileInfo) error
- func (m *FileInfo) Delete(db *gorm.DB, id int) error
- func (m *FileInfo) Get(db *gorm.DB) (*FileInfo, error)
- func (m *FileInfo) Query(db *gorm.DB, params param.FileInfoParam) (*pagination.Result, error)
- func (m *FileInfo) Update(db *gorm.DB, item FileInfo) error
- type Index
- type LoginLog
- func (m *LoginLog) BatchDelete(db *gorm.DB, ids []int) error
- func (m *LoginLog) Create(db *gorm.DB, item LoginLog) error
- func (m *LoginLog) Delete(db *gorm.DB, id int) error
- func (m *LoginLog) Get(db *gorm.DB) (*LoginLog, error)
- func (m *LoginLog) Query(db *gorm.DB, params param.LoginLogParam) (*pagination.Result, error)
- func (m *LoginLog) Update(db *gorm.DB, item LoginLog) error
- type Menu
- func (m *Menu) BatchDelete(db *gorm.DB, ids []int) error
- func (m *Menu) Create(db *gorm.DB, item *Menu) error
- func (m *Menu) Delete(db *gorm.DB, id int) error
- func (m *Menu) Exists(db *gorm.DB, item Menu) (bool, error)
- func (m *Menu) Get(db *gorm.DB) (*Menu, error)
- func (m *Menu) GetWithRole(db *gorm.DB, roleName string) ([]Menu, error)
- func (m *Menu) Query(db *gorm.DB, params param.MenuParam) (*pagination.Result, error)
- func (m *Menu) Update(db *gorm.DB, item Menu) error
- type MenuID
- type MenuIDList
- type MenuLabel
- type MenuPath
- type OperLog
- func (m *OperLog) BatchDelete(db *gorm.DB, ids []int) error
- func (m *OperLog) Create(db *gorm.DB, item OperLog) error
- func (m *OperLog) Delete(db *gorm.DB, id int) error
- func (m *OperLog) Get(db *gorm.DB) (*OperLog, error)
- func (m *OperLog) Query(db *gorm.DB, params param.OperLogParam) (*pagination.Result, error)
- func (m *OperLog) Update(db *gorm.DB, item OperLog) error
- type Params
- type Post
- func (m *Post) BatchDelete(db *gorm.DB, ids []int) error
- func (m *Post) Create(db *gorm.DB, item Post) error
- func (m *Post) Delete(db *gorm.DB, id int) error
- func (m *Post) Exists(db *gorm.DB, item Post) (bool, error)
- func (m *Post) Get(db *gorm.DB) (*Post, error)
- func (m *Post) Query(db *gorm.DB, params param.PostParam) (*pagination.Result, error)
- func (m *Post) Update(db *gorm.DB, item Post) error
- type Role
- func (m *Role) BatchDelete(db *gorm.DB, ids []int) error
- func (m *Role) Create(db *gorm.DB, item *Role) error
- func (m *Role) Delete(db *gorm.DB, id int) error
- func (m *Role) Exists(db *gorm.DB, item Role) (bool, error)
- func (m *Role) Get(db *gorm.DB) (*Role, error)
- func (m *Role) GetWithDept(db *gorm.DB) ([]int, error)
- func (m *Role) GetWithMenu(db *gorm.DB) ([]int, error)
- func (m *Role) Query(db *gorm.DB, params param.RoleParam) (*pagination.Result, error)
- func (m *Role) Update(db *gorm.DB, item Role) error
- type RoleDept
- type RoleMenu
- func (m *RoleMenu) BatchDeleteRoleMenu(db *gorm.DB, IDs []int) error
- func (m *RoleMenu) Create(db *gorm.DB, roleID int, menuID []int) error
- func (m *RoleMenu) Delete(db *gorm.DB) error
- func (m *RoleMenu) DeleteRoleMenu(db *gorm.DB, id int) error
- func (m *RoleMenu) Get(db *gorm.DB) ([]RoleMenu, error)
- func (m *RoleMenu) GetIDs(db *gorm.DB) ([]MenuPath, error)
- func (m *RoleMenu) GetPermissions(db *gorm.DB, roleID int) ([]string, error)
- type Setting
- type TableIndex
- type TableIndexList
- type Tables
- func (m *Tables) BatchDelete(db *gorm.DB, ids []int) error
- func (m *Tables) Create(db *gorm.DB, item *Tables) error
- func (m *Tables) Delete(db *gorm.DB, id int) error
- func (m *Tables) Get(db *gorm.DB) (*Tables, error)
- func (m *Tables) List(db *gorm.DB, tableNames []string) ([]*Tables, error)
- func (m *Tables) Query(db *gorm.DB, params param.TablesParam) (*pagination.Result, error)
- func (m *Tables) Update(db *gorm.DB, item Tables) error
- type User
- func (m *User) BatchDelete(db *gorm.DB, id []int) error
- func (m *User) Create(db *gorm.DB, item User) error
- func (m *User) Delete(db *gorm.DB, id int) error
- func (m *User) Exists(db *gorm.DB, item User) (bool, error)
- func (m *User) Get(db *gorm.DB) (*User, error)
- func (m *User) Query(db *gorm.DB, params param.UserParam) (*pagination.Result, error)
- func (m *User) Update(db *gorm.DB, item User) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DataScopes ¶
DataScopes DataScopes
Types ¶
type Columns ¶
type Columns struct {
ColumnID int `gorm:"primary_key;auto_increment;" json:"columnId"` // 列ID
TableID int `gorm:"" json:"tableId"` // 表ID
ColumnName string `gorm:"size:128;" json:"columnName"` // 列名
ColumnComment string `gorm:"column:column_comment;size:128;" json:"columnComment"` // 列备注
ColumnType string `gorm:"column:column_type;size:128;" json:"columnType"` // 列类型
GoType string `gorm:"column:go_type;size:128;" json:"goType"` // Go类型
GoField string `gorm:"column:go_field;size:128;" json:"goField"` // Go字段
JSONField string `gorm:"column:json_field;size:128;" json:"jsonField"` // JSON字段
IsPk string `gorm:"column:is_pk;size:4;" json:"isPk"` // 主键
IsIncrement string `gorm:"column:is_increment;size:4;" json:"isIncrement"` // 自增
IsRequired string `gorm:"column:is_required;size:4;" json:"isRequired"` // 必须
IsInsert string `gorm:"column:is_insert;size:4;" json:"isInsert"` // 增加
IsEdit string `gorm:"column:is_edit;size:4;" json:"isEdit"` // 修改
IsList string `gorm:"column:is_list;size:4;" json:"isList"` // 列表
IsQuery string `gorm:"column:is_query;size:4;" json:"isQuery"` // 查询
QueryType string `gorm:"column:query_type;size:128;" json:"queryType"` // 查询类型
HTMLType string `gorm:"column:html_type;size:128;" json:"htmlType"` //显示方式
DictType string `gorm:"column:dict_type;size:128;" json:"dictType"` // 字典类型
Sort int `gorm:"column:sort;" json:"sort"` // 排序
List string `gorm:"column:list;size:1;" json:"list"` // 队列
Pk bool `gorm:"column:pk;size:1;" json:"pk"` // 主键
Required bool `gorm:"column:required;size:1;" json:"required"` // 必须
SuperColumn bool `gorm:"column:super_column;size:1;" json:"superColumn"` // 超级列
UsableColumn bool `gorm:"column:usable_column;size:1;" json:"usableColumn"` // UsableColumn
Increment bool `gorm:"column:increment;size:1;" json:"increment"` // 自增
Insert bool `gorm:"column:insert;size:1;" json:"insert"` // 增加
Edit bool `gorm:"column:edit;size:1;" json:"edit"` // 编辑
Query bool `gorm:"column:query;size:1;" json:"query"` // 查询
Remark string `gorm:"column:remark;size:255;" json:"remark"` // 备注
FkTableName string `gorm:"" json:"fkTableName"` // 关系表名
FkTableNameClass string `gorm:"" json:"fkTableNameClass"` // 关系表类名
FkTableNamePackage string `gorm:"" json:"fkTableNamePackage"` // 关系表包名
FkCol []Columns `gorm:"-" json:"fkCol"` // 关系列
FkLabelID string `gorm:"" json:"fkLabelId"` // 关系字段ID
FkLabelName string `gorm:"size:255;" json:"fkLabelName"` // 关系字段名
CreateBy string `gorm:"column:create_by;size:128;" json:"createBy"` // 增加人
UpdateBy string `gorm:"column:update_By;size:128;" json:"updateBy"` // 修改人
Gorm string `gorm:"column:gorm;size:255;" json:"gorm"` // GORM 映射
models.AtModel
}
Columns 列表
type Config ¶
type Config struct {
gorm.Model
models.ByModel
ConfigName string `json:"configName" gorm:"type:varchar(128);comment:ConfigName"` // 参数名称
ConfigKey string `json:"configKey" gorm:"type:varchar(128);comment:ConfigKey"` // 参数健名
ConfigValue string `json:"configValue" gorm:"type:varchar(255);comment:ConfigValue"` // 参数键值
ConfigType string `json:"configType" gorm:"type:varchar(64);comment:ConfigType"` // 参数类型
Remark string `json:"remark" gorm:"type:varchar(128);comment:Remark"` // 备注
}
Config 系统参数实体
func (*Config) BatchDelete ¶
BatchDelete 批量删除
func (*Config) Query ¶
func (m *Config) Query(db *gorm.DB, params param.ConfigParam) (*pagination.Result, error)
Query 查询数据
type DBColumns ¶
type DBColumns struct {
TableSchema string `gorm:"column:TABLE_SCHEMA" json:"tableSchema"`
TableName string `gorm:"column:TABLE_NAME" json:"tableName"`
ColumnName string `gorm:"column:COLUMN_NAME" json:"columnName"`
ColumnDefault string `gorm:"column:COLUMN_DEFAULT" json:"columnDefault"`
IsNullable string `gorm:"column:IS_NULLABLE" json:"isNullable"`
DataType string `gorm:"column:DATA_TYPE" json:"dataType"`
CharacterMaximumLength string `gorm:"column:CHARACTER_MAXIMUM_LENGTH" json:"characterMaximumLength"`
CharacterSetName string `gorm:"column:CHARACTER_SET_NAME" json:"characterSetName"`
ColumnType string `gorm:"column:COLUMN_TYPE" json:"columnType"`
ColumnKey string `gorm:"column:COLUMN_KEY" json:"columnKey"`
Extra string `gorm:"column:EXTRA" json:"extra"`
ColumnComment string `gorm:"column:COLUMN_COMMENT" json:"columnComment"`
}
DBColumns 数据库列实体
func (*DBColumns) Query ¶
func (m *DBColumns) Query(db *gorm.DB, params param.DBColumnsParam) (*pagination.Result, error)
Query 查询数据
type DBTables ¶
type DBTables struct {
TableName string `gorm:"column:TABLE_NAME" json:"tableName"`
Engine string `gorm:"column:ENGINE" json:"engine"`
TableRows string `gorm:"column:TABLE_ROWS" json:"tableRows"`
TableCollation string `gorm:"column:TABLE_COLLATION" json:"tableCollation"`
CreateTime string `gorm:"column:CREATE_TIME" json:"createTime"`
UpdateTime string `gorm:"column:UPDATE_TIME" json:"updateTime"`
TableComment string `gorm:"column:TABLE_COMMENT" json:"tableComment"`
}
DBTables 数据库表
func (*DBTables) Query ¶
func (m *DBTables) Query(db *gorm.DB, params param.DBTablesParam) (*pagination.Result, error)
Query 查询数据
type DataPermission ¶
DataPermission 数据权限
func (*DataPermission) GetDataScope ¶
GetDataScope GetDataScope
type Dept ¶
type Dept struct {
DeptID int `json:"deptId" gorm:"primary_key;auto_increment;"` // 部门编码
ParentID int `json:"parentId" gorm:""` // 上级部门
DeptPath string `json:"deptPath" gorm:"size:255;"` // 部门路径
DeptName string `json:"deptName" gorm:"size:128;"` // 部门名称
Sort int `json:"sort" gorm:"index:idx_sort;"` // 排序
Leader string `json:"leader" gorm:"size:128;"` // 负责人
Phone string `json:"phone" gorm:"size:11;"` // 手机
Email string `json:"email" gorm:"size:64;"` // 邮箱
Status string `json:"status" gorm:"size:4;"` // 状态
CreateBy string `json:"createBy" gorm:"size:64;"`
UpdateBy string `json:"updateBy" gorm:"size:64;"`
models.AtModel
DataScope string `json:"dataScope" gorm:"-"`
Params string `json:"params" gorm:"-"`
Children []Dept `json:"children" gorm:"-"`
}
Dept 部门实体
type DeptLabel ¶
type DeptLabel struct {
ID int `gorm:"-" json:"id"`
Label string `gorm:"-" json:"label"`
Children []DeptLabel `gorm:"-" json:"children"`
}
DeptLabel 部门标签
type DictData ¶
type DictData struct {
DictCode int `gorm:"column:dict_code;primary_key;auto_increment;" json:"dictCode" example:"1"` // 字典编码
DictSort int `gorm:"column:dict_sort;index:idx_dict_sort;" json:"dictSort"` // 显示顺序
DictLabel string `gorm:"column:dict_label;size:128;" json:"dictLabel"` // 数据标签
DictValue string `gorm:"column:dict_value;size:255;" json:"dictValue"` // 数据键值
DictType string `gorm:"column:dict_type;size:64;index:idx_dict_type;" json:"dictType"` // 字典类型
CSSClass string `gorm:"column:css_class;size:128;" json:"cssClass"` //
ListClass string `gorm:"column:list_class;size:128;" json:"listClass"` //
IsDefault string `gorm:"column:is_default;size:8;" json:"isDefault"` //
Status string `gorm:"column:status;size:4;" json:"status"` // 状态
Default string `gorm:"column:default;size:8;" json:"default"` //
CreateBy string `gorm:"column:create_by;size:64;" json:"createBy"` // 创建人
UpdateBy string `gorm:"column:update_by;size:64;" json:"updateBy"` // 更新人
Remark string `gorm:"column:remark;size:255;" json:"remark"` // 备注
models.AtModel
Params string `gorm:"-" json:"params"`
DataScope string `gorm:"-" json:"dataScope"`
}
DictData 字典数据实体
func (*DictData) BatchDelete ¶
BatchDelete 批量删除
func (*DictData) Query ¶
func (m *DictData) Query(db *gorm.DB, params param.DictDataParam) (*pagination.Result, error)
Query 查询数据
type DictType ¶
type DictType struct {
DictID int `gorm:"primary_key;auto_increment;" json:"dictId"` //字典ID
DictName string `gorm:"size:128;" json:"dictName"` //字典名称
DictType string `gorm:"size:128;" json:"dictType"` //字典类型
Status string `gorm:"size:4;" json:"status"` //状态
CreateBy string `gorm:"size:11;" json:"createBy"` //创建者
UpdateBy string `gorm:"size:11;" json:"updateBy"` //更新者
Remark string `gorm:"size:255;" json:"remark"` //备注
models.AtModel
DataScope string `gorm:"-" json:"dataScope"` //
Params string `gorm:"-" json:"params"` //
}
DictType 字典类型实体
func (*DictType) BatchDelete ¶
BatchDelete 批量删除
func (*DictType) Query ¶
func (m *DictType) Query(db *gorm.DB, params param.DictTypeParam) (*pagination.Result, error)
Query 查询数据
type FileDir ¶
type FileDir struct {
ID int `json:"id"`
Label string `json:"label" gorm:"type:varchar(255);"` // 名称
PID int `json:"pId" gorm:"type:int(11);"` // 父ID
Sort int `json:"sort" gorm:""` // 排序
Path string `json:"path" gorm:"size:255;"` // 路径层级
CreateBy string `json:"createBy" gorm:"type:varchar(128);"` // 创建人
UpdateBy string `json:"updateBy" gorm:"type:varchar(128);"` // 更新人
models.AtModel
Children []FileDir `json:"children" gorm:"-"`
DataScope string `json:"dataScope" gorm:"-"`
Params string `json:"params" gorm:"-"`
}
FileDir 文件夹实体
func (*FileDir) BatchDelete ¶
BatchDelete 批量删除
func (*FileDir) Query ¶
func (m *FileDir) Query(db *gorm.DB, params param.FileDirParam) (*pagination.Result, error)
Query 查询数据
type FileInfo ¶
type FileInfo struct {
ID int `json:"id"` // id
Type string `json:"type" gorm:"type:varchar(255);"` // 文件类型
Name string `json:"name" gorm:"type:varchar(255);"` // 文件名称
Size string `json:"size" gorm:"type:int(11);"` // 文件大小
PID int `json:"pId" gorm:"type:int(11);"` // 目录ID
Source string `json:"source" gorm:"type:varchar(255);"` // 文件源
URL string `json:"url" gorm:"type:varchar(255);"` // 文件路径
FullURL string `json:"fullUrl" gorm:"type:varchar(255);"` // 文件全路径
CreateBy string `json:"createBy" gorm:"type:varchar(128);"` // 创建人
UpdateBy string `json:"updateBy" gorm:"type:varchar(128);"` // 编辑人
models.AtModel
DataScope string `json:"dataScope" gorm:"-"`
Params string `json:"params" gorm:"-"`
}
FileInfo 文件信息实体
func (*FileInfo) BatchDelete ¶
BatchDelete 批量删除
func (*FileInfo) Query ¶
func (m *FileInfo) Query(db *gorm.DB, params param.FileInfoParam) (*pagination.Result, error)
Query 查询数据
type Index ¶
type Index struct {
Normal map[string]*TableIndex
Clustered map[string]*TableIndex
}
Index 区分一般索引和聚合索引
type LoginLog ¶
type LoginLog struct {
InfoID int `json:"infoId" gorm:"primary_key;auto_increment;"` // 主键
Username string `json:"username" gorm:"size:128;"` // 用户名
Status string `json:"status" gorm:"size:4;"` // 状态
IPaddr string `json:"ipaddr" gorm:"size:255;"` // ip地址
LoginLocation string `json:"loginLocation" gorm:"size:255;"` // 归属地
Browser string `json:"browser" gorm:"size:255;"` // 浏览器
Os string `json:"os" gorm:"size:255;"` // 系统
Platform string `json:"platform" gorm:"size:255;"` // 固件
LoginTime time.Time `json:"loginTime" gorm:"type:timestamp;"` // 登录时间
CreateBy string `json:"createBy" gorm:"size:128;"` // 创建人
UpdateBy string `json:"updateBy" gorm:"size:128;"` // 更新者
DataScope string `json:"dataScope" gorm:"-"` // 数据
Remark string `json:"remark" gorm:"size:255;"` // 备注
Msg string `json:"msg" gorm:"size:255;"`
Params string `json:"params" gorm:"-"`
models.AtModel
}
LoginLog 登录日志
func (*LoginLog) BatchDelete ¶
BatchDelete 批量删除
func (*LoginLog) Query ¶
func (m *LoginLog) Query(db *gorm.DB, params param.LoginLogParam) (*pagination.Result, error)
Query 查询数据
type Menu ¶
type Menu struct {
MenuID int `json:"menuId" gorm:"primary_key;AUTO_INCREMENT;"` // 菜单ID
MenuName string `json:"menuName" gorm:"size:128;"` // 菜单名称
Title string `json:"title" gorm:"size:128;"` // 菜单标题
Icon string `json:"icon" gorm:"size:128;"` // 图标
Path string `json:"path" gorm:"size:128;"` // 路径
Paths string `json:"paths" gorm:"size:128;"` // 路径层级
MenuType string `json:"menuType" gorm:"size:1;"` // 菜单类型
Action string `json:"action" gorm:"size:16;"` // 请求方式
Permission string `json:"permission" gorm:"size:255;"` // 权限
ParentID int `json:"parentId" gorm:"size:11;"` // 上级菜单
NoCache bool `json:"noCache" gorm:"size:8;"` // 缓存
Breadcrumb string `json:"breadcrumb" gorm:"size:255;"` // 导航
Component string `json:"component" gorm:"size:255;"` // 组件
Sort int `json:"sort" gorm:"size:4;index:idx_sort;"` // 排序
Visible string `json:"visible" gorm:"size:1;"` // 可见
CreateBy string `json:"createBy" gorm:"size:128;"` // 创建人
UpdateBy string `json:"updateBy" gorm:"size:128;"` // 更新人
IsFrame string `json:"isFrame" gorm:"size:1;default:0;"` // 是frame
DataScope string `json:"dataScope" gorm:"-"` // 数据权限
Params string `json:"params" gorm:"-"` // 参数
RoleID int `gorm:"-"` // 角色ID
Children []Menu `json:"children" gorm:"-"` // 子菜单
IsSelect bool `json:"is_select" gorm:"-"` // 选中
models.AtModel
}
Menu 菜单实体
func (*Menu) BatchDelete ¶
BatchDelete 批量删除
func (*Menu) GetWithRole ¶
GetWithRole 查询角色菜单
type MenuLabel ¶
type MenuLabel struct {
ID int `json:"id" gorm:"-"`
Label string `json:"label" gorm:"-"`
Children []MenuLabel `json:"children" gorm:"-"`
}
MenuLabel 菜单标识
type OperLog ¶
type OperLog struct {
OperID int `json:"operId" gorm:"primary_key;AUTO_INCREMENT;"` // 日志编码
Title string `json:"title" gorm:"size:255;"` // 操作模块
BusinessType string `json:"businessType" gorm:"size:128;"` // 操作类型
BusinessTypes string `json:"businessTypes" gorm:"size:128;"` // 操作类型
Method string `json:"method" gorm:"size:128;"` // 函数
RequestMethod string `json:"requestMethod" gorm:"size:128;"` // 请求方式
OperatorType string `json:"operatorType" gorm:"size:128;"` // 操作类型
OperName string `json:"operName" gorm:"size:128;"` // 操作者
DeptName string `json:"deptName" gorm:"size:128;"` // 部门名称
OperURL string `json:"operUrl" gorm:"size:255;"` // 访问地址
OperIP string `json:"operIp" gorm:"size:128;"` // 客户端ip
OperLocation string `json:"operLocation" gorm:"size:128;"` // 访问位置
OperParam string `json:"operParam" gorm:"size:255;"` // 请求参数
Status string `json:"status" gorm:"size:4;"` // 操作状态
OperTime time.Time `json:"operTime" gorm:"type:timestamp;"` // 操作时间
JSONResult string `json:"jsonResult" gorm:"size:255;"` // 返回数据
CreateBy string `json:"createBy" gorm:"size:128;"` // 创建人
UpdateBy string `json:"updateBy" gorm:"size:128;"` // 更新者
DataScope string `json:"dataScope" gorm:"-"` // 数据
Params string `json:"params" gorm:"-"` // 参数
Remark string `json:"remark" gorm:"size:255;"` // 备注
LatencyTime string `json:"latencyime" gorm:"size:128;"` // 耗时
UserAgent string `json:"userAgent" gorm:"size:255;"` // UserAgent
models.AtModel
}
OperLog 操作日志
func (*OperLog) BatchDelete ¶
BatchDelete 批量删除
func (*OperLog) Query ¶
func (m *OperLog) Query(db *gorm.DB, params param.OperLogParam) (*pagination.Result, error)
Query 查询数据
type Params ¶
type Params struct {
TreeCode string `gorm:"-" json:"treeCode"`
TreeParentCode string `gorm:"-" json:"treeParentCode"`
TreeName string `gorm:"-" json:"treeName"`
}
Params 树参数
type Post ¶
type Post struct {
PostID int `gorm:"primary_key;AUTO_INCREMENT;" json:"postId"` //岗位编号
PostName string `gorm:"size:128;" json:"postName"` //岗位名称
PostCode string `gorm:"size:128;" json:"postCode"` //岗位代码
Sort int `gorm:"" json:"sort"` //岗位排序
Status string `gorm:"size:4;" json:"status"` //状态
Remark string `gorm:"size:255;" json:"remark"` //描述
CreateBy string `gorm:"size:128;" json:"createBy"`
UpdateBy string `gorm:"size:128;" json:"updateBy"`
models.AtModel
DataScope string `gorm:"-" json:"dataScope"`
Params string `gorm:"-" json:"params"`
}
Post 岗位实体
func (*Post) BatchDelete ¶
BatchDelete 批量删除
type Role ¶
type Role struct {
RoleID int `json:"roleId" gorm:"primary_key;AUTO_INCREMENT;"` // 角色编码
RoleName string `json:"roleName" gorm:"size:128;"` // 角色名称
Status string `json:"status" gorm:"size:4;"` // 角色状态
RoleKey string `json:"roleKey" gorm:"size:128;"` // 角色代码
RoleSort int `json:"roleSort" gorm:""` // 角色排序
Flag string `json:"flag" gorm:"size:128;"` // 标识
Remark string `json:"remark" gorm:"size:255;"` // 备注
CreateBy string `json:"createBy" gorm:"size:128;"` // 创建人
UpdateBy string `json:"updateBy" gorm:"size:128;"` // 更新人
Admin bool `json:"admin" gorm:"size:4;"` // 管理员
DataScope string `json:"dataScope" gorm:"size:128;"` // 数据权限
models.AtModel
Params string `json:"params" gorm:"-"`
MenuIDs []int `json:"menuIds" gorm:"-"`
DeptIDs []int `json:"deptIds" gorm:"-"`
}
Role 角色实体
func (*Role) BatchDelete ¶
BatchDelete 批量删除
func (*Role) GetWithDept ¶
GetWithDept 获取角色对应部门ID
func (*Role) GetWithMenu ¶
GetWithMenu 获取角色对应菜单ID
type RoleMenu ¶
type RoleMenu struct {
RoleID int `gorm:""`
MenuID int `gorm:""`
RoleName string `gorm:"size:128;"`
CreateBy string `gorm:"size:128;"`
UpdateBy string `gorm:"size:128;"`
}
RoleMenu 角色菜单实体
func (*RoleMenu) BatchDeleteRoleMenu ¶
BatchDeleteRoleMenu 批量删除角色菜单(该方法即将弃用)
func (*RoleMenu) DeleteRoleMenu ¶
DeleteRoleMenu 删除角色菜单
type Setting ¶
type Setting struct {
SettingsID int `json:"settings_id" gorm:"primary_key;AUTO_INCREMENT"`
Name string `json:"name" gorm:"type:varchar(256);"`
Logo string `json:"logo" gorm:"type:varchar(256);"`
models.AtModel
}
Setting 设置
type TableIndex ¶
type TableIndex struct {
Table string `gorm:"column:Table"` // 表名
NonUnique int `gorm:"column:Non_unique"` // 唯一索引
KeyName string `gorm:"column:Key_name"` // 索引名称
SeqInIndex int `gorm:"column:Seq_in_index"` // 索引中的列序列号
ColumnName string `gorm:"column:Column_name"` // 索引的列名
Visible string `gorm:"column:Visible"` // 不可见索引
Clustered bool `gorm:"-"` // 聚合索引
}
TableIndex 表索引
type Tables ¶
type Tables struct {
TableID int `gorm:"primary_key;auto_increment;" json:"tableId"` // 表编码
TBName string `gorm:"column:table_name;size:255;" json:"tableName"` // 表名称
TableComment string `gorm:"size:255;" json:"tableComment"` // 表备注
ClassName string `gorm:"size:255;" json:"className"` // 类名
TplCategory string `gorm:"size:255;" json:"tplCategory"` //
PackageName string `gorm:"size:255;" json:"packageName"` // 包名
ModuleName string `gorm:"size:255;" json:"moduleName"` // 模块名
BusinessName string `gorm:"size:255;" json:"businessName"` //
FunctionName string `gorm:"size:255;" json:"functionName"` // 功能名称
FunctionAuthor string `gorm:"size:255;" json:"functionAuthor"` // 功能作者
PkColumn string `gorm:"size:255;" json:"pkColumn"` // 列
PkGoField string `gorm:"size:255;" json:"pkGoField"` // GO字段
PkJSONField string `gorm:"size:255;" json:"pkJsonField"` // JSON字段
Options string `gorm:"size:255;" json:"options"` // 选项
TreeCode string `gorm:"size:255;" json:"treeCode"` // 树编码
TreeParentCode string `gorm:"size:255;" json:"treeParentCode"` // 树父编码
TreeName string `gorm:"size:255;" json:"treeName"` // 树Name
Tree bool `gorm:"size:1;" json:"tree"` // 树
Crud bool `gorm:"size:1;" json:"crud"` // 增删改查
Remark string `gorm:"size:255;" json:"remark"` // 备注
IsDataScope int `gorm:"size:1;" json:"isDataScope"` // 数据权限
IsActions int `gorm:"size:1;" json:"isActions"` // 动作
IsAuth int `gorm:"size:1;" json:"isAuth"` // 认证
IsLogicalDelete string `gorm:"size:1;" json:"isLogicalDelete"` // 是否逻辑删除
LogicalDelete bool `gorm:"size:1;" json:"logicalDelete"` // 逻辑删除
LogicalDeleteColumn string `gorm:"size:128;" json:"logicalDeleteColumn"` // 逻辑删除列
CreateBy string `gorm:"size:128;" json:"createBy"` // 创建人
UpdateBy string `gorm:"size:128;" json:"updateBy"` // 更新人
models.AtModel
DataScope string `gorm:"-" json:"dataScope"` // 数据权限
Params Params `gorm:"-" json:"params"` // 参数
Columns []Columns `gorm:"-" json:"columns"` // 列
}
Tables 表
func (*Tables) BatchDelete ¶
BatchDelete 批量删除
func (*Tables) Query ¶
func (m *Tables) Query(db *gorm.DB, params param.TablesParam) (*pagination.Result, error)
Query 查询数据
type User ¶
type User struct {
UserID int `gorm:"primary_key;AUTO_INCREMENT;" json:"userId"` // 用户ID
Username string `gorm:"size:64" json:"username"` // 用户名
Password string `gorm:"size:128" json:"password"` // 密码
NickName string `gorm:"size:128" json:"nickName"` // 昵称
Phone string `gorm:"size:11" json:"phone"` // 手机号
RoleID int `gorm:"index:idx_role_id;" json:"roleId"` // 角色编码
Salt string `gorm:"size:255" json:"salt"` // 盐
Avatar string `gorm:"size:255" json:"avatar"` // 头像
Sex string `gorm:"size:255" json:"sex"` // 性别
Email string `gorm:"size:128" json:"email"` // 邮箱
DeptID int `gorm:"" json:"deptId"` // 部门编码
PostID int `gorm:"" json:"postId"` // 职位编码
CreateBy string `gorm:"size:128" json:"createBy"` // 创建人
UpdateBy string `gorm:"size:128" json:"updateBy"` // 更新人
Remark string `gorm:"size:255" json:"remark"` // 备注
Status string `gorm:"size:4;" json:"status"` // 状态
models.AtModel
RoleName string `gorm:"-" json:"role_name"` // 角色名称
DeptName string `gorm:"-" json:"deptName"` // 部门名称
DataScope string `gorm:"-" json:"dataScope"`
Params string `gorm:"-" json:"params"`
}
User 用户实体