package models import ( "main/configs" "time" ) type Session struct { ID string `json:"id" gorm:"primary_key"` IP string `json:"ip"` UserID int `json:"user_id"` UserAgent string `json:"user_agent"` CreatedAt time.Time `json:"created_at" gorm:"autoCreateTime"` UpdatedAt time.Time `json:"updated_at" gorm:"autoUpdateTime"` } func init() { configs.ORMDB().AutoMigrate(&Session{}) }