From 4c4a622088ef1db208930deb2d00cd1b2bcd708f Mon Sep 17 00:00:00 2001 From: kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com> Date: Fri, 10 Sep 2021 09:08:21 +0100 Subject: Prune unnecessary nullzeros, fixup db tags (#200) * prune gtsmodel.Account bun tags, add note to gtsmodel dir Signed-off-by: kim (grufwub) * further database tag fixes Signed-off-by: kim (grufwub) * more db tag fixups Signed-off-by: kim (grufwub) * fix removing nullzero for account timestamps... Signed-off-by: kim (grufwub) * add nullzero back to accountid tag Signed-off-by: kim (grufwub) * rename gtsmodel readme Signed-off-by: kim (grufwub) --- internal/gtsmodel/domainblock.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'internal/gtsmodel/domainblock.go') diff --git a/internal/gtsmodel/domainblock.go b/internal/gtsmodel/domainblock.go index 4c72b842a..8490b45bf 100644 --- a/internal/gtsmodel/domainblock.go +++ b/internal/gtsmodel/domainblock.go @@ -28,8 +28,8 @@ type DomainBlock struct { 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 + PrivateComment string `validate:"-" bun:""` // Private comment on this block, viewable to admins + PublicComment string `validate:"-" bun:""` // Public comment on this block, viewable (optionally) by everyone + Obfuscate bool `validate:"-" bun:",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