summaryrefslogtreecommitdiff
path: root/internal/gtsmodel/routersession.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/gtsmodel/routersession.go')
-rw-r--r--internal/gtsmodel/routersession.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/internal/gtsmodel/routersession.go b/internal/gtsmodel/routersession.go
index fbc1c7768..374264fe4 100644
--- a/internal/gtsmodel/routersession.go
+++ b/internal/gtsmodel/routersession.go
@@ -20,7 +20,7 @@ package gtsmodel
// RouterSession is used to store and retrieve settings for a router session.
type RouterSession struct {
- ID string `bun:"type:CHAR(26),pk,notnull"`
- Auth []byte `bun:"type:bytea,notnull,nullzero"`
- Crypt []byte `bun:"type:bytea,notnull,nullzero"`
+ ID string `validate:"required,ulid" bun:"type:CHAR(26),pk,nullzero,notnull"`
+ Auth []byte `validate:"required,len=32" bun:"type:bytea,notnull,nullzero"`
+ Crypt []byte `validate:"required,len=32" bun:"type:bytea,notnull,nullzero"`
}