package services

import (
	"gorm.io/gorm"
)

var _db *gorm.DB

// exported CamelCase Services
var (
	Content *content
	Ledger  *ledger
	Order   *order
	Tenant  *tenant
	Test    *test
	User    *user
)

// @provider(model)
type services struct {
	db *gorm.DB
	// define Services
	content *content
	ledger  *ledger
	order   *order
	tenant  *tenant
	test    *test
	user    *user
}

func (svc *services) Prepare() error {
	_db = svc.db

	// set exported Services here
	Content = svc.content
	Ledger = svc.ledger
	Order = svc.order
	Tenant = svc.tenant
	Test = svc.test
	User = svc.user

	return nil
}
