package services import ( "quyun/v2/providers/job" "quyun/v2/providers/storage" "gorm.io/gorm" ) var _db *gorm.DB // exported CamelCase Services var ( Audit *audit Common *common Content *content Creator *creator Job *job.Job Notification *notification Order *order Storage *storage.Storage Super *super Tenant *tenant User *user Wallet *wallet ) // @provider(model) type services struct { db *gorm.DB // define Services audit *audit common *common content *content creator *creator job *job.Job notification *notification order *order storage *storage.Storage super *super tenant *tenant user *user wallet *wallet } func (svc *services) Prepare() error { _db = svc.db // set exported Services here Audit = svc.audit Common = svc.common Content = svc.content Creator = svc.creator Job = svc.job Notification = svc.notification Order = svc.order Storage = svc.storage Super = svc.super Tenant = svc.tenant User = svc.user Wallet = svc.wallet return nil }