refactor: reorganize modules and add Linux build tooling

This commit is contained in:
2026-08-09 12:41:08 +08:00
parent 86024fa81d
commit 5cc5fd92ed
1461 changed files with 4054 additions and 4724 deletions

View File

@@ -0,0 +1,25 @@
package impl
import (
"bsm/full/module/base/mgt/internal/models"
"git.apinb.com/bsm-sdk/core/conf"
"git.apinb.com/bsm-sdk/core/printer"
coreTypes "git.apinb.com/bsm-sdk/core/types"
"git.apinb.com/bsm-sdk/core/vars"
)
func WithDatabases(cfg *conf.DBConf, opts *coreTypes.SqlOptions) {
if cfg == nil || len(cfg.Source) == 0 {
panic("No Database Source Found !")
}
// print inform.
printer.Info("[BSM - %s] Databases: %v", vars.ServiceKey, cfg)
err := models.New(cfg.Driver, cfg.Source, opts)
if err != nil {
printer.Error("Database Init Failed !")
panic(err)
}
return
}