mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
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>
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user