//Followings list the latest `limit` following users from offset `start`
Followings list the latest `limit` following users from offset `start`
// Followings list the latest ` limit ` following users from offset ` start `
func (user *User) Followings(start, limit int64) ([]User, error) {
	aids := cache.RedisClient.ZRevRange(cache.UserFollowingsKey(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 ) Followings ( start , limit int64 ) ( [ ] User , error ) { aids := cache . RedisClient . ZRevRange ( cache . UserFollowingsKey ( 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 }
Followings list the latest `limit` following users from offset `start`
Followings list the latest ` limit ` following users from offset ` start `