LicenseManger/internal/model/captcha.go

17 lines
432 B
Go
Raw Permalink Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

package model
import (
"time"
"gorm.io/gorm"
)
type Captcha struct {
gorm.Model
Code string `gorm:"size:6"` // 验证码
Type string `gorm:"size:20"` // 验证码类型register/login/reset
Target string `gorm:"size:255"` // 目标(邮箱或手机号)
ExpiresAt time.Time `gorm:"index"` // 过期时间
Used bool `gorm:"default:false"` // 是否已使用
}