Documentation ¶
Index ¶
- func InjectApiUserResult(s *ApiUserResult)
- func InjectSysMenu(s *SysMenu)
- func InjectSysMenuEntity(s *SysMenuEntity)
- func InjectSysUser(s *SysUser)
- func InjectSysUserEntity(s *SysUserEntity)
- func InjectWebCheckRequest(s *WebCheckRequest)
- func InjectWebCheckRes(s *WebCheckRes)
- func InjectWebCheckResult(s *WebCheckResult)
- func InjectWebUserId(s *WebUserId)
- func LoadApiUserResult() baseiface.ISingleton
- func LoadSysMenu() baseiface.ISingleton
- func LoadSysMenuEntity() baseiface.ISingleton
- func LoadSysUser() baseiface.ISingleton
- func LoadSysUserEntity() baseiface.ISingleton
- func LoadWebCheckRequest() baseiface.ISingleton
- func LoadWebCheckRes() baseiface.ISingleton
- func LoadWebCheckResult() baseiface.ISingleton
- func LoadWebUserId() baseiface.ISingleton
- func SetUserId(c *gin.Context, userId *WebUserId)
- type ApiUserResult
- type SysMenu
- func (entity *SysMenu) AutoMigrate(db *gorm.DB) error
- func (entity *SysMenu) PkeyName() string
- func (entity *SysMenu) PkeyValue() int64
- func (entity *SysMenu) SetComponent(Component string)
- func (entity *SysMenu) SetCreateBy(CreateBy string)
- func (entity *SysMenu) SetCreateTime(CreateTime time.Time)
- func (entity *SysMenu) SetIcon(Icon string)
- func (entity *SysMenu) SetIsCache(IsCache int32)
- func (entity *SysMenu) SetIsFrame(IsFrame int32)
- func (entity *SysMenu) SetMenuId(MenuId int64)
- func (entity *SysMenu) SetMenuName(MenuName string)
- func (entity *SysMenu) SetMenuType(MenuType string)
- func (entity *SysMenu) SetOrderNum(OrderNum int32)
- func (entity *SysMenu) SetParentId(ParentId int64)
- func (entity *SysMenu) SetPath(Path string)
- func (entity *SysMenu) SetPerms(Perms string)
- func (entity *SysMenu) SetQuery(Query string)
- func (entity *SysMenu) SetRemark(Remark string)
- func (entity *SysMenu) SetStatus(Status string)
- func (entity *SysMenu) SetSubsys(Subsys int32)
- func (entity *SysMenu) SetUpdateBy(UpdateBy string)
- func (entity *SysMenu) SetUpdateTime(UpdateTime time.Time)
- func (entity *SysMenu) SetVisible(Visible string)
- func (entity *SysMenu) TableName() string
- type SysMenuEntity
- type SysUser
- func (entity *SysUser) AutoMigrate(db *gorm.DB) error
- func (entity *SysUser) PkeyName() string
- func (entity *SysUser) PkeyValue() int32
- func (entity *SysUser) SetCorpId(CorpId int32)
- func (entity *SysUser) SetCreateBy(CreateBy int32)
- func (entity *SysUser) SetCreateOn(CreateOn time.Time)
- func (entity *SysUser) SetEmail(Email string)
- func (entity *SysUser) SetEmployeeId(EmployeeId int32)
- func (entity *SysUser) SetExtParams(ExtParams string)
- func (entity *SysUser) SetId(Id int32)
- func (entity *SysUser) SetMobileNo(MobileNo string)
- func (entity *SysUser) SetOpBy(OpBy int32)
- func (entity *SysUser) SetOpOn(OpOn time.Time)
- func (entity *SysUser) SetOrgId(OrgId int32)
- func (entity *SysUser) SetPasswd(Passwd string)
- func (entity *SysUser) SetRealname(Realname string)
- func (entity *SysUser) SetRemark(Remark string)
- func (entity *SysUser) SetStatus(Status bool)
- func (entity *SysUser) SetUsername(Username string)
- func (entity *SysUser) TableName() string
- type SysUserEntity
- type WebCheckRequest
- type WebCheckRes
- type WebCheckResult
- type WebUserId
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InjectApiUserResult ¶
func InjectApiUserResult(s *ApiUserResult)
func InjectSysMenu ¶
func InjectSysMenu(s *SysMenu)
func InjectSysMenuEntity ¶
func InjectSysMenuEntity(s *SysMenuEntity)
func InjectSysUser ¶
func InjectSysUser(s *SysUser)
func InjectSysUserEntity ¶
func InjectSysUserEntity(s *SysUserEntity)
func InjectWebCheckRequest ¶
func InjectWebCheckRequest(s *WebCheckRequest)
func InjectWebCheckRes ¶
func InjectWebCheckRes(s *WebCheckRes)
func InjectWebCheckResult ¶
func InjectWebCheckResult(s *WebCheckResult)
func InjectWebUserId ¶
func InjectWebUserId(s *WebUserId)
func LoadApiUserResult ¶
func LoadApiUserResult() baseiface.ISingleton
func LoadSysMenu ¶
func LoadSysMenu() baseiface.ISingleton
func LoadSysMenuEntity ¶
func LoadSysMenuEntity() baseiface.ISingleton
func LoadSysUser ¶
func LoadSysUser() baseiface.ISingleton
func LoadSysUserEntity ¶
func LoadSysUserEntity() baseiface.ISingleton
func LoadWebCheckRequest ¶
func LoadWebCheckRequest() baseiface.ISingleton
func LoadWebCheckRes ¶
func LoadWebCheckRes() baseiface.ISingleton
func LoadWebCheckResult ¶
func LoadWebCheckResult() baseiface.ISingleton
func LoadWebUserId ¶
func LoadWebUserId() baseiface.ISingleton
Types ¶
type ApiUserResult ¶
type ApiUserResult struct { basedto.BaseEntity *SysUser IsAdmin bool `json:"is_admin"` MenuPerms []string `json:"menu_perms"` }
token session save info
func FindBeanApiUserResult ¶
func FindBeanApiUserResult() *ApiUserResult
func NewApiUserResult ¶
func NewApiUserResult() *ApiUserResult
func (*ApiUserResult) AppendMenuPerm ¶
func (self *ApiUserResult) AppendMenuPerm(menu string)
type SysMenu ¶
type SysMenu struct { basedto.BaseEntity `gorm:"-"` /* 菜单ID */ MenuId int64 `gorm:"column:menu_id;type:bigint(20);PRIMARY_KEY;comment:'菜单ID'" json:"menu_id,string"` /* 菜单名称 */ MenuName string `gorm:"column:menu_name;type:varchar(50);comment:'菜单名称'" json:"menu_name"` /* */ Subsys int32 `gorm:"column:subsys;type:int(11);comment:'';default:0" json:"subsys"` /* 父菜单ID */ ParentId int64 `gorm:"column:parent_id;type:bigint(20);comment:'父菜单ID';default:0" json:"parent_id,string"` /* 显示顺序 */ OrderNum int32 `gorm:"column:order_num;type:int(4);comment:'显示顺序';default:0" json:"order_num"` /* 路由地址 */ Path string `gorm:"column:path;type:varchar(200);comment:'路由地址'" json:"path"` /* 组件路径 */ Component string `gorm:"column:component;type:varchar(255);comment:'组件路径'" json:"component"` /* 路由参数 */ Query string `gorm:"column:query;type:varchar(255);comment:'路由参数'" json:"query"` /* 是否为外链(0是 1否) */ IsFrame int32 `gorm:"column:is_frame;type:int(1);comment:'是否为外链(0是 1否)';default:1" json:"is_frame"` /* 是否缓存(0缓存 1不缓存) */ IsCache int32 `gorm:"column:is_cache;type:int(1);comment:'是否缓存(0缓存 1不缓存)';default:0" json:"is_cache"` /* 菜单类型(M目录 C菜单 F按钮) */ MenuType string `gorm:"column:menu_type;type:char(1);comment:'菜单类型(M目录 C菜单 F按钮)'" json:"menu_type"` /* 菜单状态(0显示 1隐藏) */ Visible string `gorm:"column:visible;type:char(1);comment:'菜单状态(0显示 1隐藏)';default:'0'" json:"visible"` /* 菜单状态(0正常 1停用) */ Status string `gorm:"column:status;type:char(1);comment:'菜单状态(0正常 1停用)';default:'0'" json:"status"` /* 权限标识 */ Perms string `gorm:"column:perms;type:varchar(100);comment:'权限标识'" json:"perms"` /* 菜单图标 */ Icon string `gorm:"column:icon;type:varchar(100);comment:'菜单图标';default:'#'" json:"icon"` /* 创建者 */ CreateBy string `gorm:"column:create_by;type:varchar(64);comment:'创建者'" json:"create_by"` /* 创建时间 */ CreateTime time.Time `gorm:"column:create_time;type:datetime;comment:'创建时间'" json:"create_time"` /* 更新者 */ UpdateBy string `gorm:"column:update_by;type:varchar(64);comment:'更新者'" json:"update_by"` /* 更新时间 */ UpdateTime time.Time `gorm:"column:update_time;type:datetime;comment:'更新时间'" json:"update_time"` /* 备注 */ Remark string `gorm:"column:remark;type:varchar(500);comment:'备注'" json:"remark"` }
菜单权限表
func FindBeanSysMenu ¶
func FindBeanSysMenu() *SysMenu
func NewSysMenu ¶
func NewSysMenu() *SysMenu
func (*SysMenu) SetComponent ¶
func (*SysMenu) SetCreateBy ¶
func (*SysMenu) SetCreateTime ¶
func (*SysMenu) SetIsCache ¶
func (*SysMenu) SetIsFrame ¶
func (*SysMenu) SetMenuName ¶
func (*SysMenu) SetMenuType ¶
func (*SysMenu) SetOrderNum ¶
func (*SysMenu) SetParentId ¶
func (*SysMenu) SetUpdateBy ¶
func (*SysMenu) SetUpdateTime ¶
func (*SysMenu) SetVisible ¶
type SysMenuEntity ¶
type SysMenuEntity struct { basedto.BaseEntity `gorm:"-"` /* 菜单ID */ MenuId int64 `gorm:"column:menu_id;type:bigint(20);PRIMARY_KEY;comment:'菜单ID'" json:"menu_id,string"` /* 菜单名称 */ MenuName string `gorm:"column:menu_name;type:varchar(50);comment:'菜单名称'" json:"menu_name"` /* */ Subsys int32 `gorm:"column:subsys;type:int(11);comment:'';default:0" json:"subsys"` /* 父菜单ID */ ParentId int64 `gorm:"column:parent_id;type:bigint(20);comment:'父菜单ID';default:0" json:"parent_id,string"` /* 显示顺序 */ OrderNum int32 `gorm:"column:order_num;type:int(4);comment:'显示顺序';default:0" json:"order_num"` /* 路由地址 */ Path string `gorm:"column:path;type:varchar(200);comment:'路由地址'" json:"path"` /* 组件路径 */ Component string `gorm:"column:component;type:varchar(255);comment:'组件路径'" json:"component"` /* 路由参数 */ Query string `gorm:"column:query;type:varchar(255);comment:'路由参数'" json:"query"` /* 是否为外链(0是 1否) */ IsFrame int32 `gorm:"column:is_frame;type:int(1);comment:'是否为外链(0是 1否)';default:1" json:"is_frame"` /* 是否缓存(0缓存 1不缓存) */ IsCache int32 `gorm:"column:is_cache;type:int(1);comment:'是否缓存(0缓存 1不缓存)';default:0" json:"is_cache"` /* 菜单类型(M目录 C菜单 F按钮) */ MenuType string `gorm:"column:menu_type;type:char(1);comment:'菜单类型(M目录 C菜单 F按钮)'" json:"menu_type"` /* 菜单状态(0显示 1隐藏) */ Visible string `gorm:"column:visible;type:char(1);comment:'菜单状态(0显示 1隐藏)';default:\'0\'" json:"visible"` /* 菜单状态(0正常 1停用) */ Status string `gorm:"column:status;type:char(1);comment:'菜单状态(0正常 1停用)';default:\'0\'" json:"status"` /* 权限标识 */ Perms string `gorm:"column:perms;type:varchar(100);comment:'权限标识'" json:"perms"` /* 菜单图标 */ Icon string `gorm:"column:icon;type:varchar(100);comment:'菜单图标';default:\'#\'" json:"icon"` /* 创建者 */ CreateBy string `gorm:"column:create_by;type:varchar(64);comment:'创建者'" json:"create_by"` /* 创建时间 */ CreateTime int64 `gorm:"column:create_time;type:datetime;comment:'创建时间'" json:"create_time,string"` /* 更新者 */ UpdateBy string `gorm:"column:update_by;type:varchar(64);comment:'更新者'" json:"update_by"` /* 更新时间 */ UpdateTime int64 `gorm:"column:update_time;type:datetime;comment:'更新时间'" json:"update_time,string"` /* 备注 */ Remark string `gorm:"column:remark;type:varchar(500);comment:'备注'" json:"remark"` }
func FindBeanSysMenuEntity ¶
func FindBeanSysMenuEntity() *SysMenuEntity
func NewSysMenuEntity ¶
func NewSysMenuEntity() *SysMenuEntity
func (*SysMenuEntity) PkeyName ¶
func (entity *SysMenuEntity) PkeyName() string
func (*SysMenuEntity) PkeyValue ¶
func (entity *SysMenuEntity) PkeyValue() int64
func (*SysMenuEntity) TableName ¶
func (entity *SysMenuEntity) TableName() string
gorm默认生成的表名是结构名+'s',所以必须以结构方法指定!
type SysUser ¶
type SysUser struct { basedto.BaseEntity `gorm:"-"` /* 主键 */ Id int32 `gorm:"column:id;type:int(11);PRIMARY_KEY;comment:'主键'" json:"id"` /* 工号 */ Username string `gorm:"column:username;type:varchar(32);comment:'工号'" json:"username"` /* 密码 */ Passwd string `gorm:"column:passwd;type:varchar(64);comment:'密码'" json:"passwd"` /* */ Realname string `gorm:"column:realname;type:varchar(128);comment:''" json:"realname"` /* 企业ID */ CorpId int32 `gorm:"column:corp_id;type:int(11);comment:'企业ID'" json:"corp_id"` /* 组织结构ID */ OrgId int32 `gorm:"column:org_id;type:int(11);comment:'组织结构ID'" json:"org_id"` /* */ MobileNo string `gorm:"column:mobile_no;type:varchar(32);comment:''" json:"mobile_no"` /* 公司邮箱 */ Email string `gorm:"column:email;type:varchar(255);comment:'公司邮箱'" json:"email"` /* 状态(1:启用;0:停用) */ Status bool `gorm:"column:status;type:tinyint(1);comment:'状态(1:启用;0:停用)'" json:"status"` /* 备注 */ Remark string `gorm:"column:remark;type:varchar(500);comment:'备注'" json:"remark"` /* 创建人 */ CreateBy int32 `gorm:"column:create_by;type:int(11);comment:'创建人';default:0" json:"create_by"` /* 创建时间 */ CreateOn time.Time `gorm:"column:create_on;type:datetime;comment:'创建时间'" json:"create_on"` /* 操作人 */ OpBy int32 `gorm:"column:op_by;type:int(11);comment:'操作人';default:0" json:"op_by"` /* 操作时间 */ OpOn time.Time `gorm:"column:op_on;type:datetime;comment:'操作时间'" json:"op_on"` /* 扩展属性 */ ExtParams string `gorm:"column:ext_params;type:varchar(1000);comment:'扩展属性'" json:"ext_params"` /* 员工标识 */ EmployeeId int32 `gorm:"column:employee_id;type:int(11);comment:'员工标识';default:0" json:"employee_id"` }
系统用户表
func FindBeanSysUser ¶
func FindBeanSysUser() *SysUser
func NewSysUser ¶
func NewSysUser() *SysUser
func (*SysUser) SetCreateBy ¶
func (*SysUser) SetCreateOn ¶
func (*SysUser) SetEmployeeId ¶
func (*SysUser) SetExtParams ¶
func (*SysUser) SetMobileNo ¶
func (*SysUser) SetRealname ¶
func (*SysUser) SetUsername ¶
type SysUserEntity ¶
type SysUserEntity struct { basedto.BaseEntity `gorm:"-"` /* 主键 */ Id int32 `gorm:"column:id;type:int(11);PRIMARY_KEY;comment:'主键'" json:"id"` /* 工号 */ Username string `gorm:"column:username;type:varchar(32);comment:'工号'" json:"username"` /* 密码 */ Passwd string `gorm:"column:passwd;type:varchar(64);comment:'密码'" json:"passwd"` /* */ Realname string `gorm:"column:realname;type:varchar(128);comment:''" json:"realname"` /* 企业ID */ CorpId int32 `gorm:"column:corp_id;type:int(11);comment:'企业ID'" json:"corp_id"` /* 组织结构ID */ OrgId int32 `gorm:"column:org_id;type:int(11);comment:'组织结构ID'" json:"org_id"` /* */ MobileNo string `gorm:"column:mobile_no;type:varchar(32);comment:''" json:"mobile_no"` /* 公司邮箱 */ Email string `gorm:"column:email;type:varchar(255);comment:'公司邮箱'" json:"email"` /* 状态(1:启用;0:停用) */ Status int8 `gorm:"column:status;type:tinyint(1);comment:'状态(1:启用;0:停用)'" json:"status"` /* 备注 */ Remark string `gorm:"column:remark;type:varchar(500);comment:'备注'" json:"remark"` /* 创建人 */ CreateBy int32 `gorm:"column:create_by;type:int(11);comment:'创建人';default:0" json:"create_by"` /* 创建时间 */ CreateOn int64 `gorm:"column:create_on;type:datetime;comment:'创建时间'" json:"create_on,string"` /* 操作人 */ OpBy int32 `gorm:"column:op_by;type:int(11);comment:'操作人';default:0" json:"op_by"` /* 操作时间 */ OpOn int64 `gorm:"column:op_on;type:datetime;comment:'操作时间'" json:"op_on,string"` /* 扩展属性 */ ExtParams string `gorm:"column:ext_params;type:varchar(1000);comment:'扩展属性'" json:"ext_params"` /* 员工标识 */ EmployeeId int32 `gorm:"column:employee_id;type:int(11);comment:'员工标识';default:0" json:"employee_id"` }
func FindBeanSysUserEntity ¶
func FindBeanSysUserEntity() *SysUserEntity
func NewSysUserEntity ¶
func NewSysUserEntity() *SysUserEntity
func (*SysUserEntity) PkeyName ¶
func (entity *SysUserEntity) PkeyName() string
func (*SysUserEntity) PkeyValue ¶
func (entity *SysUserEntity) PkeyValue() int32
func (*SysUserEntity) TableName ¶
func (entity *SysUserEntity) TableName() string
gorm默认生成的表名是结构名+'s',所以必须以结构方法指定!
type WebCheckRequest ¶
type WebCheckRequest struct { basedto.BaseEntity TenantId string ShopId int64 ShopMemberId int64 JobId int64 *WebCheckRes MaxDepth string }
func DefaultRequest ¶
func DefaultRequest() *WebCheckRequest
func FindBeanWebCheckRequest ¶
func FindBeanWebCheckRequest() *WebCheckRequest
FindBeanWebCheckRequest
func NewWebCheckRequest ¶
func NewWebCheckRequest() *WebCheckRequest
func (*WebCheckRequest) ValueFrom ¶
func (self *WebCheckRequest) ValueFrom(userID *WebUserId)
type WebCheckRes ¶
type WebCheckRes struct { basedto.BaseEntity RoutePath string ResourceType string ResourceDomain string ResourceCode string ResourceKey string ActionKey string }
func DefaultResof ¶
func DefaultResof(res string) *WebCheckRes
func NewWebCheckRes ¶
func NewWebCheckRes() *WebCheckRes
type WebCheckResult ¶
type WebCheckResult struct { basedto.BaseEntity *ApiUserResult Allowed bool Depth string ShopIds []int64 ShopMemberId []int64 }
func DefaultDisabledResult ¶
func DefaultDisabledResult() *WebCheckResult
func DefaultPassedResult ¶
func DefaultPassedResult() *WebCheckResult
func DefaultResult ¶
func DefaultResult() *WebCheckResult
func GetAllowedResult ¶
func GetAllowedResult(c *gin.Context) *WebCheckResult
func NewWebCheckResult ¶
func NewWebCheckResult() *WebCheckResult
func (*WebCheckResult) SetAllowedResult ¶
func (self *WebCheckResult) SetAllowedResult(c *gin.Context)
SetAllowedResult 设定校验权限结果
type WebUserId ¶
type WebUserId struct { basedto.BaseEntity *ApiUserResult Id int64 ShopId int64 ShopMemberId int64 ShopName string ShopMemberName string TenantId string JobId int64 AccountId int64 RootShopId int64 Name string EmployeeAccountId int64 ShopMemberShortName string ShopShortName string Station string StationShopId int64 CurrencyId int64 TaxId int64 }
func DefaultWebUserId ¶
func DefaultWebUserId() *WebUserId
func NewWebUserId ¶
func NewWebUserId() *WebUserId
Source Files ¶
- api_user_result.go
- api_user_result_init.go
- sys_menu_entity_init.go
- sys_menu_init.go
- sys_menu_model.go
- sys_user_entity_init.go
- sys_user_init.go
- sys_user_model.go
- web_check_request.go
- web_check_request_init.go
- web_check_res.go
- web_check_res_init.go
- web_check_result.go
- web_check_result_init.go
- web_user_id.go
- web_user_id_init.go
Click to show internal directories.
Click to hide internal directories.