package model type User struct { UserId int `json:"userId" gorm:"primaryKey"` Username string `json:"username"` Nickname string `json:"nickname"` Password string `json:"password"` } func (User) TableName() string { return "t_user" }