Documentation
¶
Index ¶
- func GetFollowStatusMap(userId uint64, targetUserIds []uint64) map[uint64]bool
- func GetFollowerCount(userId uint64) int64
- func GetFollowerList(userId uint64, page, pageSize int) ([]*users.EntityComplete, int64)
- func GetFollowingCount(userId uint64) int64
- func GetFollowingList(userId uint64, page, pageSize int) ([]*users.EntityComplete, int64)
- func SaveOrCreateById(entity *Entity) int64
- type Entity
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetFollowStatusMap ¶ added in v0.0.7
GetFollowStatusMap 批量获取用户对指定用户列表的关注状态
func GetFollowerCount ¶ added in v0.0.3
func GetFollowerList ¶ added in v0.0.7
func GetFollowerList(userId uint64, page, pageSize int) ([]*users.EntityComplete, int64)
GetFollowerList 获取用户粉丝列表
func GetFollowingCount ¶ added in v0.0.3
func GetFollowingList ¶ added in v0.0.7
func GetFollowingList(userId uint64, page, pageSize int) ([]*users.EntityComplete, int64)
GetFollowingList 获取用户关注列表
func SaveOrCreateById ¶ added in v0.0.3
Types ¶
type Entity ¶
type Entity struct {
Id uint64 `gorm:"primaryKey;column:id;autoIncrement;not null;" json:"id"` //
UserId uint64 `gorm:"column:user_id;type:bigint unsigned;not null;uniqueIndex:uniq_user_follow,priority:1" json:"userId"` // 主体
FollowUserId uint64 `` // 被关注者
/* 136-byte string literal not displayed */
Status int `gorm:"column:status;type:int;not null;default:1;" json:"status"` // 1 关注 0 取消关注
CreatedAt time.Time `gorm:"column:created_at;index;autoCreateTime;<-:create;" json:"createdAt"` //
UpdatedAt time.Time `gorm:"column:updated_at;autoUpdateTime;" json:"updatedAt"`
}
func GetByUserId ¶ added in v0.0.3
Click to show internal directories.
Click to hide internal directories.