This commit is contained in:
孟帅
2022-02-25 17:11:17 +08:00
parent 9bd05abb2c
commit 8f3d679a57
897 changed files with 95731 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
//
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2022 HotGo CLI
// @Author  Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//
package model
import (
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/net/ghttp"
)
// Context 请求上下文结构
type Context struct {
ReqId string // 上下文ID
Module string // 应用模块
TakeUpTime int64 // 请求耗时 ms
Request *ghttp.Request // 当前Request管理对象
User *Identity // 上下文用户信息
ComResponse *Response // 组件响应
Data g.Map // 自定KV变量业务模块根据需要设置不固定
}
// 通用身份模型
type Identity struct {
Id int64 `json:"id" description:"会员ID"`
Username string `json:"username" description:"用户名"`
Realname string `json:"realname" description:"昵称"`
Avatar string `json:"avatar" description:"头像"`
Email string `json:"email" description:"邮箱"`
Mobile string `json:"mobile" description:"手机号码"`
VisitCount uint `json:"visit_count" description:"访问次数"`
LastTime int `json:"last_time" description:"最后一次登录时间"`
LastIp string `json:"last_ip" description:"最后一次登录ip"`
Role int64 `json:"role" description:"权限"`
Exp int64 `json:"exp" description:"登录有效期截止时间戳"`
Expires int64 `json:"expires" description:"登录有效期"`
App string `json:"app" description:"登录应用"`
}

View File

@@ -0,0 +1,26 @@
// =================================================================================
// Code generated by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package entity
import (
"github.com/gogf/gf/v2/os/gtime"
)
// AdminDept is the golang structure for table admin_dept.
type AdminDept struct {
Id int64 `json:"id" description:"部门id"`
Pid int64 `json:"pid" description:"父部门id"`
Ancestors string `json:"ancestors" description:"祖级列表"`
Name string `json:"name" description:"部门名称"`
Code string `json:"code" description:"部门编码"`
Type string `json:"type" description:"部门类型"`
Leader string `json:"leader" description:"负责人"`
Phone string `json:"phone" description:"联系电话"`
Email string `json:"email" description:"邮箱"`
Sort int `json:"sort" description:"排序"`
Status string `json:"status" description:"部门状态"`
CreatedAt *gtime.Time `json:"created_at" description:"创建时间"`
UpdatedAt *gtime.Time `json:"updated_at" description:"更新时间"`
}

View File

@@ -0,0 +1,42 @@
// =================================================================================
// Code generated by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package entity
import (
"github.com/gogf/gf/v2/os/gtime"
)
// AdminMember is the golang structure for table admin_member.
type AdminMember struct {
Id int64 `json:"id" description:""`
DeptId int64 `json:"dept_id" description:"部门ID"`
Username string `json:"username" description:"帐号"`
PasswordHash string `json:"password_hash" description:"密码"`
Salt string `json:"salt" description:"密码盐"`
AuthKey string `json:"auth_key" description:"授权令牌"`
PasswordResetToken string `json:"password_reset_token" description:"密码重置令牌"`
Type string `json:"type" description:"1:普通管理员;10超级管理员"`
Realname string `json:"realname" description:"真实姓名"`
Avatar string `json:"avatar" description:"头像"`
Sex string `json:"sex" description:"性别[0:未知;1:男;2:女]"`
Qq string `json:"qq" description:"qq"`
Email string `json:"email" description:"邮箱"`
Birthday *gtime.Time `json:"birthday" description:"生日"`
ProvinceId int `json:"province_id" description:"省"`
CityId int `json:"city_id" description:"城市"`
AreaId int `json:"area_id" description:"地区"`
Address string `json:"address" description:"默认地址"`
Mobile string `json:"mobile" description:"手机号码"`
HomePhone string `json:"home_phone" description:"家庭号码"`
DingtalkRobotToken string `json:"dingtalk_robot_token" description:"钉钉机器人token"`
VisitCount uint `json:"visit_count" description:"访问次数"`
LastTime int `json:"last_time" description:"最后一次登录时间"`
LastIp string `json:"last_ip" description:"最后一次登录ip"`
Role int64 `json:"role" description:"权限"`
Remark string `json:"remark" description:"备注"`
Status string `json:"status" description:"状态"`
CreatedAt *gtime.Time `json:"created_at" description:"创建时间"`
UpdatedAt *gtime.Time `json:"updated_at" description:"修改时间"`
}

View File

@@ -0,0 +1,11 @@
// =================================================================================
// Code generated by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package entity
// AdminMemberPost is the golang structure for table admin_member_post.
type AdminMemberPost struct {
MemberId int64 `json:"member_id" description:"用户ID"`
PostId int64 `json:"post_id" description:"岗位ID"`
}

View File

@@ -0,0 +1,11 @@
// =================================================================================
// Code generated by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package entity
// AdminMemberRole is the golang structure for table admin_member_role.
type AdminMemberRole struct {
MemberId int64 `json:"member_id" description:"用户ID"`
RoleId int64 `json:"role_id" description:"角色ID"`
}

View File

@@ -0,0 +1,33 @@
// =================================================================================
// Code generated by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package entity
import (
"github.com/gogf/gf/v2/os/gtime"
)
// AdminMenu is the golang structure for table admin_menu.
type AdminMenu struct {
Id int64 `json:"id" description:"菜单ID"`
Pid int64 `json:"pid" description:"父菜单ID"`
Name string `json:"name" description:"菜单名称"`
Code string `json:"code" description:"菜单编码"`
Icon string `json:"icon" description:"菜单图标"`
Type string `json:"type" description:"菜单类型M目录 C菜单 F按钮"`
Perms string `json:"perms" description:"权限标识"`
Path string `json:"path" description:"路由地址"`
Component string `json:"component" description:"组件路径"`
Query string `json:"query" description:"路由参数"`
IsFrame string `json:"is_frame" description:"是否内嵌"`
IsCache string `json:"is_cache" description:"是否不缓存"`
IsVisible string `json:"is_visible" description:"是否隐藏"`
Remark string `json:"remark" description:"备注"`
Level int `json:"level" description:"级别"`
Tree string `json:"tree" description:"树"`
Sort int `json:"sort" description:"排序"`
Status string `json:"status" description:"菜单状态"`
CreatedAt *gtime.Time `json:"created_at" description:"创建时间"`
UpdatedAt *gtime.Time `json:"updated_at" description:"更新时间"`
}

View File

@@ -0,0 +1,32 @@
// =================================================================================
// Code generated by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package entity
import (
"github.com/gogf/gf/v2/os/gtime"
)
// AdminMenuOld is the golang structure for table admin_menu_old.
type AdminMenuOld struct {
Id int64 `json:"id" description:"菜单ID"`
Pid int64 `json:"pid" description:"父菜单ID"`
Name string `json:"name" description:"菜单名称"`
Icon string `json:"icon" description:"菜单图标"`
Type string `json:"type" description:"菜单类型M目录 C菜单 F按钮"`
Perms string `json:"perms" description:"权限标识"`
Path string `json:"path" description:"路由地址"`
Component string `json:"component" description:"组件路径"`
Query string `json:"query" description:"路由参数"`
IsFrame int `json:"is_frame" description:"是否为外链0是 1否"`
IsCache int `json:"is_cache" description:"是否缓存0缓存 1不缓存"`
IsVisible int `json:"is_visible" description:"菜单状态0显示 1隐藏"`
Remark string `json:"remark" description:"备注"`
Level int `json:"level" description:"级别"`
Tree string `json:"tree" description:"树"`
Sort int `json:"sort" description:"排序"`
Status int `json:"status" description:"菜单状态"`
CreatedAt *gtime.Time `json:"created_at" description:"创建时间"`
UpdatedAt *gtime.Time `json:"updated_at" description:"更新时间"`
}

View File

@@ -0,0 +1,21 @@
// =================================================================================
// Code generated by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package entity
import (
"github.com/gogf/gf/v2/os/gtime"
)
// AdminNotice is the golang structure for table admin_notice.
type AdminNotice struct {
Id int64 `json:"id" description:"公告ID"`
Title string `json:"title" description:"公告标题"`
Type string `json:"type" description:"公告类型1通知 2公告"`
Content string `json:"content" description:"公告内容"`
Remark string `json:"remark" description:"备注"`
Status string `json:"status" description:"公告状态"`
CreatedAt *gtime.Time `json:"created_at" description:"创建时间"`
UpdatedAt *gtime.Time `json:"updated_at" description:"更新时间"`
}

View File

@@ -0,0 +1,21 @@
// =================================================================================
// Code generated by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package entity
import (
"github.com/gogf/gf/v2/os/gtime"
)
// AdminPost is the golang structure for table admin_post.
type AdminPost struct {
Id int64 `json:"id" description:"岗位ID"`
Code string `json:"code" description:"岗位编码"`
Name string `json:"name" description:"岗位名称"`
Remark string `json:"remark" description:"备注"`
Sort int `json:"sort" description:"显示顺序"`
Status string `json:"status" description:"状态"`
CreatedAt *gtime.Time `json:"created_at" description:"创建时间"`
UpdatedAt *gtime.Time `json:"updated_at" description:"更新时间"`
}

View File

@@ -0,0 +1,24 @@
// =================================================================================
// Code generated by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package entity
import (
"github.com/gogf/gf/v2/os/gtime"
)
// AdminRole is the golang structure for table admin_role.
type AdminRole struct {
Id int64 `json:"id" description:"角色ID"`
Name string `json:"name" description:"角色名称"`
Key string `json:"key" description:"角色权限字符串"`
DataScope int `json:"data_scope" description:"数据范围1全部数据权限 2自定数据权限 3本部门数据权限 4本部门及以下数据权限"`
MenuCheckStrictly int `json:"menu_check_strictly" description:"菜单树选择项是否关联显示"`
DeptCheckStrictly int `json:"dept_check_strictly" description:"部门树选择项是否关联显示"`
Remark string `json:"remark" description:"备注"`
Sort int `json:"sort" description:"排序"`
Status string `json:"status" description:"角色状态"`
CreatedAt *gtime.Time `json:"created_at" description:"创建时间"`
UpdatedAt *gtime.Time `json:"updated_at" description:"更新时间"`
}

View File

@@ -0,0 +1,11 @@
// =================================================================================
// Code generated by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package entity
// AdminRoleDept is the golang structure for table admin_role_dept.
type AdminRoleDept struct {
RoleId int64 `json:"role_id" description:"角色ID"`
DeptId int64 `json:"dept_id" description:"部门ID"`
}

View File

@@ -0,0 +1,11 @@
// =================================================================================
// Code generated by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package entity
// AdminRoleMenu is the golang structure for table admin_role_menu.
type AdminRoleMenu struct {
RoleId int64 `json:"role_id" description:"角色ID"`
MenuId int64 `json:"menu_id" description:"菜单ID"`
}

View File

@@ -0,0 +1,22 @@
// =================================================================================
// Code generated by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package entity
import (
"github.com/gogf/gf/v2/os/gtime"
)
// SysConfig is the golang structure for table sys_config.
type SysConfig struct {
Id int64 `json:"id" description:"配置ID"`
Name string `json:"name" description:"参数名称"`
Key string `json:"key" description:"参数键名"`
Value string `json:"value" description:"参数键值"`
IsDefault string `json:"is_default" description:"是否默认"`
Status string `json:"status" description:"状态"`
Remark string `json:"remark" description:"备注"`
CreatedAt *gtime.Time `json:"created_at" description:"创建时间"`
UpdatedAt *gtime.Time `json:"updated_at" description:"更新时间"`
}

View File

@@ -0,0 +1,24 @@
// =================================================================================
// Code generated by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package entity
import (
"github.com/gogf/gf/v2/os/gtime"
)
// SysDictData is the golang structure for table sys_dict_data.
type SysDictData struct {
Id int64 `json:"id" description:"字典编码"`
Label string `json:"label" description:"字典标签"`
Value string `json:"value" description:"字典键值"`
Type string `json:"type" description:"字典类型"`
ListClass string `json:"list_class" description:"表格回显样式"`
IsDefault string `json:"is_default" description:"是否默认"`
Sort int `json:"sort" description:"字典排序"`
Remark string `json:"remark" description:"备注"`
Status string `json:"status" description:"状态"`
CreatedAt *gtime.Time `json:"created_at" description:"创建时间"`
UpdatedAt *gtime.Time `json:"updated_at" description:"更新时间"`
}

View File

@@ -0,0 +1,21 @@
// =================================================================================
// Code generated by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package entity
import (
"github.com/gogf/gf/v2/os/gtime"
)
// SysDictType is the golang structure for table sys_dict_type.
type SysDictType struct {
Id int64 `json:"id" description:"字典主键"`
Name string `json:"name" description:"字典名称"`
Type string `json:"type" description:"字典类型"`
Sort int `json:"sort" description:"排序"`
Remark string `json:"remark" description:"备注"`
Status string `json:"status" description:"状态"`
CreatedAt *gtime.Time `json:"created_at" description:"创建时间"`
UpdatedAt *gtime.Time `json:"updated_at" description:"更新时间"`
}

View File

@@ -0,0 +1,36 @@
// =================================================================================
// Code generated by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package entity
import (
"github.com/gogf/gf/v2/os/gtime"
)
// SysLog is the golang structure for table sys_log.
type SysLog struct {
Id int64 `json:"id" description:""`
AppId string `json:"app_id" description:"应用id"`
MerchantId uint `json:"merchant_id" description:"商户id"`
MemberId int `json:"member_id" description:"用户id"`
Method string `json:"method" description:"提交类型"`
Module string `json:"module" description:"模块"`
Url string `json:"url" description:"提交url"`
GetData string `json:"get_data" description:"get数据"`
PostData string `json:"post_data" description:"post数据"`
HeaderData string `json:"header_data" description:"header数据"`
Ip string `json:"ip" description:"ip地址"`
ProvinceId int `json:"province_id" description:"省编码"`
CityId int `json:"city_id" description:"市编码"`
ErrorCode int `json:"error_code" description:"报错code"`
ErrorMsg string `json:"error_msg" description:"报错信息"`
ErrorData string `json:"error_data" description:"报错日志"`
ReqId string `json:"req_id" description:"对外id"`
Timestamp int `json:"timestamp" description:"响应时间"`
UserAgent string `json:"user_agent" description:"UA信息"`
TakeUpTime int64 `json:"take_up_time" description:"请求耗时"`
Status string `json:"status" description:"状态"`
CreatedAt *gtime.Time `json:"created_at" description:"创建时间"`
UpdatedAt *gtime.Time `json:"updated_at" description:"修改时间"`
}

View File

@@ -0,0 +1,21 @@
// =================================================================================
// Code generated by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package entity
// SysProvinces is the golang structure for table sys_provinces.
type SysProvinces struct {
Id int `json:"id" description:"ID"`
Title string `json:"title" description:"栏目名"`
Pid int `json:"pid" description:"父栏目"`
ShortTitle string `json:"short_title" description:"缩写"`
Areacode int `json:"areacode" description:"区域编码"`
Zipcode int `json:"zipcode" description:"邮政编码"`
Pinyin string `json:"pinyin" description:"拼音"`
Lng string `json:"lng" description:"经度"`
Lat string `json:"lat" description:"纬度"`
Level int `json:"level" description:"级别"`
Tree string `json:"tree" description:""`
Sort uint `json:"sort" description:"排序"`
}

View File

@@ -0,0 +1,17 @@
//
// @Link  https://github.com/bufanyun/hotgo
// @Copyright  Copyright (c) 2022 HotGo CLI
// @Author  Ms <133814250@qq.com>
// @License  https://github.com/bufanyun/hotgo/blob/master/LICENSE
//
package model
// HTTP响应
type Response struct {
Code int `json:"code" example:"0" description:"状态码"`
Message string `json:"message" example:"操作成功" description:"提示消息"`
Data interface{} `json:"data" description:"数据集"`
Error interface{} `json:"error" description:"错误信息"`
Timestamp int64 `json:"timestamp" example:"1640966400" description:"服务器时间戳"`
ReqId string `json:"req_id" v:"0" example:"d0bb93048bc5c9164cdee845dcb7f820" description:"唯一请求ID"`
}

View File

@@ -0,0 +1,23 @@
//
// @Link  https://github.com/bufanyun/hotgo
// @Copyright  Copyright (c) 2022 HotGo CLI
// @Author  Ms <133814250@qq.com>
// @License  https://github.com/bufanyun/hotgo/blob/master/LICENSE
//
package model
import "github.com/bufanyun/hotgo/app/model/entity"
//  菜单树
type TreeMenu struct {
entity.AdminMenu
Children []*TreeMenu `json:"children"`
}
//  菜单kl树
type LabelTreeMenu struct {
entity.AdminMenu
Key int64 `json:"key" description:"键名"`
Label string `json:"label" description:"键标签"`
Children []*LabelTreeMenu `json:"children"`
}