Encrypted messaging app
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
399 B

  1. package Models
  2. import (
  3. "time"
  4. "github.com/gofrs/uuid"
  5. )
  6. // Set with User being the requestee, and FriendID being the requester
  7. type Friend struct {
  8. Base
  9. UserID uuid.UUID `gorm:"type:uuid;column:user_id;not null;" json:"user_id"`
  10. User User `json:"user"`
  11. FriendID string `gorm:"not null" json:"friend_id"` // Stored encrypted
  12. AcceptedAt time.Time `json:"accepted_at"`
  13. }