and yet more

This commit is contained in:
tsmethurst 2021-08-24 19:52:02 +02:00
commit 465aa3da86
34 changed files with 128 additions and 134 deletions

View file

@ -25,15 +25,15 @@ type Follow struct {
// id of this follow in the database
ID string `bun:"type:CHAR(26),pk,notnull,unique"`
// When was this follow created?
CreatedAt time.Time `bun:"type:timestamp,notnull,default:now()"`
CreatedAt time.Time `bun:"type:timestamp,notnull,default:current_timestamp"`
// When was this follow last updated?
UpdatedAt time.Time `bun:"type:timestamp,notnull,default:now()"`
UpdatedAt time.Time `bun:"type:timestamp,notnull,default:current_timestamp"`
// Who does this follow belong to?
AccountID string `bun:"type:CHAR(26),unique:srctarget,notnull"`
Account *Account `bun:"rel:belongs-to"`
Account *Account `bun:"-"`
// Who does AccountID follow?
TargetAccountID string `bun:"type:CHAR(26),unique:srctarget,notnull"`
TargetAccount *Account `bun:"rel:belongs-to"`
TargetAccount *Account `bun:"-"`
// Does this follow also want to see reblogs and not just posts?
ShowReblogs bool `bun:"default:true"`
// What is the activitypub URI of this follow?