//Followers list the latest `limit` followers from offset `start`
Followers list the latest `limit` followers from offset `start`
// Followers list the latest ` limit ` followers from offset ` start `
func (user *User) Followers(start, limit int64) ([]User, error) {
	aids := cache.RedisClient.ZRevRange(cache.UserFollowersKey(user.ID), start, start+limit).Val()
	var users []User
	if err := DB.Where("id in (?)", aids).Find(&users).Error; err != nil {
		return nil, err
	}
	return users, nil
}
func ( user * User ) Followers ( start , limit int64 ) ( [ ] User , error ) { aids := cache . RedisClient . ZRevRange ( cache . UserFollowersKey ( user . ID ) , start , start + limit ) . Val ( ) var users [ ] User if err := DB . Where ( " " , aids ) . Find ( & users ) . Error ; err != nil { return nil , err } return users , nil }
Followers list the latest `limit` followers from offset `start`
Followers list the latest ` limit ` followers from offset ` start `