22 lines
570 B
Go
22 lines
570 B
Go
package models
|
|
|
|
import "time"
|
|
|
|
type EmailVerificationToken struct {
|
|
ID uint `gorm:"primaryKey"`
|
|
UserID uint `gorm:"not null;index"`
|
|
TokenHash string `gorm:"size:64;uniqueIndex;not null"`
|
|
ExpiresAt time.Time `gorm:"not null;index"`
|
|
CreatedAt time.Time
|
|
UpdatedAt time.Time
|
|
}
|
|
|
|
type PasswordResetToken struct {
|
|
ID uint `gorm:"primaryKey"`
|
|
UserID uint `gorm:"not null;index"`
|
|
TokenHash string `gorm:"size:64;uniqueIndex;not null"`
|
|
ExpiresAt time.Time `gorm:"not null;index"`
|
|
CreatedAt time.Time
|
|
UpdatedAt time.Time
|
|
}
|