reports

package
v0.2.57 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TargetTopic = "topic"
	TargetPost  = "post"
)
View Source
const (
	ReasonSpam       = "spam"
	ReasonAbuse      = "abuse"
	ReasonIllegal    = "illegal"
	ReasonIrrelevant = "irrelevant"
	ReasonOther      = "other"
)
View Source
const (
	StatusOpen     = "open"
	StatusResolved = "resolved"
	StatusRejected = "rejected"
)
View Source
const (
	ResolutionBanned  = "banned"
	ResolutionIgnored = "ignored"
)

Variables

This section is empty.

Functions

func UpdateStatus

func UpdateStatus(id uint64, status string, resolution string, handlerId uint64) error

Types

type CursorPageQuery

type CursorPageQuery struct {
	TargetType       string
	Status           string
	Statuses         []string
	ScopeCategoryIDs []uint64
	Cursor, PageSize uint64
}

type Entity

type Entity struct {
	Id         uint64     `` /* 165-byte string literal not displayed */
	TargetType string     `` /* 169-byte string literal not displayed */
	TargetId   uint64     `` /* 168-byte string literal not displayed */
	TopicId    uint64     `gorm:"column:topic_id;type:bigint unsigned;not null;default:0;index:idx_reports_status_topic_id,priority:2;" json:"topicId"`
	ReporterId uint64     `` /* 136-byte string literal not displayed */
	Reason     string     `gorm:"column:reason;type:varchar(32);not null;default:'';" json:"reason"`
	Note       string     `gorm:"column:note;type:varchar(300);not null;default:'';" json:"note"`
	Status     string     `` /* 212-byte string literal not displayed */
	Resolution string     `gorm:"column:resolution;type:varchar(32);not null;default:'';" json:"resolution"`
	HandlerId  uint64     `gorm:"column:handler_id;type:bigint unsigned;not null;default:0;" json:"handlerId"`
	HandledAt  *time.Time `gorm:"column:handled_at;" json:"handledAt"`
	CreatedAt  time.Time  `gorm:"column:created_at;autoCreateTime;<-:create;" json:"createdAt"`
	UpdatedAt  time.Time  `gorm:"column:updated_at;autoUpdateTime;" json:"updatedAt"`
}

func CreateOpen

func CreateOpen(entity Entity) (Entity, bool, error)

func CursorPage

func CursorPage(q CursorPageQuery) []Entity

func Get

func Get(id 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