relations.go 581 B

1234567891011121314151617181920
  1. package relations
  2. import (
  3. "git.sxidc.com/go-framework/baize/framework/binding"
  4. )
  5. // Simple Bind参数
  6. type Simple struct {
  7. // schema
  8. Schema string
  9. // 鉴权中间件
  10. AuthMiddleware binding.Middleware
  11. }
  12. func (simple *Simple) Bind(binder *binding.Binder) {
  13. (&SimplePermissionGroupAndPermission{Schema: simple.Schema, AuthMiddleware: simple.AuthMiddleware}).Bind(binder)
  14. (&SimpleRoleAndPermission{Schema: simple.Schema, AuthMiddleware: simple.AuthMiddleware}).Bind(binder)
  15. (&SimpleUserAndRole{Schema: simple.Schema, AuthMiddleware: simple.AuthMiddleware}).Bind(binder)
  16. }