jdysya 5cb134fa9d refactor(gateway): 重构 main.go 文件
- 移除日志初始化代码,改为使用 utils.InitLogger()
- 删除用户模型定义,移至 models 包
- 抽离路由处理逻辑到 handlers 包
- 使用 middleware 包中的 AuthRequired 中间件
- 优化数据库连接和迁移逻辑
- 简化 main 函数,提高代码可读性和维护性
2025-02-15 20:16:44 +08:00

15 lines
251 B
Go

package models
import (
"github.com/jinzhu/gorm"
)
type User struct {
gorm.Model
FullName string `gorm:"not null"`
RegionID uint `gorm:"not null"`
Mobile string `gorm:"unique;not null"`
Password string `gorm:"not null"`
Region Region
}