feat: implement new structure

This commit is contained in:
2025-12-29 09:30:49 +08:00
parent 503b15aab7
commit ad52371028
116 changed files with 17579 additions and 1213 deletions

View File

@@ -0,0 +1,49 @@
package services
import (
"gorm.io/gorm"
)
var _db *gorm.DB
// exported CamelCase Services
var (
Common *common
Content *content
Creator *creator
Order *order
Super *super
Tenant *tenant
User *user
Wallet *wallet
)
// @provider(model)
type services struct {
db *gorm.DB
// define Services
common *common
content *content
creator *creator
order *order
super *super
tenant *tenant
user *user
wallet *wallet
}
func (svc *services) Prepare() error {
_db = svc.db
// set exported Services here
Common = svc.common
Content = svc.content
Creator = svc.creator
Order = svc.order
Super = svc.super
Tenant = svc.tenant
User = svc.user
Wallet = svc.wallet
return nil
}