summaryrefslogtreecommitdiff
path: root/internal/gtsmodel/mention.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/gtsmodel/mention.go')
-rw-r--r--internal/gtsmodel/mention.go28
1 files changed, 14 insertions, 14 deletions
diff --git a/internal/gtsmodel/mention.go b/internal/gtsmodel/mention.go
index 9ad9204eb..fb7f3b51a 100644
--- a/internal/gtsmodel/mention.go
+++ b/internal/gtsmodel/mention.go
@@ -24,17 +24,17 @@ import (
// Mention refers to the 'tagging' or 'mention' of a user within a status.
type Mention 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: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
- StatusID string `validate:"required,ulid" bun:"type:CHAR(26),nullzero,notnull"` // ID of the status this mention originates from
- Status *Status `validate:"-" bun:"rel:belongs-to"` // status referred to by statusID
- OriginAccountID string `validate:"required,ulid" bun:"type:CHAR(26),nullzero,notnull"` // ID of the mention creator account
- OriginAccountURI string `validate:"url" bun:",nullzero,notnull"` // ActivityPub URI of the originator/creator of the mention
- OriginAccount *Account `validate:"-" bun:"rel:belongs-to"` // account referred to by originAccountID
- TargetAccountID string `validate:"required,ulid" bun:"type:CHAR(26),nullzero,notnull"` // Mention target/receiver account ID
- TargetAccount *Account `validate:"-" bun:"rel:belongs-to"` // account referred to by targetAccountID
- Silent *bool `validate:"-" bun:",nullzero,notnull,default:false"` // Prevent this mention from generating a notification?
+ ID string `bun:"type:CHAR(26),pk,nullzero,notnull,unique"` // id of this item in the database
+ CreatedAt time.Time `bun:"type:timestamptz,nullzero,notnull,default:current_timestamp"` // when was item created
+ UpdatedAt time.Time `bun:"type:timestamptz,nullzero,notnull,default:current_timestamp"` // when was item last updated
+ StatusID string `bun:"type:CHAR(26),nullzero,notnull"` // ID of the status this mention originates from
+ Status *Status `bun:"rel:belongs-to"` // status referred to by statusID
+ OriginAccountID string `bun:"type:CHAR(26),nullzero,notnull"` // ID of the mention creator account
+ OriginAccountURI string `bun:",nullzero,notnull"` // ActivityPub URI of the originator/creator of the mention
+ OriginAccount *Account `bun:"rel:belongs-to"` // account referred to by originAccountID
+ TargetAccountID string `bun:"type:CHAR(26),nullzero,notnull"` // Mention target/receiver account ID
+ TargetAccount *Account `bun:"rel:belongs-to"` // account referred to by targetAccountID
+ Silent *bool `bun:",nullzero,notnull,default:false"` // Prevent this mention from generating a notification?
/*
NON-DATABASE CONVENIENCE FIELDS
@@ -48,15 +48,15 @@ type Mention struct {
// @whatever_username@example.org
//
// This will not be put in the database, it's just for convenience.
- NameString string `validate:"-" bun:"-"`
+ NameString string `bun:"-"`
// TargetAccountURI is the AP ID (uri) of the user mentioned.
//
// This will not be put in the database, it's just for convenience.
- TargetAccountURI string `validate:"-" bun:"-"`
+ TargetAccountURI string `bun:"-"`
// TargetAccountURL is the web url of the user mentioned.
//
// This will not be put in the database, it's just for convenience.
- TargetAccountURL string `validate:"-" bun:"-"`
+ TargetAccountURL string `bun:"-"`
// A pointer to the gtsmodel account of the mentioned account.
}