package store

import (
	"gorm.io/gorm"
)

var client Factory

// Factory defines the platform storage interface.
type Factory interface {
	GetDB() *gorm.DB
	WebView() WebViewStore
	CloudOrder() CloudOrderStore
	CloudRevrec() CloudRevrecStore
	CloudCollection() CloudCollectionStore
	BqAccount() BqAccountStore
	BqOrder() BqOrderStore
	AuditLog() AuditLogStore
	Salesforce() SalesforceStore
	Common() CommonStore
	ARTable() ARTableStore
	MarketplaceCollection() MarketplaceCollectionStore
	PublicCollection() PublicCollectionStore
	InvoiceRewrite() InvoiceRewriteStore
	NSRevRec() NSRevrecStore
	ExamService() ExamServiceStore
}

// Client return the store client instance.
func Client() Factory {
	return client
}

// SetClient set the store client.
func SetClient(factory Factory) {
	client = factory
}
