Passport/pkg/models/tokens.go
2024-01-29 00:32:39 +08:00

20 lines
330 B
Go

package models
import "time"
type MagicTokenType = int8
const (
ConfirmMagicToken = MagicTokenType(iota)
RegistrationMagicToken
)
type MagicToken struct {
BaseModel
Code string `json:"code"`
Type int8 `json:"type"`
AssignTo *uint `json:"assign_to"`
ExpiredAt *time.Time `json:"expired_at"`
}