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

25 lines
352 B
Go
Raw Normal View History

2023-12-01 21:19:44 +01:00
package models
import (
"gorm.io/gorm"
"time"
)
2023-12-06 23:25:34 +01:00
var DB *gorm.DB
2023-12-01 21:19:44 +01:00
type User struct {
gorm.Model
Username string
Email string
PasswordHash []byte `gorm:"size:60"`
2023-12-01 21:19:44 +01:00
LastLoginAt time.Time
}
type EmailConfirmation struct {
gorm.Model
UserID uint
User User
ConfirmationCode string
ExpiresAt time.Time
}