Passport/pkg/internal/models/relationships.go
LittleSheep a8d919dc5b ♻️ Refactored relation system
⬆️ Support new realm & relation api
2024-07-16 00:02:28 +08:00

23 lines
514 B
Go

package models
import "gorm.io/datatypes"
type RelationshipStatus = int8
const (
RelationshipPending = RelationshipStatus(iota)
RelationshipFriend
RelationshipBlocked
)
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"`
}