tlm-login-server/internal/models/database.go

24 lines
352 B
Go

package models
import (
"gorm.io/gorm"
"time"
)
var DB *gorm.DB
type User struct {
gorm.Model
Username string
Email string
PasswordHash []byte `gorm:"size:60"`
LastLoginAt time.Time
}
type EmailConfirmation struct {
gorm.Model
UserID uint
User User
ConfirmationCode string
ExpiresAt time.Time
}