Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Permission ¶
type Permission struct { ID int64 `gorm:"column:id;primaryKey"` Name string `gorm:"column:name;unique"` }
func (Permission) TableName ¶
func (Permission) TableName() string
type Role ¶
type Role struct { ID int64 `gorm:"column:id;primaryKey"` Name string `gorm:"column:name;unique"` Permissions []Permission `gorm:"many2many:role_permissions"` }
func (*Role) PermissionNames ¶
type RolePermission ¶
type RolePermission struct { RoleID int64 `gorm:"column:role_id;uniqueIndex:idx_id"` PermissionID int64 `gorm:"column:permission_id;uniqueIndex:idx_id"` }
func (RolePermission) TableName ¶
func (RolePermission) TableName() string
Click to show internal directories.
Click to hide internal directories.