more fiddling

This commit is contained in:
tsmethurst 2021-08-17 19:03:41 +02:00
commit a3322b2bf3
65 changed files with 712 additions and 508 deletions

View file

@ -26,16 +26,19 @@ type Mention struct {
ID string `pg:"type:CHAR(26),pk,notnull,unique"`
// ID of the status this mention originates from
StatusID string `pg:"type:CHAR(26),notnull"`
Status *Status `pg:"rel:belongs-to"`
// When was this mention created?
CreatedAt time.Time `pg:"type:timestamp,notnull,default:now()"`
// When was this mention last updated?
UpdatedAt time.Time `pg:"type:timestamp,notnull,default:now()"`
// What's the internal account ID of the originator of the mention?
OriginAccountID string `pg:"type:CHAR(26),notnull"`
OriginAccount *Account `pg:"rel:has-one"`
// What's the AP URI of the originator of the mention?
OriginAccountURI string `pg:",notnull"`
// What's the internal account ID of the mention target?
TargetAccountID string `pg:"type:CHAR(26),notnull"`
TargetAccount *Account `pg:"rel:has-one"`
// Prevent this mention from generating a notification?
Silent bool
@ -52,14 +55,14 @@ type Mention struct {
//
// This will not be put in the database, it's just for convenience.
NameString string `pg:"-"`
// MentionedAccountURI is the AP ID (uri) of the user mentioned.
// TargetAccountURI is the AP ID (uri) of the user mentioned.
//
// This will not be put in the database, it's just for convenience.
MentionedAccountURI string `pg:"-"`
// MentionedAccountURL is the web url of the user mentioned.
TargetAccountURI string `pg:"-"`
// TargetAccountURL is the web url of the user mentioned.
//
// This will not be put in the database, it's just for convenience.
MentionedAccountURL string `pg:"-"`
TargetAccountURL string `pg:"-"`
// A pointer to the gtsmodel account of the mentioned account.
GTSAccount *Account `pg:"-"`
}