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

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

type (
	IMerchant interface {
		List(ctx context.Context, req model.MerchantListParamsInput) (total int, data []model.MerchantInfoRecord, err error)
		Add(ctx context.Context, input do.V1MerchantInfo, tx gdb.TX) (err error)
		HandleStatus(ctx context.Context, data entity.V1MerchantInfo, tx gdb.TX) (err error)
		GetMerchantByUId(ctx context.Context, Uid string) (data entity.V1MerchantInfo, err error)
		GetDetail(ctx context.Context, uid string) (res model.MerchantSimpleInfoRecord, err error)
		UpdateDetail(ctx context.Context, data model.MerchantSimpleInfoRecord) (err error)
		All(ctx context.Context) (list []*entity.V1MerchantInfo, total int, err error)
	}
)

var (
	localMerchant IMerchant
)

func Merchant() IMerchant {
	if localMerchant == nil {
		panic("implement not found for interface IMerchant, forgot register?")
	}
	return localMerchant
}

func RegisterMerchant(i IMerchant) {
	localMerchant = i
}
