summaryrefslogtreecommitdiff
path: root/internal/gtsmodel/notification.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2021-09-20 17:41:52 +0200
committerLibravatar GitHub <noreply@github.com>2021-09-20 17:41:52 +0200
commitc7c9fff730d68bcddcd9d43614f744e91e1dd966 (patch)
treee689ab0bc13adcb945d56a083a79f8e6f9a12559 /internal/gtsmodel/notification.go
parentUpdate webfingering a little, add tests (#236) (diff)
downloadgotosocial-c7c9fff730d68bcddcd9d43614f744e91e1dd966.tar.xz
use timestamptz instead of timestamp (#237)
Diffstat (limited to 'internal/gtsmodel/notification.go')
-rw-r--r--internal/gtsmodel/notification.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/gtsmodel/notification.go b/internal/gtsmodel/notification.go
index 1b1f39a77..013e8ba35 100644
--- a/internal/gtsmodel/notification.go
+++ b/internal/gtsmodel/notification.go
@@ -23,8 +23,8 @@ import "time"
// Notification models an alert/notification sent to an account about something like a reblog, like, new follow request, etc.
type Notification struct {
ID string `validate:"required,ulid" bun:"type:CHAR(26),pk,nullzero,notnull,unique"` // id of this item in the database
- CreatedAt time.Time `validate:"-" bun:"type:timestamp,nullzero,notnull,default:current_timestamp"` // when was item created
- UpdatedAt time.Time `validate:"-" bun:"type:timestamp,nullzero,notnull,default:current_timestamp"` // when was item last updated // when was item created
+ CreatedAt time.Time `validate:"-" bun:"type:timestamptz,nullzero,notnull,default:current_timestamp"` // when was item created
+ UpdatedAt time.Time `validate:"-" bun:"type:timestamptz,nullzero,notnull,default:current_timestamp"` // when was item last updated // when was item created
NotificationType NotificationType `validate:"oneof=follow follow_request mention reblog favourite poll status" bun:",nullzero,notnull"` // Type of this notification
TargetAccountID string `validate:"ulid" bun:"type:CHAR(26),nullzero,notnull"` // Which account does this notification target (ie., who will receive the notification?)
TargetAccount *Account `validate:"-" bun:"rel:belongs-to"` // Which account performed the action that created this notification?