Documentation
¶
Index ¶
- func ListActiveWatchUserIDsAfter(topicId, afterUserId uint64, excludeUserIds []uint64, limit int) []uint64
- func SaveOrCreateById(entity *Entity) int64
- func SetBookmarked(userId, topicId uint64, bookmarked bool) bool
- func SetBookmarkedAt(userId, topicId uint64, bookmarkedAt *time.Time) bool
- func SetLiked(userId, topicId uint64, liked bool) bool
- func SetLikedAt(userId, topicId uint64, likedAt *time.Time) bool
- func SetWatched(userId, topicId uint64, watched bool) bool
- func SetWatchedAt(userId, topicId uint64, watchedAt *time.Time) bool
- type Entity
- type LikedTopicRef
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SaveOrCreateById ¶
func SetBookmarked ¶
func SetWatched ¶
Types ¶
type Entity ¶
type Entity struct {
Id uint64 `gorm:"primaryKey;column:id;autoIncrement;not null;index:idx_tua_user_id,priority:2" json:"id"`
UserId uint64 `` /* 267-byte string literal not displayed */
TopicId uint64 `` /* 161-byte string literal not displayed */
LikedAt *time.Time `gorm:"column:liked_at" json:"likedAt"`
BookmarkedAt *time.Time `gorm:"column:bookmarked_at;index:idx_tua_user_bookmark,priority:2" json:"bookmarkedAt"`
WatchedAt *time.Time `gorm:"column:watched_at;index:idx_tua_user_watch,priority:2;index:idx_tua_watch_notify,priority:3" json:"watchedAt"`
CreatedAt time.Time `gorm:"column:created_at;autoCreateTime;<-:create" json:"createdAt"`
UpdatedAt time.Time `gorm:"column:updated_at;autoUpdateTime" json:"updatedAt"`
}
func GetByTopicId ¶
type LikedTopicRef ¶
type LikedTopicRef struct {
ID uint64 `gorm:"column:id"`
TopicID uint64 `gorm:"column:topic_id"`
LikedAt time.Time `gorm:"column:liked_at"`
}
func ListLikedTopicRefsBefore ¶
func ListLikedTopicRefsBefore(userId uint64, cursor string, limit int) ([]LikedTopicRef, string)
func ListLikedTopicRefsBeforeForAudience ¶ added in v0.2.61
Click to show internal directories.
Click to hide internal directories.