package model import ( "gorm.io/gorm" ) var db *gorm.DB func init() { err := db.AutoMigrate(&UserInfo{}) if err != nil { panic(err) } }