30 lines
420 B
Go
30 lines
420 B
Go
package domain
|
|
|
|
import "time"
|
|
|
|
type OtpFor string
|
|
|
|
const (
|
|
OtpReset OtpFor = "reset"
|
|
OtpRegister OtpFor = "register"
|
|
)
|
|
|
|
type OtpMedium string
|
|
|
|
const (
|
|
OtpMediumEmail OtpMedium = "email"
|
|
OtpMediumSms OtpMedium = "sms"
|
|
)
|
|
|
|
type Otp struct {
|
|
ID int64
|
|
SentTo string
|
|
Medium OtpMedium
|
|
For OtpFor
|
|
Otp string
|
|
Used bool
|
|
UsedAt time.Time
|
|
CreatedAt time.Time
|
|
ExpiresAt time.Time
|
|
}
|