package models import "time" // A token used during the login process // Each user may only have at most one login process active at the same time // Technically, that could be used to permanently block someone from logging in // by starting a new login process every time the target has just started one type LoginProcessToken struct { User User UserId string `gorm:"unique"` Token string `gorm:"primarykey;type:uuid;default:gen_random_uuid()"` ExpiresAt time.Time }