From a8abfb22197abf973fbe78a06bdaff818ecfdcb9 Mon Sep 17 00:00:00 2001 From: mStar Date: Thu, 7 Nov 2024 10:49:03 +0100 Subject: [PATCH] Add follow requests to db TODO: Add functions for it --- storage/followRequests.go | 10 ++++++++++ storage/storage.go | 1 + 2 files changed, 11 insertions(+) create mode 100644 storage/followRequests.go diff --git a/storage/followRequests.go b/storage/followRequests.go new file mode 100644 index 0000000..71add15 --- /dev/null +++ b/storage/followRequests.go @@ -0,0 +1,10 @@ +package storage + +import "time" + +type FollowRequest struct { + ID uint `gorm:"primarykey"` + CreatedAt time.Time + FromId string + ToId string +} diff --git a/storage/storage.go b/storage/storage.go index 8438b18..5584782 100644 --- a/storage/storage.go +++ b/storage/storage.go @@ -49,6 +49,7 @@ func NewStorage(dbUrl string, cache *cache.Cache) (*Storage, error) { AccessToken{}, Emote{}, UserInfoField{}, + FollowRequest{}, ) if err != nil { return nil, fmt.Errorf("failed to apply migrations: %w", err)