topicCategoryIndex

package
v0.2.49 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteByTopicId

func DeleteByTopicId(topicId uint64) int64

func ReplaceTopicCategories

func ReplaceTopicCategories(topicId uint64, categoryIDs []uint64) error

func SaveOrCreateById

func SaveOrCreateById(entity *Entity) int64

Types

type Entity

type Entity struct {
	Id         uint64    `gorm:"primaryKey;column:id;autoIncrement;not null;" json:"id"`
	TopicId    uint64    `` /* 175-byte string literal not displayed */
	CategoryId uint64    `` /* 169-byte string literal not displayed */
	Effective  int       `gorm:"column:effective;type:int;not null;default:0;index:idx_topic_category_effective,priority:1;" json:"effective"`
	CreatedAt  time.Time `gorm:"column:created_at;autoCreateTime;<-:create;" json:"createdAt"`
	UpdatedAt  time.Time `gorm:"column:updated_at;autoUpdateTime;" json:"updatedAt"`
}

func GetByTopicId

func GetByTopicId(topicId uint64) (entities []*Entity)

func GetOneByCategoryId

func GetOneByCategoryId(categoryId 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