package store

import "gorm.io/gorm"

var client Factory

// Factory defines the platform storage interface.
type Factory interface {
	GetDB() *gorm.DB
	CloudResource() CloudResourceStore
	CreatedRevrec() CreatedRevrecStore
	CreatedCollection() CreatedCollectionStore
	CreatedOrder() CreatedOrderStore
	Approval() ApprovalStore
	BqOrder() BqOrderStore
	BqAccount() BqAccountStore
	AuditLog() AuditLogStore
	CloudBilling() CloudBillingStore
	CloudBillingAudit() CloudBillingAuditStore
}

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

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