models

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2026 License: Apache-2.0 Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EnableActionBundle

type EnableActionBundle struct {
	EnableId       string `gorm:"type:varchar(50);primary_key"`
	BindId         string `gorm:"type:varchar(50);not null"`
	ActionBundleId string `gorm:"type:varchar(50);not null"`

	CreateTime time.Time
}

func NewEnableActionBundle

func NewEnableActionBundle(bindId, actionBundleId string) *EnableActionBundle

type ModuleApi

type ModuleApi struct {
	ApiId string `gorm:"type:varchar(50);primary_key"`

	ModuleId   string `gorm:"type:varchar(50);not null"`
	ModuleName string `gorm:"type:varchar(50);not null"`

	FeatureId   string `gorm:"type:varchar(50);not null"`
	FeatureName string `gorm:"type:varchar(50);not null"`

	ActionBundleId   string `gorm:"type:varchar(50);not null"`
	ActionBundleName string `gorm:"type:varchar(50);not null"`

	ApiMethod      string `gorm:"type:varchar(50);not null"`
	ApiDescription string `gorm:"type:varchar(100);not null"`

	UrlMethod string `gorm:"type:varchar(100);not null"`
	Url       string `gorm:"type:varchar(255);not null"`

	GlobalAdminActionBundleVisibility bool
	IsvActionBundleVisibility         bool
	UserActionBundleVisibility        bool
}

func UniqueModuleApis

func UniqueModuleApis(moduleApis []*ModuleApi) []*ModuleApi

type Role

type Role struct {
	RoleId      string `gorm:"type:varchar(50);primary_key"`
	RoleName    string `gorm:"type:varchar(200);not null"`
	Description string `gorm:"type:varchar(200)"`
	Portal      string `gorm:"type:varchar(50);not null"`
	Owner       string `gorm:"type:varchar(50)"`
	OwnerPath   string `gorm:"type:varchar(50)"`
	Status      string `gorm:"type:varchar(50)"`
	Controller  string `gorm:"type:varchar(50)"`

	CreateTime time.Time
	UpdateTime time.Time
	StatusTime time.Time
}

func NewRole

func NewRole(roleName, description, portal, owner, ownerPath string) *Role

func UniqueRoles

func UniqueRoles(roles []*Role) []*Role

func (*Role) ToPB

func (p *Role) ToPB() *pb.Role

type RoleModuleBinding

type RoleModuleBinding struct {
	BindId     string `gorm:"type:varchar(50);primary_key"`
	RoleId     string `gorm:"type:varchar(50);not null"`
	ModuleId   string `gorm:"type:varchar(50);not null"`
	DataLevel  string `gorm:"type:varchar(50);not null"`
	IsCheckAll bool

	CreateTime time.Time
}

func NewRoleModuleBinding

func NewRoleModuleBinding(roleId, moduleId, dataLevel string, isCheckAll bool) *RoleModuleBinding

type RoleWithUser

type RoleWithUser struct {
	Role    *Role
	UserIds []string
}

func (*RoleWithUser) ToPB

func (p *RoleWithUser) ToPB() *pb.RoleWithUser

type UserRoleBinding

type UserRoleBinding struct {
	Id         string    `gorm:"type:varchar(50);primary_key"`
	UserId     string    `gorm:"type:varchar(50);"`
	RoleId     string    `gorm:"type:varchar(50);"`
	CreateTime time.Time `gorm:"default CURRENT_TIMESTAMP"`
}

func NewUserRoleBinding

func NewUserRoleBinding(userId, roleId string) *UserRoleBinding

Jump to

Keyboard shortcuts

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