and yet more

This commit is contained in:
tsmethurst 2021-08-24 19:52:02 +02:00
commit 465aa3da86
34 changed files with 128 additions and 134 deletions

View file

@ -13,14 +13,14 @@ type Instance struct {
// base URI of this instance eg https://example.org
URI string `bun:",notnull,unique"`
// When was this instance created in the db?
CreatedAt time.Time `bun:"type:timestamp,notnull,default:now()"`
CreatedAt time.Time `bun:"type:timestamp,notnull,default:current_timestamp"`
// When was this instance last updated in the db?
UpdatedAt time.Time `bun:"type:timestamp,notnull,default:now()"`
UpdatedAt time.Time `bun:"type:timestamp,notnull,default:current_timestamp"`
// When was this instance suspended, if at all?
SuspendedAt time.Time
// ID of any existing domain block for this instance in the database
DomainBlockID string `bun:"type:CHAR(26)"`
DomainBlock *DomainBlock `bun:"rel:belongs-to"`
DomainBlock *DomainBlock `bun:"-"`
// Short description of this instance
ShortDescription string
// Longer description of this instance
@ -33,7 +33,7 @@ type Instance struct {
ContactAccountUsername string
// Contact account ID in the database for this instance
ContactAccountID string `bun:"type:CHAR(26)"`
ContactAccount *Account `bun:"rel:belongs-to"`
ContactAccount *Account `bun:"-"`
// Reputation score of this instance
Reputation int64 `bun:",notnull,default:0"`
// Version of the software used on this instance