feat: refact id column define

This commit is contained in:
engigu
2026-03-03 17:25:38 +08:00
parent 117ae126f7
commit 4589c64923
62 changed files with 881 additions and 454 deletions
+2
View File
@@ -3,6 +3,7 @@ package services
import (
"github.com/engigu/baihu-panel/internal/database"
"github.com/engigu/baihu-panel/internal/models"
"github.com/engigu/baihu-panel/internal/utils"
)
type LoginLogService struct{}
@@ -14,6 +15,7 @@ func NewLoginLogService() *LoginLogService {
// Create 创建登录日志
func (s *LoginLogService) Create(username, ip, userAgent, status, message string) error {
log := &models.LoginLog{
ID: utils.GenerateID(),
Username: username,
IP: ip,
UserAgent: userAgent,