DeployHelper/internal/model/sys_login_log.go

26 lines
1.5 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package model
import "time"
// SysLoginLog 系统登录日志
type SysLoginLog struct {
Id string `gorm:"column:id;type:varchar(64);primary_key;comment:主键" json:"id"`
UserId string `gorm:"column:user_id;type:varchar(64);comment:用户ID" json:"userId"`
IpAddr string `gorm:"column:ip_addr;type:varchar(128);comment:登录IP地址" json:"ipAddr"`
LoginLocation string `gorm:"column:login_location;type:varchar(255);comment:登录地点" json:"loginLocation"`
Browser string `gorm:"column:browser;type:varchar(128);comment:浏览器类型" json:"browser"`
Os string `gorm:"column:os;type:varchar(50);comment:操作系统" json:"os"`
Status string `gorm:"column:status;type:varchar(10);comment:登录状态0成功 1失败" json:"status"`
Msg string `gorm:"column:msg;type:varchar(255);comment:提示消息" json:"msg"`
LoginTime *time.Time `gorm:"column:login_time;type:varchar(20);comment:登录时间" json:"loginTime"`
CreateBy string `gorm:"column:create_by;type:varchar(64);comment:创建者" json:"createBy"`
CreateTime *time.Time `gorm:"column:create_time;type:datetime;comment:创建时间" json:"createTime"`
UpdateBy string `gorm:"column:update_by;type:varchar(64);comment:更新者" json:"updateBy"`
UpdateTime *time.Time `gorm:"column:update_time;type:datetime;comment:更新时间" json:"updateTime"`
}
// TableName 设置表名
func (SysLoginLog) TableName() string {
return "sys_login_log"
}