Tokens: User improvements

This commit is contained in:
Tom 2023-06-29 09:44:04 +02:00
parent 8ccd490bed
commit 4f4fa2b3d7
6 changed files with 117 additions and 24 deletions

View file

@ -11,8 +11,10 @@ const TokensTable = "tokens"
type Token struct {
Pk uint `gorm:"column:pk;primaryKey"`
Token string `gorm:"column:token;unique:true;not null"`
User string `gorm:"column:user;not null"` // (distillery) username
Token string `json:"-" gorm:"column:token;unique:true;not null"` // token used by the actual api (shown only once)
TokenID string `gorm:"column:id;unique:true;not null"` // token id (displayed to user, used for finding it)
User string `gorm:"column:user;not null"` // (distillery) username
Description string `gorm:"column:description"`