Documentation
¶
Index ¶
- func DecrementUserPost(topicId, userId uint64) error
- func IncrementUserPost(topicId, userId uint64) error
- func IncrementUserPostWithDB(db *gorm.DB, topicId, userId uint64) error
- func SaveOrCreateById(entity *Entity) int64
- func SyncTopicPosters(topicId uint64) []uint64
- func SyncTopicPostersWithDB(db *gorm.DB, topicId uint64) ([]uint64, error)
- type Entity
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecrementUserPost ¶
func IncrementUserPost ¶
func IncrementUserPostWithDB ¶ added in v0.2.61
func SaveOrCreateById ¶
func SyncTopicPosters ¶
Types ¶
type Entity ¶
type Entity struct {
Id uint64 `gorm:"primaryKey;column:id;autoIncrement;not null;" json:"id"`
TopicId uint64 `` /* 144-byte string literal not displayed */
UserId uint64 `gorm:"column:user_id;type:bigint unsigned;not null;uniqueIndex:idx_topic_user,priority:2" json:"userId"`
ReplyCount uint32 `gorm:"column:reply_count;type:int unsigned;not null;default:0;index:idx_active_topic_user,priority:2" json:"replyCount"`
LastReplyAt time.Time `` /* 134-byte string literal not displayed */
CreatedAt time.Time `gorm:"column:created_at;autoCreateTime;<-:create;" json:"createdAt"`
UpdatedAt time.Time `gorm:"column:updated_at;autoUpdateTime;" json:"updatedAt"`
}
Click to show internal directories.
Click to hide internal directories.