Passport/pkg/authkit/models/relationships.go

24 lines
535 B
Go
Raw Permalink Normal View History

package models
import "gorm.io/datatypes"
type RelationshipStatus = int8
const (
RelationshipPending = RelationshipStatus(iota)
RelationshipFriend
RelationshipBlocked
2024-07-23 15:50:05 +00:00
RelationshipWaiting
)
type AccountRelationship struct {
BaseModel
AccountID uint `json:"account_id"`
RelatedID uint `json:"related_id"`
Account Account `json:"account"`
Related Account `json:"related"`
Status RelationshipStatus `json:"status"`
PermNodes datatypes.JSONMap `json:"perm_nodes"`
}