go_gin_tmpl/repository/user.go

20 lines
283 B
Go
Raw Normal View History

2022-05-09 09:00:14 +08:00
package repository
import (
"ginDemo/client"
"ginDemo/model/entity"
)
type user struct {
}
// User ...
func User() *user {
return &user{}
}
// GetUser 查询单个用户信息
func (user) GetUser(user *entity.User) (err error) {
return client.MySQL.Take(&user, user).Error
}