Passport/pkg/internal/models/tokens.go
2024-09-19 22:18:22 +08:00

22 lines
381 B
Go

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