From 4696e1a7b389599fa981f334b343daa911b11f5d Mon Sep 17 00:00:00 2001 From: tsmethurst Date: Wed, 1 Sep 2021 18:29:25 +0200 Subject: moving stuff around --- internal/gtsmodel/domainblock.go | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'internal/gtsmodel/domainblock.go') diff --git a/internal/gtsmodel/domainblock.go b/internal/gtsmodel/domainblock.go index dd05ef0c6..4c72b842a 100644 --- a/internal/gtsmodel/domainblock.go +++ b/internal/gtsmodel/domainblock.go @@ -22,14 +22,14 @@ import "time" // DomainBlock represents a federation block against a particular domain type DomainBlock struct { - ID string `validate:"required,ulid" bun:"type:CHAR(26),pk,nullzero,notnull,unique"` // id of this item in the database - CreatedAt time.Time `validate:"-" bun:",nullzero,notnull,default:current_timestamp"` // when was item created - UpdatedAt time.Time `validate:"-" bun:",nullzero,notnull,default:current_timestamp"` // when was item last updated - Domain string `validate:"required,fqdn" bun:",nullzero,notnull"` // domain to block. Eg. 'whatever.com' - CreatedByAccountID string `validate:"required,ulid" bun:"type:CHAR(26),nullzero,notnull"` // Account ID of the creator of this block - CreatedByAccount *Account `validate:"-" bun:"rel:belongs-to"` // Account corresponding to createdByAccountID - PrivateComment string `validate:"-" bun:",nullzero"` // Private comment on this block, viewable to admins - PublicComment string `validate:"-" bun:",nullzero"` // Public comment on this block, viewable (optionally) by everyone - Obfuscate bool `validate:"-" bun:",nullzero,default:false"` // whether the domain name should appear obfuscated when displaying it publicly - SubscriptionID string `validate:"omitempty,ulid" bun:"type:CHAR(26),nullzero"` // if this block was created through a subscription, what's the subscription ID? + ID string `validate:"required,ulid" bun:"type:CHAR(26),pk,nullzero,notnull,unique"` // id of this item in the database + CreatedAt time.Time `validate:"-" bun:"type:timestamp,nullzero,notnull,default:current_timestamp"` // when was item created + UpdatedAt time.Time `validate:"-" bun:"type:timestamp,nullzero,notnull,default:current_timestamp"` // when was item last updated + Domain string `validate:"required,fqdn" bun:",nullzero,notnull"` // domain to block. Eg. 'whatever.com' + CreatedByAccountID string `validate:"required,ulid" bun:"type:CHAR(26),nullzero,notnull"` // Account ID of the creator of this block + CreatedByAccount *Account `validate:"-" bun:"rel:belongs-to"` // Account corresponding to createdByAccountID + PrivateComment string `validate:"-" bun:",nullzero"` // Private comment on this block, viewable to admins + PublicComment string `validate:"-" bun:",nullzero"` // Public comment on this block, viewable (optionally) by everyone + Obfuscate bool `validate:"-" bun:",nullzero,default:false"` // whether the domain name should appear obfuscated when displaying it publicly + SubscriptionID string `validate:"omitempty,ulid" bun:"type:CHAR(26),nullzero"` // if this block was created through a subscription, what's the subscription ID? } -- cgit v1.2.3