gotosocial/internal/gtsmodel/block.go

21 lines
730 B
Go
Raw Normal View History

package gtsmodel
import "time"
// Block refers to the blocking of one account by another.
type Block struct {
// id of this block in the database
2021-08-24 16:54:54 +02:00
ID string `bun:"type:CHAR(26),pk,notnull"`
// When was this block created
2021-08-24 23:07:14 +02:00
CreatedAt time.Time `bun:",nullzero,notnull,default:current_timestamp"`
// When was this block updated
2021-08-24 23:07:14 +02:00
UpdatedAt time.Time `bun:",nullzero,notnull,default:current_timestamp"`
// Who created this block?
2021-08-24 16:54:54 +02:00
AccountID string `bun:"type:CHAR(26),notnull"`
2021-08-24 23:07:14 +02:00
Account *Account `bun:"rel:belongs-to"`
// Who is targeted by this block?
2021-08-24 16:54:54 +02:00
TargetAccountID string `bun:"type:CHAR(26),notnull"`
2021-08-24 23:07:14 +02:00
TargetAccount *Account `bun:"rel:belongs-to"`
// Activitypub URI for this block
2021-08-24 16:54:54 +02:00
URI string `bun:",notnull"`
}