moderationLog

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 (
	SubjectArticle  = "article"
	SubjectCategory = "category"
	SubjectUser     = "user"
	SubjectSystem   = "system"
)
View Source
const (
	ActionArticleBlocked           = "articleBlocked"
	ActionArticleUnblocked         = "articleUnblocked"
	ActionCategoryModeratorAdded   = "categoryModeratorAdded"
	ActionCategoryModeratorRemoved = "categoryModeratorRemoved"
)

Variables

This section is empty.

Functions

func Create

func Create(entity *Entity) error

Types

type CursorPageQuery

type CursorPageQuery struct {
	Cursor, PageSize uint64
}

type Entity

type Entity struct {
	Id          uint64    `gorm:"primaryKey;column:id;autoIncrement;not null;" json:"id"`
	ActorUserId uint64    `` /* 133-byte string literal not displayed */
	Action      string    `gorm:"column:action;type:varchar(64);not null;default:'';" json:"action"`
	SubjectType string    `` /* 134-byte string literal not displayed */
	SubjectId   uint64    `` /* 127-byte string literal not displayed */
	Payload     Payload   `gorm:"column:payload;type:json;serializer:json" json:"payload"`
	CreatedAt   time.Time `gorm:"column:created_at;autoCreateTime;<-:create;index:idx_moderation_logs_id_desc,priority:1;" json:"createdAt"`
}

func CursorPage

func CursorPage(q CursorPageQuery) []Entity

func (*Entity) TableName

func (itself *Entity) TableName() string

type Payload

type Payload struct {
	MessageCode string         `json:"messageCode"`
	Params      map[string]any `json:"params,omitempty"`
}

Jump to

Keyboard shortcuts

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