summaryrefslogtreecommitdiff
path: root/internal/gtsmodel/account.go
diff options
context:
space:
mode:
authorLibravatar Tobi Smethurst <31960611+tsmethurst@users.noreply.github.com>2021-06-13 18:42:28 +0200
committerLibravatar GitHub <noreply@github.com>2021-06-13 18:42:28 +0200
commitb4288f3c47a9ff9254b933dcb9ee7274d4a4135c (patch)
tree3fe1bb1ab8d4b8c5d9a83df708e5088f35c3150a /internal/gtsmodel/account.go
parentTidy + timeline embetterment (#38) (diff)
downloadgotosocial-b4288f3c47a9ff9254b933dcb9ee7274d4a4135c.tar.xz
Timeline manager (#40)
* start messing about with timeline manager * i have no idea what i'm doing * i continue to not know what i'm doing * it's coming along * bit more progress * update timeline with new posts as they come in * lint and fmt * Select accounts where empty string * restructure a bunch, get unfaves working * moving stuff around * federate status deletes properly * mention regex better but not 100% there * fix regex * some more hacking away at the timeline code phew * fix up some little things * i can't even * more timeline stuff * move to ulid * fiddley * some lil fixes for kibou compatibility * timelines working pretty alright! * tidy + lint
Diffstat (limited to 'internal/gtsmodel/account.go')
-rw-r--r--internal/gtsmodel/account.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/internal/gtsmodel/account.go b/internal/gtsmodel/account.go
index 04eb58e8c..ba9963ac6 100644
--- a/internal/gtsmodel/account.go
+++ b/internal/gtsmodel/account.go
@@ -33,8 +33,8 @@ type Account struct {
BASIC INFO
*/
- // id of this account in the local database; the end-user will never need to know this, it's strictly internal
- ID string `pg:"type:uuid,default:gen_random_uuid(),pk,notnull,unique"`
+ // id of this account in the local database
+ ID string `pg:"type:CHAR(26),pk,notnull,unique"`
// Username of the account, should just be a string of [a-z0-9_]. Can be added to domain to create the full username in the form ``[username]@[domain]`` eg., ``user_96@example.org``
Username string `pg:",notnull,unique:userdomain"` // username and domain should be unique *with* each other
// Domain of the account, will be null if this is a local account, otherwise something like ``example.org`` or ``mastodon.social``. Should be unique with username.
@@ -45,11 +45,11 @@ type Account struct {
*/
// ID of the avatar as a media attachment
- AvatarMediaAttachmentID string
+ AvatarMediaAttachmentID string `pg:"type:CHAR(26)"`
// For a non-local account, where can the header be fetched?
AvatarRemoteURL string
// ID of the header as a media attachment
- HeaderMediaAttachmentID string
+ HeaderMediaAttachmentID string `pg:"type:CHAR(26)"`
// 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.
@@ -61,7 +61,7 @@ type Account struct {
// Is this a memorial account, ie., has the user passed away?
Memorial bool
// This account has moved this account id in the database
- MovedToAccountID string
+ MovedToAccountID string `pg:"type:CHAR(26)"`
// When was this account created?
CreatedAt time.Time `pg:"type:timestamp,notnull,default:now()"`
// When was this account last updated?