// Package system 定义系统管理接口(认证、菜单、角色),路由前缀 /admin/v1/system。 package system import "github.com/gogf/gf/v2/frame/g" type LoginReq struct { g.Meta `path:"/system/auth/login" method:"post" tags:"Admin/System/Auth" summary:"Administrator login"` Username string `json:"username" v:"required"` Password string `json:"password" v:"required"` } type LoginRes struct { AccessToken string `json:"accessToken"` RefreshToken string `json:"refreshToken"` ExpiresIn int64 `json:"expiresIn"` AdminID uint64 `json:"adminId"` } // InfoReq returns the current administrator profile (vben getUserInfo). type InfoReq struct { g.Meta `path:"/system/auth/info" method:"get" tags:"Admin/System/Auth" summary:"Current admin info"` } // InfoRes is the response of InfoReq. Roles carries role codes for vben authority. type InfoRes struct { AdminID uint64 `json:"adminId"` Username string `json:"username"` Nickname string `json:"nickname"` Roles []string `json:"roles"` } // CodesReq returns the button-level permission codes of the current admin // (vben getAccessCodes, backend access mode). type CodesReq struct { g.Meta `path:"/system/auth/codes" method:"get" tags:"Admin/System/Auth" summary:"Current admin access codes"` } // CodesRes is the response of CodesReq. type CodesRes struct { Codes []string `json:"codes"` }