user.go 664 字节
package repository

import "opp/models"

type IUserRepository interface {
	GetUsersById(uid int64) (v *models.User, err error)
	GetUsersByMobile(mobile string) (v *models.User, err error)
	UpdateUserInfo(m *models.User) (err error)
}

var _ IUserRepository = (*UserRepository)(nil)

type UserRepository struct{}

func (r *UserRepository) GetUsersById(uid int64) (v *models.User, err error) {
	return models.GetUsersById(uid)
}

func (r *UserRepository) GetUsersByMobile(mobile string) (v *models.User, err error) {
	return models.GetUsersByMobile(mobile)
}

func (r *UserRepository) UpdateUserInfo(m *models.User) (err error) {
	return models.UpdateUsersById(m)
}