17 lines
597 B
Go
17 lines
597 B
Go
package entity
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
type OneTimePasswords struct {
|
|
ID uint `json:"id" gorm:"primaryKey;type:int4;autoIncrement"`
|
|
Email string `json:"email" gorm:"type:varchar"`
|
|
Name *string `json:"name" gorm:"type:varchar"`
|
|
Identity *string `json:"identity" gorm:"type:varchar"`
|
|
OtpCode string `json:"otp_code" gorm:"type:varchar"`
|
|
ValidUntil time.Time `json:"valid_until" gorm:"default:(NOW() + INTERVAL '10 minutes')"`
|
|
IsActive bool `json:"is_active" gorm:"type:bool"`
|
|
CreatedAt time.Time `json:"created_at" gorm:"default:now()"`
|
|
}
|