2021-04-19 19:42:19 +02: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 18:42:28 +02:00
|
|
|
ID string `pg:"type:CHAR(26),pk,notnull"`
|
2021-04-19 19:42:19 +02: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 16:22:21 +02:00
|
|
|
AccountID string `pg:"type:CHAR(26),notnull"`
|
|
|
|
Account *Account `pg:"rel:has-one"`
|
2021-04-19 19:42:19 +02:00
|
|
|
// Who is targeted by this block?
|
2021-07-11 16:22:21 +02:00
|
|
|
TargetAccountID string `pg:"type:CHAR(26),notnull"`
|
|
|
|
TargetAccount *Account `pg:"rel:has-one"`
|
2021-04-19 19:42:19 +02:00
|
|
|
// Activitypub URI for this block
|
2021-07-11 16:22:21 +02:00
|
|
|
URI string `pg:",notnull"`
|
2021-04-19 19:42:19 +02:00
|
|
|
}
|