26 lines
686 B
Go
26 lines
686 B
Go
package core
|
|
|
|
import (
|
|
"go.mongodb.org/mongo-driver/bson/primitive"
|
|
"repositories.action2quare.com/ayo/gocommon"
|
|
)
|
|
|
|
const (
|
|
block_collection_name = gocommon.CollectionName("block")
|
|
friends_collection_name = gocommon.CollectionName("friend")
|
|
invitation_collection_name = gocommon.CollectionName("invitation")
|
|
)
|
|
|
|
var friend_state_tag = []string{"social.FriendState"}
|
|
var invitations_tag = []string{"social.Invitations"}
|
|
var friends_tag = []string{"social.Friends"}
|
|
var blocks_tag = []string{"social.Blocks"}
|
|
|
|
func stringsToObjs(in []any) (out []primitive.ObjectID) {
|
|
for _, i := range in {
|
|
p, _ := primitive.ObjectIDFromHex(i.(string))
|
|
out = append(out, p)
|
|
}
|
|
return
|
|
}
|