query_rule.go 757 B

12345678910111213141516171819202122232425
  1. package query_rule
  2. import (
  3. "git.sxidc.com/go-framework/baize/convenient/domain/query_rule/definition"
  4. "git.sxidc.com/go-framework/baize/convenient/domain/query_rule/rule"
  5. "git.sxidc.com/go-framework/baize/framework/binding"
  6. "git.sxidc.com/go-framework/baize/framework/core/api"
  7. "git.sxidc.com/go-framework/baize/framework/core/application"
  8. )
  9. // Simple Bind参数
  10. type Simple struct {
  11. // schema
  12. Schema string
  13. }
  14. func (simple *Simple) bind(binder *binding.Binder) {
  15. (&definition.Simple{Schema: simple.Schema}).Bind(binder)
  16. (&rule.Simple{Schema: simple.Schema}).Bind(binder)
  17. }
  18. func Bind(app *application.App, simple *Simple) {
  19. binder := binding.NewBinder(app.Api().ChooseRouter(api.RouterPrefix, ""), app.Infrastructure())
  20. simple.bind(binder)
  21. }