2021-04-19 20:42:19 +03: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-06-13 19:42:28 +03:00
|
|
|
ID string `pg:"type:CHAR(26),pk,notnull"`
|
2021-04-19 20:42:19 +03:00
|
|
|
// When was this block created
|
|
|
|
CreatedAt time.Time `pg:"type:timestamp,notnull,default:now()"`
|
|
|
|
// When was this block updated
|
|
|
|
UpdatedAt time.Time `pg:"type:timestamp,notnull,default:now()"`
|
|
|
|
// Who created this block?
|
2021-07-11 17:22:21 +03:00
|
|
|
AccountID string `pg:"type:CHAR(26),notnull"`
|
|
|
|
Account *Account `pg:"rel:has-one"`
|
2021-04-19 20:42:19 +03:00
|
|
|
// Who is targeted by this block?
|
2021-07-11 17:22:21 +03:00
|
|
|
TargetAccountID string `pg:"type:CHAR(26),notnull"`
|
|
|
|
TargetAccount *Account `pg:"rel:has-one"`
|
2021-04-19 20:42:19 +03:00
|
|
|
// Activitypub URI for this block
|
2021-07-11 17:22:21 +03:00
|
|
|
URI string `pg:",notnull"`
|
2021-04-19 20:42:19 +03:00
|
|
|
}
|