🐛 Fixed friendship check
This commit is contained in:
@ -72,21 +72,3 @@ type AccountContact struct {
|
||||
VerifiedAt *time.Time `json:"verified_at"`
|
||||
AccountID uint `json:"account_id"`
|
||||
}
|
||||
|
||||
type FriendshipStatus = int8
|
||||
|
||||
const (
|
||||
FriendshipPending = FriendshipStatus(iota)
|
||||
FriendshipActive
|
||||
FriendshipBlocked
|
||||
)
|
||||
|
||||
type AccountFriendship struct {
|
||||
BaseModel
|
||||
|
||||
AccountID uint `json:"account_id"`
|
||||
RelatedID uint `json:"related_id"`
|
||||
Account Account `json:"account"`
|
||||
Related Account `json:"related"`
|
||||
Status FriendshipStatus `json:"status"`
|
||||
}
|
||||
|
20
pkg/models/friendships.go
Normal file
20
pkg/models/friendships.go
Normal file
@ -0,0 +1,20 @@
|
||||
package models
|
||||
|
||||
type FriendshipStatus = int8
|
||||
|
||||
const (
|
||||
FriendshipPending = FriendshipStatus(iota)
|
||||
FriendshipActive
|
||||
FriendshipBlocked
|
||||
)
|
||||
|
||||
type AccountFriendship struct {
|
||||
BaseModel
|
||||
|
||||
AccountID uint `json:"account_id"`
|
||||
RelatedID uint `json:"related_id"`
|
||||
BlockedBy *uint `json:"blocked_by"`
|
||||
Account Account `json:"account"`
|
||||
Related Account `json:"related"`
|
||||
Status FriendshipStatus `json:"status"`
|
||||
}
|
Reference in New Issue
Block a user