diff options
Diffstat (limited to 'internal/gtsmodel')
| -rw-r--r-- | internal/gtsmodel/domainblock.go | 18 | ||||
| -rw-r--r-- | internal/gtsmodel/instance.go | 2 | 
2 files changed, 8 insertions, 12 deletions
diff --git a/internal/gtsmodel/domainblock.go b/internal/gtsmodel/domainblock.go index f5c96d832..b32984e95 100644 --- a/internal/gtsmodel/domainblock.go +++ b/internal/gtsmodel/domainblock.go @@ -20,28 +20,24 @@ package gtsmodel  import "time" -// DomainBlock represents a federation block against a particular domain, of varying severity. +// DomainBlock represents a federation block against a particular domain  type DomainBlock struct {  	// ID of this block in the database  	ID string `pg:"type:CHAR(26),pk,notnull,unique"` -	// Domain to block. If ANY PART of the candidate domain contains this string, it will be blocked. -	// For example: 'example.org' also blocks 'gts.example.org'. '.com' blocks *any* '.com' domains. -	// TODO: implement wildcards here -	Domain string `pg:",notnull"` +	// blocked domain +	Domain string `pg:",pk,notnull,unique"`  	// When was this block created  	CreatedAt time.Time `pg:"type:timestamp,notnull,default:now()"`  	// When was this block updated  	UpdatedAt time.Time `pg:"type:timestamp,notnull,default:now()"`  	// Account ID of the creator of this block  	CreatedByAccountID string `pg:"type:CHAR(26),notnull"` -	// TODO: define this -	Severity int -	// Reject media from this domain? -	RejectMedia bool -	// Reject reports from this domain? -	RejectReports bool  	// Private comment on this block, viewable to admins  	PrivateComment string  	// Public comment on this block, viewable (optionally) by everyone  	PublicComment string +	// whether the domain name should appear obfuscated when displaying it publicly +	Obfuscate bool +	// if this block was created through a subscription, what's the subscription ID? +	SubscriptionID string `pg:"type:CHAR(26)"`  } diff --git a/internal/gtsmodel/instance.go b/internal/gtsmodel/instance.go index c13c35f43..857831ba3 100644 --- a/internal/gtsmodel/instance.go +++ b/internal/gtsmodel/instance.go @@ -7,7 +7,7 @@ type Instance struct {  	// ID of this instance in the database  	ID string `pg:"type:CHAR(26),pk,notnull,unique"`  	// Instance domain eg example.org -	Domain string `pg:",notnull,unique"` +	Domain string `pg:",pk,notnull,unique"`  	// Title of this instance as it would like to be displayed.  	Title string  	// base URI of this instance eg https://example.org  | 
