summaryrefslogtreecommitdiff
path: root/internal/gtsmodel/statusfave.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/gtsmodel/statusfave.go')
-rw-r--r--internal/gtsmodel/statusfave.go20
1 files changed, 10 insertions, 10 deletions
diff --git a/internal/gtsmodel/statusfave.go b/internal/gtsmodel/statusfave.go
index 86096ef5e..f81226f8b 100644
--- a/internal/gtsmodel/statusfave.go
+++ b/internal/gtsmodel/statusfave.go
@@ -21,14 +21,14 @@ import "time"
// StatusFave refers to a 'fave' or 'like' in the database, from one account, targeting the status of another account
type StatusFave 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:"type:timestamptz,nullzero,notnull,default:current_timestamp"` // when was item created
- UpdatedAt time.Time `validate:"-" bun:"type:timestamptz,nullzero,notnull,default:current_timestamp"` // when was item last updated
- AccountID string `validate:"required,ulid" bun:"type:CHAR(26),unique:statusfaveaccountstatus,nullzero,notnull"` // id of the account that created ('did') the fave
- Account *Account `validate:"-" bun:"-"` // account that created the fave
- TargetAccountID string `validate:"required,ulid" bun:"type:CHAR(26),nullzero,notnull"` // id the account owning the faved status
- TargetAccount *Account `validate:"-" bun:"-"` // account owning the faved status
- StatusID string `validate:"required,ulid" bun:"type:CHAR(26),unique:statusfaveaccountstatus,nullzero,notnull"` // database id of the status that has been 'faved'
- Status *Status `validate:"-" bun:"-"` // the faved status
- URI string `validate:"required,url" bun:",nullzero,notnull,unique"` // ActivityPub URI of this fave
+ ID string `bun:"type:CHAR(26),pk,nullzero,notnull,unique"` // id of this item in the database
+ CreatedAt time.Time `bun:"type:timestamptz,nullzero,notnull,default:current_timestamp"` // when was item created
+ UpdatedAt time.Time `bun:"type:timestamptz,nullzero,notnull,default:current_timestamp"` // when was item last updated
+ AccountID string `bun:"type:CHAR(26),unique:statusfaveaccountstatus,nullzero,notnull"` // id of the account that created ('did') the fave
+ Account *Account `bun:"-"` // account that created the fave
+ TargetAccountID string `bun:"type:CHAR(26),nullzero,notnull"` // id the account owning the faved status
+ TargetAccount *Account `bun:"-"` // account owning the faved status
+ StatusID string `bun:"type:CHAR(26),unique:statusfaveaccountstatus,nullzero,notnull"` // database id of the status that has been 'faved'
+ Status *Status `bun:"-"` // the faved status
+ URI string `bun:",nullzero,notnull,unique"` // ActivityPub URI of this fave
}