2024-01-28 16:32:39 +00:00
|
|
|
package models
|
|
|
|
|
|
|
|
import "time"
|
|
|
|
|
|
|
|
type MagicTokenType = int8
|
|
|
|
|
|
|
|
const (
|
|
|
|
ConfirmMagicToken = MagicTokenType(iota)
|
|
|
|
RegistrationMagicToken
|
2024-06-30 09:01:39 +00:00
|
|
|
ResetPasswordMagicToken
|
2024-09-19 14:18:22 +00:00
|
|
|
DeleteAccountMagicToken
|
2024-01-28 16:32:39 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
type MagicToken struct {
|
|
|
|
BaseModel
|
|
|
|
|
|
|
|
Code string `json:"code"`
|
|
|
|
Type int8 `json:"type"`
|
2024-06-26 07:52:58 +00:00
|
|
|
AccountID *uint `json:"account_id"`
|
2024-01-28 16:32:39 +00:00
|
|
|
ExpiredAt *time.Time `json:"expired_at"`
|
|
|
|
}
|