implement user registration with email verification, enhance error handling, and update database configuration

This commit is contained in:
2025-07-22 09:15:12 +08:00
parent 1f5f67761b
commit 00c28fea9c
5 changed files with 72 additions and 18 deletions

View File

@ -7,10 +7,10 @@ import (
type User struct {
gorm.Model
Username string `gorm:"unique;index"` // 用户名,唯一
Username string `gorm:"uniqueIndex"` // 用户名,唯一
Nickname string
AvatarUrl string
Email string `gorm:"unique;index"`
Email string `gorm:"uniqueIndex"`
Gender string
Role string `gorm:"default:'user'"`