// ================================================================================
// 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/internal/model"
	"kami/internal/model/entity"

	"github.com/gogf/gf/v2/database/gdb"
)

type (
	IRechargeTMallGameAccount interface {
		Add(ctx context.Context, input *model.RechargeTMallGameAccountAddInput) (err error)
		// CheckAccountNumberExists 判断当前账户是否存在
		CheckAccountNumberExists(ctx context.Context, accountNumber string, tx gdb.TX) bool
		// CheckAccountNumberNormal 判断当前账户是否可用
		CheckAccountNumberNormal(ctx context.Context, accountNumber string, tx gdb.TX) bool
		List(ctx context.Context, input *model.RechargeTMallGameAccountListInput) (total int, data []entity.V1RechargeTMallAccount, err error)
		// Toggle 改变账号状态
		Toggle(ctx context.Context, input *model.RechargeTMallGameAccountToggleInput) (err error)
		// GetOne 根据id获取账号信息
		GetOne(ctx context.Context, id string, accountNumber string) (data *entity.V1RechargeTMallAccount, err error)
		// GetRandomOne 随机获取一个账号,如果没有新的账号，就创建一个新账号
		GetRandomOne(ctx context.Context, excludeAccountNumber []string) (accountNumber string, err error)
		// AddRandomOne 添加一个随机账号
		AddRandomOne(ctx context.Context, tx gdb.TX) (phoneNumber string, err error)
		// DeleteOne 删除账户
		DeleteOne(ctx context.Context, id string) (err error)
	}
)

var (
	localRechargeTMallGameAccount IRechargeTMallGameAccount
)

func RechargeTMallGameAccount() IRechargeTMallGameAccount {
	if localRechargeTMallGameAccount == nil {
		panic("implement not found for interface IRechargeTMallGameAccount, forgot register?")
	}
	return localRechargeTMallGameAccount
}

func RegisterRechargeTMallGameAccount(i IRechargeTMallGameAccount) {
	localRechargeTMallGameAccount = i
}
