system

package
v0.0.0-...-01c5a3f Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Api

type Api struct {
	common.Model
	common.ExtraModel
	Method string `gorm:"column:method;comment:请求方法;" json:"method" form:"method"` //  请求方法
	Path   string `gorm:"column:path;comment:请求路径;" json:"path" form:"path"`       //  请求路径
	Group  string `gorm:"column:group;comment:请求分组;" json:"group" form:"group"`    //  请求分组
}

Api

func (Api) TableName

func (Api) TableName() string

type ApiRequest

type ApiRequest struct {
	request.PageInfo
	Api
}

Api请求

type Dictionary

type Dictionary struct {
	common.Model
	common.ExtraModel
	Value string `gorm:"column:value;comment:字典值;" json:"value" form:"value"`  //  字典值
	Label string `gorm:"column:label;comment:展示值;" json:"label" form:"label"`  //  展示值
	Group string `gorm:"column:group;comment:字典分组;" json:"group" form:"group"` //  字典分组
}

字典

func (Dictionary) TableName

func (Dictionary) TableName() string

type DictionaryRequest

type DictionaryRequest struct {
	request.PageInfo
	Dictionary
}

字典请求

type LoginRequest

type LoginRequest struct {
	UserName  string `json:"userName" form:"userName"`   //用户名
	Password  string `json:"password" form:"password"`   //密码
	Captcha   string `json:"captcha" form:"captcha"`     //验证码
	CaptchaId string `json:"captchaId" form:"captchaId"` // 验证码Id
}

登录请求

type LoginResponse

type LoginResponse struct {
	Token    string        `json:"token" form:"token"`       //Token
	UserInfo LoginUserInfo `json:"userInfo" form:"userInfo"` //用户信息
}

登录响应

type LoginUserInfo

type LoginUserInfo struct {
	Id       int64  `json:"id" form:"id"`             //Id
	Name     string `json:"name" form:"name"`         //名称
	UserName string `json:"userName" form:"userName"` //用户名
	Menu     Menu   `json:"menu" form:"menu"`         //菜单
}

登录用户信息

type Menu struct {
	common.Model
	common.ExtraModel
	Path      string `gorm:"column:path;comment:路由Path;" json:"path" form:"path"`            //  路由Path
	Component string `gorm:"column:component;comment:组件;" json:"component" form:"component"` //  组件
	Title     string `gorm:"column:title;comment:标题;" json:"title" form:"title"`             //  标题
	Icon      string `gorm:"column:icon;comment:图标;" json:"icon" form:"icon"`                //  图标
	IsShow    *bool  `gorm:"column:is_show;comment:是否显示;" json:"isShow" form:"isShow"`       //  是否显示
	ParentId  *int64 `gorm:"column:parent_id;comment:父级id;" json:"parentId" form:"parentId"` //  父级id

	Children []Menu `gorm:"-" json:"children" form:"children"` //子级列表
}

菜单

func (Menu) TableName() string
type MenuRequest struct {
	request.PageInfo
	Menu
}

菜单请求

type Role

type Role struct {
	common.Model
	common.ExtraModel

	Menus []Menu `gorm:"many2many:role_menu;" json:"menus" form:"menus"` //菜单列表
	Apis  []Api  `gorm:"many2many:role_api;" json:"apis" form:"apis"`    //Api列表

}

角色

func (Role) TableName

func (Role) TableName() string

type RoleRequest

type RoleRequest struct {
	request.PageInfo
	Role
}

角色请求

type User

type User struct {
	common.Model
	common.ExtraModel
	UserName string `gorm:"column:user_name;comment:用户名;" json:"userName" form:"userName"` //  用户名
	Password string `gorm:"column:password;comment:密码;" json:"-" form:"password"`          //  密码
	MenuId   *int64 `gorm:"column:menu_id;comment:菜单id;" json:"menuId" form:"menuId"`      //  菜单id

	RoleIds []int64 `gorm:"-" json:"roleIds" form:"roleIds"`                                                          //角色Id列表
	Roles   []Role  `gorm:"many2many:user_role;" json:"roles" form:"roles"`                                           //角色列表
	Menu    Menu    `gorm:"foreignKey:MenuId;constraint:OnUpdate:CASCADE,OnDelete:SET NULL;" json:"menu" form:"menu"` //菜单
}

用户

func (User) TableName

func (User) TableName() string

type UserRequest

type UserRequest struct {
	request.PageInfo
	User
}

用户请求

Jump to

Keyboard shortcuts

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