summaryrefslogtreecommitdiff
path: root/internal/gtsmodel/instance.go
diff options
context:
space:
mode:
authorLibravatar kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com>2021-09-10 09:08:21 +0100
committerLibravatar GitHub <noreply@github.com>2021-09-10 10:08:21 +0200
commit4c4a622088ef1db208930deb2d00cd1b2bcd708f (patch)
tree2662782d3bf6ec3541e0132e3c225114bdfe364f /internal/gtsmodel/instance.go
parentfix up status inreplyto visibility, + small format improvements (#199) (diff)
downloadgotosocial-4c4a622088ef1db208930deb2d00cd1b2bcd708f.tar.xz
Prune unnecessary nullzeros, fixup db tags (#200)
* prune gtsmodel.Account bun tags, add note to gtsmodel dir Signed-off-by: kim (grufwub) <grufwub@gmail.com> * further database tag fixes Signed-off-by: kim (grufwub) <grufwub@gmail.com> * more db tag fixups Signed-off-by: kim (grufwub) <grufwub@gmail.com> * fix removing nullzero for account timestamps... Signed-off-by: kim (grufwub) <grufwub@gmail.com> * add nullzero back to accountid tag Signed-off-by: kim (grufwub) <grufwub@gmail.com> * rename gtsmodel readme Signed-off-by: kim (grufwub) <grufwub@gmail.com>
Diffstat (limited to 'internal/gtsmodel/instance.go')
-rw-r--r--internal/gtsmodel/instance.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/internal/gtsmodel/instance.go b/internal/gtsmodel/instance.go
index a7cc8a034..4d8c5af3c 100644
--- a/internal/gtsmodel/instance.go
+++ b/internal/gtsmodel/instance.go
@@ -26,15 +26,15 @@ type Instance struct {
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,unique"` // Instance domain eg example.org
- Title string `validate:"-" bun:",nullzero"` // Title of this instance as it would like to be displayed.
+ Title string `validate:"-" bun:""` // Title of this instance as it would like to be displayed.
URI string `validate:"required,url" bun:",nullzero,notnull,unique"` // base URI of this instance eg https://example.org
SuspendedAt time.Time `validate:"-" bun:"type:timestamp,nullzero"` // When was this instance suspended, if at all?
DomainBlockID string `validate:"omitempty,ulid" bun:"type:CHAR(26),nullzero"` // ID of any existing domain block for this instance in the database
DomainBlock *DomainBlock `validate:"-" bun:"rel:belongs-to"` // Domain block corresponding to domainBlockID
- ShortDescription string `validate:"-" bun:",nullzero"` // Short description of this instance
- Description string `validate:"-" bun:",nullzero"` // Longer description of this instance
- Terms string `validate:"-" bun:",nullzero"` // Terms and conditions of this instance
- ContactEmail string `validate:"omitempty,email" bun:",nullzero"` // Contact email address for this instance
+ ShortDescription string `validate:"-" bun:""` // Short description of this instance
+ Description string `validate:"-" bun:""` // Longer description of this instance
+ Terms string `validate:"-" bun:""` // Terms and conditions of this instance
+ ContactEmail string `validate:"omitempty,email" bun:""` // Contact email address for this instance
ContactAccountUsername string `validate:"required_with=ContactAccountID" bun:",nullzero"` // Username of the contact account for this instance
ContactAccountID string `validate:"required_with=ContactAccountUsername,omitempty,ulid" bun:"type:CHAR(26),nullzero"` // Contact account ID in the database for this instance
ContactAccount *Account `validate:"-" bun:"rel:belongs-to"` // account corresponding to contactAccountID