dao

package
v0.0.0-...-55e1567 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 24, 2023 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Follow

type Follow struct {
	// contains filtered or unexported fields
}

func NewFollow

func NewFollow(db *gorm.DB) *Follow

NewFollow create a social follow dao.

func (*Follow) CreateFollow

func (f *Follow) CreateFollow(follow *model.Follow) error

CreateFollow creates a follow record.

func (*Follow) FindRecord

func (f *Follow) FindRecord(userId, followerId int64) (*model.Follow, error)

FindRecord to find if there's a record between user and another user.

func (*Follow) GetFollowIdList

func (f *Follow) GetFollowIdList(userId int64) ([]int64, error)

GetFollowIdList gets followingId list.

func (*Follow) GetFollowNumsByUserId

func (f *Follow) GetFollowNumsByUserId(userId int64) (int64, error)

GetFollowNumsByUserId gets following nums by userId.

func (*Follow) GetFollowerIdList

func (f *Follow) GetFollowerIdList(userId int64) ([]int64, error)

GetFollowerIdList gets followerId list.

func (*Follow) GetFollowerNumsByUserId

func (f *Follow) GetFollowerNumsByUserId(userId int64) (int64, error)

GetFollowerNumsByUserId gets follower nums by userId.

func (*Follow) GetFriendsList

func (f *Follow) GetFriendsList(userId int64) ([]int64, error)

GetFriendsList gets friends list.

func (*Follow) UpdateFollow

func (f *Follow) UpdateFollow(userId, followId int64, actionType int8) error

UpdateFollow to update follow status.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL