代码推送

This commit is contained in:
2026-09-09 02:39:57 +08:00
parent a112893947
commit 5e47757c73
24 changed files with 1156 additions and 226 deletions

View File

@@ -0,0 +1,17 @@
package model
import "time"
// AccessLog 网站访问日志
type AccessLog struct {
ID uint `gorm:"primaryKey" json:"id"`
IP string `gorm:"size:45;index" json:"ip"`
Path string `gorm:"size:500;index" json:"path"`
Method string `gorm:"size:10" json:"method"`
UserAgent string `gorm:"size:500" json:"user_agent"`
Referer string `gorm:"size:500" json:"referer"`
Location string `gorm:"size:255" json:"location"` // IP 归属地
Status int `json:"status"`
Cost int `json:"cost"` // 耗时(毫秒)
CreatedAt time.Time `gorm:"index" json:"created_at"`
}