diff options
author | 2021-08-31 15:59:12 +0200 | |
---|---|---|
committer | 2021-09-01 11:11:26 +0200 | |
commit | 2786b5f88742c3f32b8ed497df3737cb4f57caec (patch) | |
tree | c088b71b228a52fb3bbf37628caea82ff7a42067 /internal/gtsmodel/notification.go | |
parent | go fmt (diff) | |
download | gotosocial-2786b5f88742c3f32b8ed497df3737cb4f57caec.tar.xz |
change muchos things
Diffstat (limited to 'internal/gtsmodel/notification.go')
-rw-r--r-- | internal/gtsmodel/notification.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/internal/gtsmodel/notification.go b/internal/gtsmodel/notification.go index 94eaa8c4a..bb69bc8d4 100644 --- a/internal/gtsmodel/notification.go +++ b/internal/gtsmodel/notification.go @@ -23,7 +23,7 @@ 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:"ulid" bun:"type:CHAR(26),pk,nullzero,notnull,unique"` // id of this item in the database - CreatedAt time.Time `validate:"required" bun:",nullzero,notnull,default:current_timestamp"` // when was item created + CreatedAt time.Time `validate:"-" bun:",nullzero,notnull,default:current_timestamp"` // 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? @@ -37,6 +37,7 @@ type Notification struct { // NotificationType describes the reason/type of this notification. type NotificationType string +// Notification Types const ( NotificationFollow NotificationType = "follow" // NotificationFollow -- someone followed you NotificationFollowRequest NotificationType = "follow_request" // NotificationFollowRequest -- someone requested to follow you |