summaryrefslogtreecommitdiff
path: root/internal/gtsmodel/account.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2021-08-20 12:26:56 +0200
committerLibravatar GitHub <noreply@github.com>2021-08-20 12:26:56 +0200
commit4920229a3b6e1d7dde536bc9ff766542b05d935c (patch)
treea9423beccec5331c372f01eedf38949dfb171e9e /internal/gtsmodel/account.go
parentText/status parsing fixes (#141) (diff)
downloadgotosocial-4920229a3b6e1d7dde536bc9ff766542b05d935c.tar.xz
Database updates (#144)
* start moving some database stuff around * continue moving db stuff around * more fiddling * more updates * and some more * and yet more * i broke SOMETHING but what, it's a mystery * tidy up * vendor ttlcache * use ttlcache * fix up some tests * rename some stuff * little reminder * some more updates
Diffstat (limited to 'internal/gtsmodel/account.go')
-rw-r--r--internal/gtsmodel/account.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/internal/gtsmodel/account.go b/internal/gtsmodel/account.go
index e560601b8..435caea6d 100644
--- a/internal/gtsmodel/account.go
+++ b/internal/gtsmodel/account.go
@@ -45,11 +45,13 @@ type Account struct {
*/
// ID of the avatar as a media attachment
- AvatarMediaAttachmentID string `pg:"type:CHAR(26)"`
+ AvatarMediaAttachmentID string `pg:"type:CHAR(26)"`
+ AvatarMediaAttachment *MediaAttachment `pg:"rel:has-one"`
// For a non-local account, where can the header be fetched?
AvatarRemoteURL string
// ID of the header as a media attachment
- HeaderMediaAttachmentID string `pg:"type:CHAR(26)"`
+ HeaderMediaAttachmentID string `pg:"type:CHAR(26)"`
+ HeaderMediaAttachment *MediaAttachment `pg:"rel:has-one"`
// For a non-local account, where can the header be fetched?
HeaderRemoteURL string
// DisplayName for this account. Can be empty, then just the Username will be used for display purposes.