model

package
v0.0.0-...-8c67d6e Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2024 License: MIT Imports: 8 Imported by: 24

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	//Clients      = make(map[string]*websocket.Conn)
	Clients      sync.Map
	BroadcastMsg = make(chan []byte, 100)
)

Functions

func OrderByColumn

func OrderByColumn(sortBy string, desc bool) interface{}

func RequestShouldBindJSON

func RequestShouldBindJSON(c *gin.Context, obj interface{}) error

func ResponseErrorData

func ResponseErrorData(data interface{}, c *gin.Context)

func ResponseErrorMessage

func ResponseErrorMessage(message string, c *gin.Context)

func ResponseErrorMessageData

func ResponseErrorMessageData(data interface{}, message string, c *gin.Context)

func ResponseErrorMessageWithLog

func ResponseErrorMessageWithLog(message string, c *gin.Context)

func ResponseSuccessData

func ResponseSuccessData(data interface{}, c *gin.Context)

func ResponseSuccessMessage

func ResponseSuccessMessage(message string, c *gin.Context)

func ResponseSuccessMessageData

func ResponseSuccessMessageData(data interface{}, message string, c *gin.Context)

func ResponseSuccessMessageDataWithLog

func ResponseSuccessMessageDataWithLog(data interface{}, message string, c *gin.Context)

func ResponseSuccessMessageWithLog

func ResponseSuccessMessageWithLog(message string, c *gin.Context)

func Result

func Result(code int, data interface{}, message string, c *gin.Context)

Types

type ColumnList

type ColumnList struct {
	ColumnName    string `json:"column_name"`
	ColumnType    string `json:"column_type"`
	ColumnComment string `json:"column_comment"`
	ColumnDefault string `json:"column_default"`
}

type GqaModelWithCreatedByAndUpdatedBy

type GqaModelWithCreatedByAndUpdatedBy struct {
	global.GqaModel
	CreatedByUser *SysUser `json:"created_by_user" gorm:"foreignKey:CreatedBy;references:Username"`
	UpdatedByUser *SysUser `json:"updated_by_user" gorm:"foreignKey:UpdatedBy;references:Username"`
}

type Plugin

type Plugin struct {
	PluginName    string `json:"plugin_name"`
	PluginCode    string `json:"plugin_code"`
	PluginVersion string `json:"plugin_version"`
	PluginMemo    string `json:"plugin_memo"`
}

type PluginModel

type PluginModel struct {
	ModelName          string       `json:"model_name"`
	WithGqaColumn      bool         `json:"with_gqa_column"`
	WithPublicList     bool         `json:"with_public_list"`
	WithDataPermission bool         `json:"with_data_permission"`
	WithLogOperation   bool         `json:"with_log_operation"`
	ColumnList         []ColumnList `json:"column_list"`
}

type RequestAdd

type RequestAdd struct {
	Sort   uint   `json:"sort"`
	Status string `json:"status"`
	Memo   string `json:"memo"`
}

type RequestAddApi

type RequestAddApi struct {
	RequestAdd
	ApiGroup  string `json:"api_group"`
	ApiMethod string `json:"api_method"`
	ApiPath   string `json:"api_path"`
}

type RequestAddConfigBackend

type RequestAddConfigBackend struct {
	RequestAdd
	ConfigItem  string `json:"config_item"`
	ItemDefault string `json:"item_default"`
	ItemCustom  string `json:"item_custom"`
}

type RequestAddConfigFrontend

type RequestAddConfigFrontend struct {
	RequestAdd
	ConfigItem  string `json:"config_item"`
	ItemDefault string `json:"item_default"`
	ItemCustom  string `json:"item_custom"`
}

type RequestAddDept

type RequestAddDept struct {
	RequestAdd
	ParentCode string `json:"parent_code"`
	DeptCode   string `json:"dept_code"`
	DeptName   string `json:"dept_name"`
	Leader     string `json:"leader"`
}

type RequestAddDict

type RequestAddDict struct {
	RequestAdd
	ParentCode string `json:"parent_code"`
	DictCode   string `json:"dict_code"`
	DictLabel  string `json:"dict_label"`
	DictExt1   string `json:"dict_ext_1"`
	DictExt2   string `json:"dict_ext_2"`
	DictExt3   string `json:"dict_ext_3"`
	DictExt4   string `json:"dict_ext_4"`
	DictExt5   string `json:"dict_ext_5"`
}

type RequestAddMenu

type RequestAddMenu struct {
	RequestAdd
	ParentCode string `json:"parent_code"`
	Name       string `json:"name"`
	Path       string `json:"path"`
	Component  string `json:"component"`
	Title      string `json:"title"`
	Icon       string `json:"icon"`
	Hidden     string `json:"hidden"`
	KeepAlive  string `json:"keep_alive"`
	IsLink     string `json:"is_link"`
}

type RequestAddNotice

type RequestAddNotice struct {
	NoticeTitle      string   `json:"notice_title"`
	NoticeContent    string   `json:"notice_content"`
	NoticeType       string   `json:"notice_type"`
	NoticeToUserType string   `json:"notice_to_user_type"`
	NoticeToUser     []string `json:"notice_to_user"`
}

type RequestAddRole

type RequestAddRole struct {
	RequestAdd
	RoleCode string `json:"role_code"`
	RoleName string `json:"role_name"`
}

type RequestAddTodo

type RequestAddTodo struct {
	TodoDetail string `json:"todo_detail"`
}

type RequestAddUser

type RequestAddUser struct {
	RequestAdd
	Avatar   string    `json:"avatar"`
	Username string    `json:"username"`
	Nickname string    `json:"nickname"`
	RealName string    `json:"real_name"`
	Gender   string    `json:"gender"`
	Mobile   string    `json:"mobile"`
	Email    string    `json:"email"`
	Dept     []SysDept `json:"dept"`
}

type RequestChangeNickname

type RequestChangeNickname struct {
	Nickname string `json:"nickname" binding:"required"`
}

type RequestChangePassword

type RequestChangePassword struct {
	OldPassword  string `json:"old_password" binding:"required"`
	NewPassword1 string `json:"new_password_1" binding:"required"`
	NewPassword2 string `json:"new_password_2" binding:"required"`
}

type RequestDbInit

type RequestDbInit struct {
	DbType     string `json:"db_type" binding:"required"`
	DbHost     string `json:"db_host" binding:"required"`
	DbPort     string `json:"db_port" binding:"required"`
	DbSchema   string `json:"db_schema" binding:"required"`
	DbUser     string `json:"db_user" binding:"required"`
	DbPassword string `json:"db_password" binding:"required"`
}

type RequestDeptCode

type RequestDeptCode struct {
	DeptCode string `json:"dept_code"`
}

type RequestDeptUser

type RequestDeptUser struct {
	DeptCode string `json:"dept_code"`
	Username string `json:"username"`
}

type RequestDeptUserAdd

type RequestDeptUserAdd struct {
	DeptCode string   `json:"dept_code"`
	Username []string `json:"username"`
}

type RequestEditRoleApi

type RequestEditRoleApi struct {
	RoleCode string                     `json:"role_code"`
	RoleApi  []RequestEditRoleApiDetail `json:"role_api"`
}

type RequestEditRoleApiDetail

type RequestEditRoleApiDetail struct {
	RoleCode  string `json:"role_code"`
	ApiGroup  string `json:"api_group"`
	ApiMethod string `json:"api_method"`
	ApiPath   string `json:"api_path"`
}

type RequestGetApiList

type RequestGetApiList struct {
	RequestPageAndSort
	ApiGroup  string `json:"api_group"`
	ApiMethod string `json:"api_method"`
}

type RequestGetConfigBackendList

type RequestGetConfigBackendList struct {
	RequestPageAndSort
	ConfigItem string `json:"config_item"`
	Memo       string `json:"memo"`
}

type RequestGetConfigFrontendList

type RequestGetConfigFrontendList struct {
	RequestPageAndSort
	ConfigItem string `json:"config_item"`
	Memo       string ``
}

type RequestGetDeptList

type RequestGetDeptList struct {
	RequestPageAndSort
	DeptCode string `json:"dept_code"`
	DeptName string `json:"dept_name"`
}

type RequestGetDictList

type RequestGetDictList struct {
	RequestPageAndSort
	ParentCode string `json:"parent_code"`
	DictCode   string `json:"dict_code"`
	DictLabel  string `json:"dict_label"`
}

type RequestGetGenPluginList

type RequestGetGenPluginList struct {
	RequestPageAndSort
	PluginSort uint   `json:"plugin_sort"`
	PluginCode string `json:"plugin_code"`
	PluginName string `json:"plugin_name"`
}

type RequestGetLogLoginList

type RequestGetLogLoginList struct {
	RequestPageAndSort
	LoginUsername string `json:"login_username"`
	LoginSuccess  string `json:"login_success"`
}

type RequestGetLogOperationList

type RequestGetLogOperationList struct {
	RequestPageAndSort
	OperationUsername string `json:"operation_username"`
}

type RequestGetMenuList

type RequestGetMenuList struct {
	RequestPageAndSort
	Path  string `json:"path"`
	Title string `json:"title"`
}

type RequestGetNoticeList

type RequestGetNoticeList struct {
	RequestPageAndSort
	NoticeTitle  string `json:"notice_title"`
	NoticeType   string `json:"notice_type"`
	NoticeRead   string `json:"notice_read"`
	NoticeSent   string `json:"notice_sent"`
	NoticeToUser string `json:"notice_to_user"`
}

type RequestGetRoleList

type RequestGetRoleList struct {
	RequestPageAndSort
	RoleCode string `json:"role_code"`
	RoleName string `json:"role_name"`
}

type RequestGetTodoList

type RequestGetTodoList struct {
	RequestPageAndSort
	TodoStatus string `json:"todo_status"`
}

type RequestGetUserList

type RequestGetUserList struct {
	RequestPageAndSort
	DeptCode  string `json:"dept_code"`
	Username  string `json:"username"`
	RealName  string `json:"real_name"`
	WithAdmin bool   `json:"with_admin"` // 是否显示admin用户
}

type RequestGetUserOnlineList

type RequestGetUserOnlineList struct {
	RequestPageAndSort
	Username string `json:"username"`
}

type RequestLogin

type RequestLogin struct {
	Username  string `json:"username" binding:"required"`
	Password  string `json:"password" binding:"required"`
	Captcha   string `json:"captcha" binding:"required"`
	CaptchaId string `json:"captcha_id" binding:"required"`
}

type RequestPage

type RequestPage struct {
	Page     int `json:"page" form:"page"`
	PageSize int `json:"page_size" form:"pageSize"`
}

type RequestPageAndSort

type RequestPageAndSort struct {
	RequestPage
	RequestSort
}

type RequestQueryById

type RequestQueryById struct {
	Id uint `json:"id"`
}

type RequestQueryByUUID

type RequestQueryByUUID struct {
	UUID uuid.UUID `json:"uuid"`
}

type RequestQueryByUsername

type RequestQueryByUsername struct {
	Username string `json:"username"`
}

type RequestRoleButton

type RequestRoleButton struct {
	SysRoleRoleCode     string `json:"sys_role_role_code"`
	SysButtonButtonCode string `json:"sys_button_button_code"`
}

type RequestRoleCode

type RequestRoleCode struct {
	RoleCode string `json:"role_code"`
}

type RequestRoleDeptDataPermission

type RequestRoleDeptDataPermission struct {
	RoleCode                 string `json:"role_code"`
	DeptDataPermissionType   string `json:"dept_data_permission_type"`
	DeptDataPermissionCustom string `json:"dept_data_permission_custom"`
}

type RequestRoleMenu

type RequestRoleMenu struct {
	SysRoleRoleCode string `json:"sys_role_role_code"`
	SysMenuName     string `json:"sys_menu_name"`
}

type RequestRoleMenuEdit

type RequestRoleMenuEdit struct {
	RoleCode    string              `json:"role_code"`
	RoleMenu    []RequestRoleMenu   `json:"role_menu"`
	RoleButton  []RequestRoleButton `json:"role_button"`
	DefaultPage string              `json:"default_page"`
}

type RequestRoleUser

type RequestRoleUser struct {
	RoleCode string `json:"role_code"`
	Username string `json:"username"`
}

type RequestRoleUserAdd

type RequestRoleUserAdd struct {
	RoleCode string   `json:"role_code"`
	Username []string `json:"username"`
}

type RequestSort

type RequestSort struct {
	SortBy string `json:"sort_by" form:"sortBy"`
	Desc   bool   `json:"desc" form:"desc"`
}

type Response

type Response struct {
	Code    int         `json:"code"`
	Data    interface{} `json:"data"`
	Message string      `json:"message"`
}

type ResponseCaptcha

type ResponseCaptcha struct {
	CaptchaImage string `json:"captcha_image"`
	CaptchaId    string `json:"captcha_id"`
}

type ResponseLogin

type ResponseLogin struct {
	Avatar   string `json:"avatar"`
	Username string `json:"username"`
	Nickname string `json:"nickname"`
	RealName string `json:"real_name"`
	Token    string `json:"token"`
}

type ResponsePage

type ResponsePage struct {
	Records  interface{} `json:"records"`
	Total    int64       `json:"total"`
	Page     int         `json:"page"`
	PageSize int         `json:"page_size"`
}

type ResponsePageWithParentId

type ResponsePageWithParentId struct {
	Records    interface{} `json:"records"`
	Total      int64       `json:"total"`
	Page       int         `json:"page"`
	PageSize   int         `json:"pageSize"`
	ParentCode string      `json:"parentCode"`
}

type SysApi

type SysApi struct {
	GqaModelWithCreatedByAndUpdatedBy
	ApiGroup  string `json:"api_group" gorm:"comment:Api分组;index;not null;"`
	ApiMethod string `json:"api_method" gorm:"comment:请求方法;default:POST;index;not null;"`
	ApiPath   string `json:"api_path" gorm:"comment:Api地址;index;not null;"`
}

type SysButton

type SysButton struct {
	MenuName   string `json:"menu_name" gorm:"comment:菜单Name;not null;primaryKey;"`
	ButtonName string `json:"button_name" gorm:"comment:按钮名称;not null;"`
	ButtonCode string `json:"button_code" gorm:"comment:按钮编码;not null;primaryKey;unique"`
}

type SysConfigBackend

type SysConfigBackend struct {
	GqaModelWithCreatedByAndUpdatedBy
	ConfigItem  string `json:"config_item" gorm:"comment:配置项;not null;index;"`
	ItemDefault string `json:"item_default" gorm:"comment:默认值;not null;"`
	ItemCustom  string `json:"item_custom" gorm:"comment:自定义值;"`
}

type SysConfigFrontend

type SysConfigFrontend struct {
	GqaModelWithCreatedByAndUpdatedBy
	ConfigItem  string `json:"config_item" gorm:"comment:配置项;not null;index;"`
	ItemDefault string `json:"item_default" gorm:"comment:默认值;not null;"`
	ItemCustom  string `json:"item_custom" gorm:"comment:自定义值;"`
}

type SysCron

type SysCron struct {
	UUID uuid.UUID    `json:"uuid"`
	Id   cron.EntryID `json:"id"`
	Name string       `json:"name"`
	Spec string       `json:"spec"`
}

type SysDept

type SysDept struct {
	GqaModelWithCreatedByAndUpdatedBy
	//ParentCode <==> DeptCode
	ParentCode string    `json:"parent_code" gorm:"comment:父部门DeptCode;index;"`
	DeptCode   string    `json:"dept_code" gorm:"comment:部门编码;not null;uniqueIndex;"`
	DeptName   string    `json:"dept_name" gorm:"comment:部门名称;not null;"`
	Leader     string    `json:"leader" gorm:"comment:部门负责人username;"`
	LeaderUser SysUser   `json:"leader_user" gorm:"comment:部门负责人;foreignKey:Leader;references:Username"`
	Staff      []SysUser `` /* 146-byte string literal not displayed */
	Children   []SysDept `json:"children" gorm:"foreignKey:ParentCode;references:DeptCode"`
}

type SysDeptUser

type SysDeptUser struct {
	SysDeptDeptCode string `gorm:"comment:'部门编码';primaryKey;not null;"`
	SysUserUsername string `gorm:"comment:'用户名';primaryKey;not null;"`
}

type SysDict

type SysDict struct {
	GqaModelWithCreatedByAndUpdatedBy
	//ParentCode <==> DictCode
	ParentCode string    `json:"parent_code" gorm:"comment:父字典编码;index"`
	DictCode   string    `json:"dict_code" gorm:"comment:字典编码;not null;uniqueIndex;"`
	DictLabel  string    `json:"dict_label" gorm:"comment:字典名称;not null;"`
	DictExt1   string    `json:"dict_ext_1" gorm:"comment:字典扩展项1;"`
	DictExt2   string    `json:"dict_ext_2" gorm:"comment:字典扩展项2;"`
	DictExt3   string    `json:"dict_ext_3" gorm:"comment:字典扩展项3;"`
	DictExt4   string    `json:"dict_ext_4" gorm:"comment:字典扩展项4;"`
	DictExt5   string    `json:"dict_ext_5" gorm:"comment:字典扩展项5;"`
	Children   []SysDict `json:"children" gorm:"foreignKey:ParentCode;references:DictCode"`
}

type SysGenPlugin

type SysGenPlugin struct {
	PluginSort  uint          `json:"plugin_sort"`
	PluginCode  string        `json:"plugin_code"`
	PluginName  string        `json:"plugin_name"`
	PluginModel []PluginModel `json:"plugin_model"`
}

type SysGenPluginList

type SysGenPluginList struct {
	GqaModelWithCreatedByAndUpdatedBy
	PluginSort uint   `json:"plugin_sort" gorm:"comment:插件排序"`
	PluginCode string `json:"plugin_code" gorm:"comment:插件编码;index"`
	PluginName string `json:"plugin_name" gorm:"comment:插件名称;"`
	PluginFile string `json:"plugin_file"  gorm:"comment:插件位置"`
}

type SysJwtClaims

type SysJwtClaims struct {
	Username  string `json:"username"`
	RefreshAt int64  `json:"refresh_at"`
	jwt.StandardClaims
}

type SysLogLogin

type SysLogLogin struct {
	GqaModelWithCreatedByAndUpdatedBy
	LoginUsername string `json:"login_username" gorm:"comment:登录用户名;index"`
	LoginIp       string `json:"login_ip" gorm:"comment:登录IP;index"`
	LoginBrowser  string `json:"login_browser" gorm:"comment:登录浏览器;"`
	LoginOs       string `json:"login_os" gorm:"comment:登录操作系统;"`
	LoginPlatform string `json:"login_platform" gorm:"comment:登录平台;"`
	LoginSuccess  string `json:"login_success" gorm:"是否登录成功;index"`
}

type SysLogOperation

type SysLogOperation struct {
	GqaModelWithCreatedByAndUpdatedBy
	OperationUsername string `json:"operation_username" gorm:"comment:请求用户名;index"`
	OperationIp       string `json:"operation_ip" gorm:"comment:请求IP;"`
	OperationMethod   string `json:"operation_method" gorm:"comment:请求方法"`
	OperationApi      string `json:"operation_api" gorm:"comment:请求Api;"`
	OperationStatus   int    `json:"operation_status" gorm:"comment:请求状态;"`
	OperationBody     string `json:"operation_body" gorm:"comment:body;type:text;"`
}

type SysMenu

type SysMenu struct {
	GqaModelWithCreatedByAndUpdatedBy
	//ParentCode <==> Name
	ParentCode string      `json:"parent_code" gorm:"comment:父菜单Name;index;"`
	Name       string      `json:"name" gorm:"comment:菜单Name;not null;unique;index;"`
	Path       string      `json:"path" gorm:"comment:菜单地址;"`
	Component  string      `json:"component" gorm:"comment:前端组件;"`
	Redirect   string      `json:"redirect" gorm:"comment:重定向地址;"`
	Title      string      `json:"title" gorm:"comment:菜单名称;"`
	Icon       string      `json:"icon" gorm:"comment:菜单图标;"`
	Hidden     string      `json:"hidden" gorm:"comment:是否在列表隐藏;default:yesNo_no;"`
	KeepAlive  string      `json:"keep_alive" gorm:"comment:是否缓存;default:yesNo_no;"`
	IsLink     string      `json:"is_link" gorm:"comment:是否外链;default:yesNo_no;"`
	Role       []SysRole   `json:"role" gorm:"many2many:sys_role_menu;"`
	Children   []SysMenu   `json:"children" gorm:"foreignKey:ParentCode;references:Name"`
	Button     []SysButton `json:"button" gorm:"foreignKey:MenuName;references:Name"`
}

type SysNotice

type SysNotice struct {
	GqaModelWithCreatedByAndUpdatedBy
	NoticeId         uuid.UUID         `json:"notice_id" gorm:"comment:消息ID;index;not null"`
	NoticeTitle      string            `json:"notice_title" gorm:"comment:消息题目;index;"`
	NoticeContent    string            `json:"notice_content" gorm:"comment:消息内容;type:text;"`
	NoticeType       string            `json:"notice_type" gorm:"comment:消息类型;index;"`
	NoticeSent       string            `json:"notice_sent" gorm:"comment:已经发送;default:yesNo_no;index;"`
	NoticeToUserType string            `json:"notice_to_user_type" gorm:"comment:接收用户范围;not null;"`
	NoticeToUser     []SysNoticeToUser `json:"notice_to_user" gorm:"foreignKey:NoticeId;references:NoticeId"`
}

type SysNoticeToUser

type SysNoticeToUser struct {
	NoticeId uuid.UUID `json:"notice_id" gorm:"comment:消息ID;index;not null;"`
	ToUser   string    `json:"to_user" gorm:"comment:接收用户;index;"`
	UserRead string    `json:"user_read" gorm:"comment:是否阅读;default:yesNo_no;index;"`
}

type SysRole

type SysRole struct {
	GqaModelWithCreatedByAndUpdatedBy
	RoleCode                 string      `json:"role_code" gorm:"comment:角色编码;not null;uniqueIndex;"`
	RoleName                 string      `json:"role_name" gorm:"comment:角色名称;not null;index;"`
	DeptDataPermissionType   string      `json:"dept_data_permission_type" gorm:"comment:部门数据权限分类;not null;default:deptDataPermissionType_user;"`
	DeptDataPermissionCustom string      `json:"dept_data_permission_custom" gorm:"comment:自定义部门数据权限;type:text;"`
	User                     []SysUser   `` /* 145-byte string literal not displayed */
	Menu                     []SysMenu   `` /* 137-byte string literal not displayed */
	Button                   []SysButton `` /* 155-byte string literal not displayed */
	DefaultPage              string      `json:"default_page" gorm:"comment:默认首页;default:dashboard"`
	DefaultPageMenu          SysMenu     `json:"default_page_menu" gorm:"foreignKey:DefaultPage;references:Name"`
}

type SysRoleApi

type SysRoleApi struct {
	RoleCode  string `json:"role_code" gorm:"comment:角色编码;index;not null;"`
	ApiGroup  string `json:"api_group" gorm:"comment:Api分组;index;not null;"`
	ApiMethod string `json:"api_method" gorm:"comment:请求方法;default:POST;index;not null;"`
	ApiPath   string `json:"api_path" gorm:"comment:Api地址;index;not null;"`
}

type SysRoleButton

type SysRoleButton struct {
	SysRoleRoleCode     string `gorm:"primaryKey;" json:"sys_role_role_code"`
	SysButtonButtonCode string `gorm:"primaryKey;" json:"sys_button_button_code"`
}

type SysRoleMenu

type SysRoleMenu struct {
	SysRoleRoleCode string `gorm:"primaryKey;" json:"sys_role_role_code"`
	SysMenuName     string `gorm:"primaryKey;" json:"sys_menu_name"`
}

type SysTodo

type SysTodo struct {
	GqaModelWithCreatedByAndUpdatedBy
	TodoDetail string `json:"todo_detail" gorm:"comment:内容;type:text;"`
	TodoStatus string `json:"todo_status" gorm:"comment:状态;default:yesNo_no;index;"`
}

type SysUser

type SysUser struct {
	GqaModelWithCreatedByAndUpdatedBy
	Username string    `json:"username" gorm:"comment:用户名;not null;uniqueIndex;"`
	Nickname string    `json:"nickname" gorm:"comment:用户昵称;"`
	RealName string    `json:"real_name" gorm:"comment:真实姓名;"`
	Password string    `json:"-"  gorm:"comment:用户密码;"`
	Avatar   string    `json:"avatar" gorm:"comment:头像"`
	Gender   string    `json:"gender" gorm:"comment:性别;default:gender_unknown;"`
	Mobile   string    `json:"mobile" gorm:"comment:手机号;"`
	Email    string    `json:"email" gorm:"comment:邮箱;"`
	Role     []SysRole `` /* 145-byte string literal not displayed */
	Dept     []SysDept `` /* 145-byte string literal not displayed */
}

type SysUserOnline

type SysUserOnline struct {
	Username string  `json:"username" gorm:"comment:用户名;not null;uniqueIndex;"`
	Token    string  `json:"token" gorm:"comment:token;not null"`
	User     SysUser `json:"user" gorm:"foreignKey:Username;references:Username"`
}

type SysUserRole

type SysUserRole struct {
	SysRoleRoleCode string `gorm:"comment:'角色编码';primaryKey;"`
	SysUserUsername string `gorm:"comment:'用户名';primaryKey;"`
}

type WsMessage

type WsMessage struct {
	Name              string   `json:"name"`
	Avatar            string   `json:"avatar"`
	Text              string   `json:"text"`
	Stamp             string   `json:"stamp"`
	MessageType       string   `json:"message_type"`
	MessageToUserType string   `json:"message_to_user_type"`
	ToUser            []string `json:"to_user"`
}

Jump to

Keyboard shortcuts

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