2021-04-19 17:42:19 +00:00
|
|
|
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-25 13:34:33 +00:00
|
|
|
ID string `bun:"type:CHAR(26),pk,notnull"`
|
2021-04-19 17:42:19 +00:00
|
|
|
// When was this block created
|
2021-08-25 13:34:33 +00:00
|
|
|
CreatedAt time.Time `bun:",nullzero,notnull,default:current_timestamp"`
|
2021-04-19 17:42:19 +00:00
|
|
|
// When was this block updated
|
2021-08-25 13:34:33 +00:00
|
|
|
UpdatedAt time.Time `bun:",nullzero,notnull,default:current_timestamp"`
|
2021-04-19 17:42:19 +00:00
|
|
|
// Who created this block?
|
2021-08-25 13:34:33 +00:00
|
|
|
AccountID string `bun:"type:CHAR(26),notnull"`
|
|
|
|
Account *Account `bun:"rel:belongs-to"`
|
2021-04-19 17:42:19 +00:00
|
|
|
// Who is targeted by this block?
|
2021-08-25 13:34:33 +00:00
|
|
|
TargetAccountID string `bun:"type:CHAR(26),notnull"`
|
|
|
|
TargetAccount *Account `bun:"rel:belongs-to"`
|
2021-04-19 17:42:19 +00:00
|
|
|
// Activitypub URI for this block
|
2021-08-25 13:34:33 +00:00
|
|
|
URI string `bun:",notnull"`
|
2021-04-19 17:42:19 +00:00
|
|
|
}
|