// ================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// You can delete these comments if you wish manually maintain this interface file.
// ================================================================================

package service

import (
	"context"
	"kami/api/commonApi"
	"kami/internal/model"
	"kami/internal/systemV2/model/entity"
)

type (
	IUserCenter interface {
		GetUserByUserNameOrPhone(ctx context.Context, userInfo entity.V2User) (user entity.V2User, err error)
		// CheckPassword 检查新密码和旧密码是不是相同
		CheckPassword(ctx context.Context, oldPassword, newPassword string) (bool, error)
		CreateUser(ctx context.Context, userInfo entity.V2User) (err error)
		ReGeneratePassword(ctx context.Context, password string) (newPassword string, err error)
		GetUserList(ctx context.Context, req commonApi.CommonPageReq) (list []model.User, total int, err error)
	}
)

var (
	localUserCenter IUserCenter
)

func UserCenter() IUserCenter {
	if localUserCenter == nil {
		panic("implement not found for interface IUserCenter, forgot register?")
	}
	return localUserCenter
}

func RegisterUserCenter(i IUserCenter) {
	localUserCenter = i
}
