moderators

package
v0.2.36 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ScopeGlobal   = "global"
	ScopeCategory = "category"
)
View Source
const (
	StatusDisabled = 0
	StatusEnabled  = 1
)

Variables

This section is empty.

Functions

func Delete

func Delete(entity *Entity) error

func Save

func Save(entity *Entity) error

Types

type Entity

type Entity struct {
	Id        uint64    `gorm:"primaryKey;column:id;autoIncrement;not null;" json:"id"`
	UserId    uint64    `` /* 156-byte string literal not displayed */
	ScopeType string    `` /* 168-byte string literal not displayed */
	ScopeId   uint64    `` /* 159-byte string literal not displayed */
	Status    int       `` /* 150-byte string literal not displayed */
	CreatedBy uint64    `gorm:"column:created_by;type:bigint unsigned;not null;default:0;" json:"createdBy"`
	CreatedAt time.Time `gorm:"column:created_at;autoCreateTime;<-:create;" json:"createdAt"`
	UpdatedAt time.Time `gorm:"column:updated_at;autoUpdateTime;" json:"updatedAt"`
}

func AllEnabled

func AllEnabled() (entities []*Entity)

func Get

func Get(id uint64) (entity Entity)

func GetByCategoryIds

func GetByCategoryIds(categoryIds []uint64) (entities []*Entity)

func GetByUserScope

func GetByUserScope(userId uint64, scopeType string, scopeId uint64) (entity Entity)

func (*Entity) TableName

func (itself *Entity) TableName() string

Jump to

Keyboard shortcuts

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