package Models import ( "time" "github.com/gofrs/uuid" ) // Set with User being the requestee, and FriendID being the requester type Friend struct { Base UserID uuid.UUID `gorm:"type:uuid;column:user_id;not null;" json:"user_id"` User User `json:"user"` FriendID []byte `gorm:"not null" json:"friend_id"` // Stored encrypted ThreadID uuid.UUID `gorm:"type:uuid;column:thread_id;not null;" json:"thread_id"` Thread []Message `gorm:"foreignKey:thread_id" json:"-"` AcceptedAt time.Time `json:"accepted_at"` }