action_plugin

package
v0.0.0-...-ea214e1 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const ActionFavorite = "favorite"
View Source
const ActionFollow = "follow"
View Source
const ActionLike = "like"

Variables

This section is empty.

Functions

func ToggleAction

func ToggleAction(userId int64, action string, relation RelationModel) (int64, error)

relation 被关注/收藏/点赞的对象 userId 谁发起了这个动作

Types

type Action

type Action struct {
	Id int64

	UserId     int64
	Action     string
	TargetType string
	TargetId   int64

	CreatedAt time.Time
	UpdatedAt time.Time
}

func (Action) TableName

func (a Action) TableName() string

type RelationModel

type RelationModel interface {
	RelId() int64
	RelType() string
}

Jump to

Keyboard shortcuts

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