refactor: ensure key is unique
This commit is contained in:
parent
41a6772c9f
commit
593d8ea381
|
@ -5,6 +5,6 @@ import "gorm.io/gorm"
|
||||||
type PublicKey struct {
|
type PublicKey struct {
|
||||||
gorm.Model
|
gorm.Model
|
||||||
UserID uint
|
UserID uint
|
||||||
Key string
|
Key string `gorm:"unique;not null"`
|
||||||
User User
|
User User
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue