GORM model recording user login attempts with username, IP, status, error message, agent, and associated user; used for auditing login activity.
// Source: https://github.com/flipped-aurora/gin-vue-admin | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
package system
import (
"github.com/flipped-aurora/gin-vue-admin/server/global"
)
type SysLoginLog struct {
global.GVA_MODEL
Username string `json:"username" gorm:"column:username;comment:用户名"`
Ip string `json:"ip" gorm:"column:ip;comment:请求ip"`
Status bool `json:"status" gorm:"column:status;comment:登录状态"`
ErrorMessage string `json:"errorMessage" gorm:"column:error_message;comment:错误信息"`
Agent string `json:"agent" gorm:"column:agent;comment:代理"`
UserID uint `json:"userId" gorm:"column:user_id;comment:用户id"`
User
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key